]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Creation an external arc, in the previous version the circle was created.
authornds <natalia.donis@opencascade.com>
Wed, 8 Apr 2015 09:24:13 +0000 (12:24 +0300)
committernds <natalia.donis@opencascade.com>
Wed, 8 Apr 2015 09:24:13 +0000 (12:24 +0300)
src/PartSet/PartSet_Tools.cpp

index 82675355b292f78aeec6255f5ac6ad880d81757a..b488201750a4866ff82aa1ff3d150af14b2a2223 100644 (file)
@@ -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<GeomAPI_Edge> anEdge = std::shared_ptr<GeomAPI_Edge>(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();