respect part design placement rules in pipe
This commit is contained in:
parent
620b2bb5d7
commit
3aae4ce011
|
@ -131,16 +131,16 @@ App::DocumentObjectExecReturn *Pipe::execute(void)
|
||||||
try {
|
try {
|
||||||
base = getBaseShape();
|
base = getBaseShape();
|
||||||
} catch (const Base::Exception&) {
|
} catch (const Base::Exception&) {
|
||||||
try {
|
base = TopoDS_Shape();
|
||||||
// fall back to support (for legacy features)
|
|
||||||
base = getSupportShape();
|
|
||||||
} catch (const Base::Exception&) {
|
|
||||||
// ignore, because support isn't mandatory
|
|
||||||
base = TopoDS_Shape();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
//setup the location
|
||||||
|
this->positionBySketch();
|
||||||
|
TopLoc_Location invObjLoc = this->getLocation().Inverted();
|
||||||
|
if(!base.IsNull())
|
||||||
|
base.Move(invObjLoc);
|
||||||
|
|
||||||
//build the paths
|
//build the paths
|
||||||
App::DocumentObject* spine = Spine.getValue();
|
App::DocumentObject* spine = Spine.getValue();
|
||||||
if (!(spine && spine->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())))
|
if (!(spine && spine->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())))
|
||||||
|
@ -269,6 +269,7 @@ App::DocumentObjectExecReturn *Pipe::execute(void)
|
||||||
result.Reverse();
|
result.Reverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
result.Move(invObjLoc);
|
||||||
AddSubShape.setValue(result);
|
AddSubShape.setValue(result);
|
||||||
|
|
||||||
if(base.IsNull()) {
|
if(base.IsNull()) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user