From: azv Date: Thu, 11 May 2017 05:11:16 +0000 (+0300) Subject: Issue #2161: Fatal error when creating a circle coincident to an existing circle... X-Git-Tag: V_2.7.1~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1d8b62d5f466237e9f4862e6454c675f83ff9d9d;p=modules%2Fshaper.git Issue #2161: Fatal error when creating a circle coincident to an existing circle in a sketch Fatal error has been eliminated. --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp index 6ae62b929..7338ad4e7 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp @@ -167,7 +167,7 @@ private: double aParSol, aPonTgCurve; gp_Pnt2d aTgPnt; - for (int i = 1; i <= aNbSol && aCurve; ++i) { + for (int i = 1; i <= aNbSol && aNbSol > 1 && aCurve; ++i) { theBuilder->Tangency1(i, aParSol, aPonTgCurve, aTgPnt); if (isParamOnCurve(aPonTgCurve, aCurve)) { double aDist = distanceToClosestPoint(theBuilder->ThisSolution(i)); diff --git a/src/SketchSolver/SketchSolver_Storage.cpp b/src/SketchSolver/SketchSolver_Storage.cpp index 895edeb58..1cf9441bc 100644 --- a/src/SketchSolver/SketchSolver_Storage.cpp +++ b/src/SketchSolver/SketchSolver_Storage.cpp @@ -192,11 +192,13 @@ const EntityWrapperPtr& SketchSolver_Storage::entity(const AttributePtr& theAttr void SketchSolver_Storage::removeFeature(FeaturePtr theFeature) { myFeatureMap.erase(theFeature); + myNeedToResolve = true; } void SketchSolver_Storage::removeAttribute(AttributePtr theAttribute) { myAttributeMap.erase(theAttribute); + myNeedToResolve = true; }