From: nds Date: Wed, 8 Apr 2015 09:24:13 +0000 (+0300) Subject: Creation an external arc, in the previous version the circle was created. X-Git-Tag: V_1.1.0~54^2~7^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ec9614e2a90b00b9ed8f453ce7d2ca8e1a53f78b;p=modules%2Fshaper.git Creation an external arc, in the previous version the circle was created. --- 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();