From 3aae4ce0115e565493612b5490b8b8db5cf7dcc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Tue, 2 Jun 2015 17:02:11 +0200 Subject: [PATCH] respect part design placement rules in pipe --- src/Mod/PartDesign/App/FeaturePipe.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Mod/PartDesign/App/FeaturePipe.cpp b/src/Mod/PartDesign/App/FeaturePipe.cpp index 3f5a80f44..e5c719a51 100644 --- a/src/Mod/PartDesign/App/FeaturePipe.cpp +++ b/src/Mod/PartDesign/App/FeaturePipe.cpp @@ -131,16 +131,16 @@ App::DocumentObjectExecReturn *Pipe::execute(void) try { base = getBaseShape(); } catch (const Base::Exception&) { - try { - // fall back to support (for legacy features) - base = getSupportShape(); - } catch (const Base::Exception&) { - // ignore, because support isn't mandatory - base = TopoDS_Shape(); - } + base = TopoDS_Shape(); } try { + //setup the location + this->positionBySketch(); + TopLoc_Location invObjLoc = this->getLocation().Inverted(); + if(!base.IsNull()) + base.Move(invObjLoc); + //build the paths App::DocumentObject* spine = Spine.getValue(); if (!(spine && spine->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId()))) @@ -269,6 +269,7 @@ App::DocumentObjectExecReturn *Pipe::execute(void) result.Reverse(); } + result.Move(invObjLoc); AddSubShape.setValue(result); if(base.IsNull()) {