]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
refs #80 - Sketch base GUI: create/draw point, circle and arc
authornds <natalia.donis@opencascade.com>
Fri, 6 Jun 2014 12:16:42 +0000 (16:16 +0400)
committernds <natalia.donis@opencascade.com>
Fri, 6 Jun 2014 12:16:42 +0000 (16:16 +0400)
Circle final creation.

src/PartSet/PartSet_Tools.cpp

index 36dd3fd0c3b009f43ccf80c2b9ed92a2d622aae1..5563c9882ae6dc66235672510fb415d8cdbad6cf 100644 (file)
@@ -19,6 +19,7 @@
 #include <SketchPlugin_Sketch.h>
 #include <SketchPlugin_Point.h>
 #include <SketchPlugin_Line.h>
+#include <SketchPlugin_Circle.h>
 #include <SketchPlugin_ConstraintCoincidence.h>
 #include <SketchPlugin_Constraint.h>
 
@@ -317,6 +318,13 @@ boost::shared_ptr<GeomDataAPI_Point2D> PartSet_Tools::findPoint(FeaturePtr theFe
     if (fabs(aPoint->x() - theX) < Precision::Confusion() && fabs(aPoint->y() - theY) < Precision::Confusion() )
       aPoint2D = aPoint;
   }
+  else if (theFeature->getKind() == SKETCH_CIRCLE_KIND)
+  {
+    boost::shared_ptr<GeomDataAPI_Point2D> aPoint =
+          boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(CIRCLE_ATTR_CENTER));
+    if (fabs(aPoint->x() - theX) < Precision::Confusion() && fabs(aPoint->y() - theY) < Precision::Confusion() )
+      aPoint2D = aPoint;
+  }
 
   return aPoint2D;
 }