]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #2243 V_2.8.0RC
authormpv <mpv@opencascade.com>
Wed, 6 Sep 2017 12:57:15 +0000 (15:57 +0300)
committermpv <mpv@opencascade.com>
Wed, 6 Sep 2017 12:57:15 +0000 (15:57 +0300)
src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp
src/SketchPlugin/SketchPlugin_MacroArc.cpp

index c292ee4824f55409256af51df5fa1eff68a28024..163d4643a33d14bf63e8848bed9cc2f03666d94f 100644 (file)
@@ -198,7 +198,7 @@ std::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::lineCircleArc(
 
   /// OCCT creates an edge on a circle with empty radius, but visualization
   /// is not able to process it
-  if (theCenter->isEqual(theStartPoint))
+  if (theCenter->isEqual(theStartPoint) || theCenter->isEqual(theEndPoint))
     return aRes;
 
   double aRadius = theCenter->distance(theStartPoint);
index 642434753d88f4a5f09967b7875e5a5e800f4f62..cae5ca0f4da4dfbc086b9c61673a22a820ed208b 100644 (file)
@@ -274,22 +274,16 @@ GeomShapePtr SketchPlugin_MacroArc::getArcShape(bool isBound)
 
 AISObjectPtr SketchPlugin_MacroArc::getAISObject(AISObjectPtr thePrevious)
 {
-  if(!myStart.get() || !myEnd.get() || !myCenter.get()) {
+  GeomShapePtr anArcShape = getArcShape();
+  if(!anArcShape.get())
     return AISObjectPtr();
-  }
 
   SketchPlugin_Sketch* aSketch = sketch();
-  if(!aSketch) {
-    return AISObjectPtr();
-  }
-
-  GeomShapePtr anArcShape = getArcShape();
   std::shared_ptr<GeomAPI_Pnt> aCenter = aSketch->to3D(myCenter->x(), myCenter->y());;
   GeomShapePtr aCenterPointShape = GeomAlgoAPI_PointBuilder::vertex(aCenter);
 
-  if(!anArcShape.get() || !aCenterPointShape.get()) {
+  if(!aCenterPointShape.get())
     return AISObjectPtr();
-  }
 
   std::list<std::shared_ptr<GeomAPI_Shape> > aShapes;
   aShapes.push_back(anArcShape);