]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
A correction to do not create excessive coincidence constraint
authornds <natalia.donis@opencascade.com>
Thu, 26 Feb 2015 13:50:18 +0000 (16:50 +0300)
committernds <natalia.donis@opencascade.com>
Thu, 26 Feb 2015 13:50:18 +0000 (16:50 +0300)
src/PartSet/PartSet_Tools.cpp

index e32410baf76b329c388dacd6047c739ba22456ee..d77f86d1e03562d02f6a10cafd07c764099f4355 100644 (file)
@@ -361,6 +361,8 @@ void PartSet_Tools::setConstraints(CompositeFeaturePtr theSketch, FeaturePtr the
       new GeomAPI_Pnt2d(theClickedX, theClickedY));
   for (; anIt != aLast; anIt++) {
     FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(*anIt);
+    if (theFeature == aFeature)
+      continue;
     // find the given point in the feature attributes
     anAttiributes = aFeature->data()->attributes(GeomDataAPI_Point2D::type());
     std::list<std::shared_ptr<ModelAPI_Attribute> >::const_iterator anIt = anAttiributes.begin(),