]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix crash on elliptic arc creation
authorazv <azv@opencascade.com>
Fri, 31 Jan 2020 09:30:01 +0000 (12:30 +0300)
committerazv <azv@opencascade.com>
Fri, 31 Jan 2020 09:30:01 +0000 (12:30 +0300)
src/SketchPlugin/SketchPlugin_MacroEllipticArc.cpp

index bd8290c0c5db33c4d749befe5146c0bfb09049a9..3b6e33059e0cd07188700c202c5af09c2234ac1e 100644 (file)
@@ -360,7 +360,7 @@ GeomShapePtr SketchPlugin_MacroEllipticArc::getArcShape()
     return GeomShapePtr();
 
   SketchPlugin_Sketch* aSketch = sketch();
-  if (!aSketch)
+  if (!aSketch || myCenter->distance(myMajorAxis) < 1.e-7)
     return GeomShapePtr();
 
   GeomPointPtr aCenter(aSketch->to3D(myCenter->x(), myCenter->y()));