Salome HOME
Issue #2101: A point cannot be coincident to both, X and Y axises
authorazv <azv@opencascade.com>
Wed, 5 Apr 2017 12:09:41 +0000 (15:09 +0300)
committerazv <azv@opencascade.com>
Wed, 5 Apr 2017 12:10:08 +0000 (15:10 +0300)
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_UpdateCoincidence.cpp

index 6b1d358cb6725c8e09b4b2e4e4b3d9584415fe8a..51cf2f9854d2b218cba0bc3cfe9c37c3d3191777 100644 (file)
@@ -193,7 +193,13 @@ bool PlaneGCSSolver_UpdateCoincidence::CoincidentEntities::isNewCoincidence(
     if (hasExternal()) {
       if (myExternalAndConnected.find(theOtherEntity) == myExternalAndConnected.end())
         myExternalAndConnected[theOtherEntity] = std::set<EntityWrapperPtr>();
-      return false;
+      // check whether all external entities are edges
+      bool isNewCoinc = true;
+      std::map<EntityWrapperPtr, std::set<EntityWrapperPtr> >::iterator
+          anIt = myExternalAndConnected.begin();
+      for (; anIt != myExternalAndConnected.end() && isNewCoinc; ++anIt)
+        isNewCoinc = (anIt->first->type() != ENTITY_POINT);
+      return isNewCoinc;
     } else {
       myExternalAndConnected[theOtherEntity] = myExternalAndConnected[EntityWrapperPtr()];
       myExternalAndConnected.erase(EntityWrapperPtr());