From 5136b236aed3f5e7422eb60ecf10cf52c32e5b4d Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 5 Apr 2017 15:09:41 +0300 Subject: [PATCH] Issue #2101: A point cannot be coincident to both, X and Y axises --- .../PlaneGCSSolver/PlaneGCSSolver_UpdateCoincidence.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_UpdateCoincidence.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_UpdateCoincidence.cpp index 6b1d358cb..51cf2f985 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_UpdateCoincidence.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_UpdateCoincidence.cpp @@ -193,7 +193,13 @@ bool PlaneGCSSolver_UpdateCoincidence::CoincidentEntities::isNewCoincidence( if (hasExternal()) { if (myExternalAndConnected.find(theOtherEntity) == myExternalAndConnected.end()) myExternalAndConnected[theOtherEntity] = std::set(); - return false; + // check whether all external entities are edges + bool isNewCoinc = true; + std::map >::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()); -- 2.39.2