From ec9614e2a90b00b9ed8f453ce7d2ca8e1a53f78b Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 8 Apr 2015 12:24:13 +0300 Subject: [PATCH] Creation an external arc, in the previous version the circle was created. --- src/PartSet/PartSet_Tools.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/PartSet/PartSet_Tools.cpp b/src/PartSet/PartSet_Tools.cpp index 82675355b..b48820175 100644 --- a/src/PartSet/PartSet_Tools.cpp +++ b/src/PartSet/PartSet_Tools.cpp @@ -465,13 +465,16 @@ ResultPtr PartSet_Tools::createFixedObjectByExternal(const TopoDS_Shape& theShap // Create line aMyFeature = theSketch->addFeature(SketchPlugin_Line::ID()); } else if (aAdaptor.GetType() == GeomAbs_Circle) { - if (aAdaptor.IsClosed()) { - // Create circle - aMyFeature = theSketch->addFeature(SketchPlugin_Circle::ID()); - } else { + std::shared_ptr anEdge = std::shared_ptr(new GeomAPI_Edge); + anEdge->setImpl(new TopoDS_Shape(theShape)); + if (anEdge->isArc()) { // Create arc aMyFeature = theSketch->addFeature(SketchPlugin_Arc::ID()); } + else { + // Create circle + aMyFeature = theSketch->addFeature(SketchPlugin_Circle::ID()); + } } if (aMyFeature) { DataPtr aData = aMyFeature->data(); -- 2.39.2