]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Split has incorrectly modified coincidences (issue #1784)
authorazv <azv@opencascade.com>
Tue, 8 Nov 2016 09:53:30 +0000 (12:53 +0300)
committerazv <azv@opencascade.com>
Tue, 8 Nov 2016 09:53:30 +0000 (12:53 +0300)
Do not add feature (ConstraintCoincidence) into a list to remove, if the coincident point is not found. Because, there may be a coincidence between any attribute of split feature and another feature.

src/SketchPlugin/SketchPlugin_ConstraintSplit.cpp

index 156dc33fa77c26aecca9e8bbc00b0263727cdcb3..4ac4418410890de78bb75ddba68f0a2d32d3f17a 100755 (executable)
@@ -532,13 +532,9 @@ void SketchPlugin_ConstraintSplit::getConstraints(std::set<FeaturePtr>& theFeatu
         if (anAttribute.get())
           aCoincidentPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(anAttribute);
       }
-      if (aCoincidentPoint.get()) {
-        if (isToFeature)
-          theCoincidenceToFeature[aRefFeature] = std::make_pair(anAttributeToBeModified,
-                                                                aCoincidentPoint);
-      }
-      else
-        theFeaturesToDelete.insert(aRefFeature); /// this case should not happen
+      if (aCoincidentPoint.get() && isToFeature)
+        theCoincidenceToFeature[aRefFeature] = std::make_pair(anAttributeToBeModified,
+                                                              aCoincidentPoint);
     }
   }
 }