]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2161: Fatal error when creating a circle coincident to an existing circle...
authorazv <azv@opencascade.com>
Thu, 11 May 2017 05:11:16 +0000 (08:11 +0300)
committerazv <azv@opencascade.com>
Thu, 11 May 2017 05:11:16 +0000 (08:11 +0300)
Fatal error has been eliminated.

src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp
src/SketchSolver/SketchSolver_Storage.cpp

index 6ae62b929644a08106da15b6c70934eca34c3a15..7338ad4e70fc81621eed40349908db16df0e94d9 100644 (file)
@@ -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));
index 895edeb58321c0daf337aff135703098e204791f..1cf9441bc2dec4297408eee7b6253af5bdff31bc 100644 (file)
@@ -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;
 }