X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_Tools.cpp;h=a44a47e0b2b43792291f2c30d6930ec3552f059c;hb=e8fbed212f961aa365c804c0b877f7139656fa69;hp=f9c42efa58aa0457e1ea33ab00829d396bb86cec;hpb=2775c2b7d34412925b56421691e6d4cb412e20c4;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_Tools.cpp b/src/PartSet/PartSet_Tools.cpp old mode 100644 new mode 100755 index f9c42efa5..a44a47e0b --- a/src/PartSet/PartSet_Tools.cpp +++ b/src/PartSet/PartSet_Tools.cpp @@ -480,8 +480,9 @@ ResultPtr PartSet_Tools::findFixedObjectByExternal(const TopoDS_Shape& theShape, } 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; @@ -517,14 +518,14 @@ ResultPtr PartSet_Tools::createFixedObjectByExternal(const TopoDS_Shape& theShap anEdge->setImpl(new TopoDS_Shape(theShape)); anAttr->setValue(aRes, anEdge); - - 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(); } } @@ -544,13 +545,14 @@ ResultPtr PartSet_Tools::createFixedObjectByExternal(const TopoDS_Shape& theShap 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(); } }