}
ResultPtr PartSet_Tools::createFixedObjectByExternal(const TopoDS_Shape& theShape,
- const ObjectPtr& theObject,
- CompositeFeaturePtr theSketch)
+ const ObjectPtr& theObject,
+ CompositeFeaturePtr theSketch,
+ const bool theTemporary)
{
if (theShape.ShapeType() == TopAbs_EDGE) {
Standard_Real aStart, aEnd;
anEdge->setImpl(new TopoDS_Shape(theShape));
anAttr->setValue(aRes, anEdge);
+ if (!theTemporary) {
+ aMyFeature->execute();
- aMyFeature->execute();
-
- // fix this edge
- FeaturePtr aFix = theSketch->addFeature(SketchPlugin_ConstraintRigid::ID());
- aFix->data()->refattr(SketchPlugin_Constraint::ENTITY_A())->
- setObject(aMyFeature->lastResult());
-
+ // fix this edge
+ FeaturePtr aFix = theSketch->addFeature(SketchPlugin_ConstraintRigid::ID());
+ aFix->data()->refattr(SketchPlugin_Constraint::ENTITY_A())->
+ setObject(aMyFeature->lastResult());
+ }
return aMyFeature->lastResult();
}
}
aVert->setImpl(new TopoDS_Shape(theShape));
anAttr->setValue(aRes, aVert);
- aMyFeature->execute();
-
- // fix this edge
- FeaturePtr aFix = theSketch->addFeature(SketchPlugin_ConstraintRigid::ID());
- aFix->data()->refattr(SketchPlugin_Constraint::ENTITY_A())->
- setObject(aMyFeature->lastResult());
+ if (theTemporary) {
+ aMyFeature->execute();
+ // fix this edge
+ FeaturePtr aFix = theSketch->addFeature(SketchPlugin_ConstraintRigid::ID());
+ aFix->data()->refattr(SketchPlugin_Constraint::ENTITY_A())->
+ setObject(aMyFeature->lastResult());
+ }
return aMyFeature->lastResult();
}
}