From: mpv Date: Wed, 6 Sep 2017 12:57:15 +0000 (+0300) Subject: Fix for the issue #2243 X-Git-Tag: V_2.8.0RC X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dfad060191418d8b5e6d122afd6821dd0e553f9c;p=modules%2Fshaper.git Fix for the issue #2243 --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp index c292ee482..163d4643a 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp @@ -198,7 +198,7 @@ std::shared_ptr 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); diff --git a/src/SketchPlugin/SketchPlugin_MacroArc.cpp b/src/SketchPlugin/SketchPlugin_MacroArc.cpp index 642434753..cae5ca0f4 100644 --- a/src/SketchPlugin/SketchPlugin_MacroArc.cpp +++ b/src/SketchPlugin/SketchPlugin_MacroArc.cpp @@ -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 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 > aShapes; aShapes.push_back(anArcShape);