/// 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);
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);