]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Create distance constraint on circles
authorvsv <vitaly.smetannikov@opencascade.com>
Wed, 30 Jul 2014 13:40:42 +0000 (17:40 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Wed, 30 Jul 2014 13:40:42 +0000 (17:40 +0400)
src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp

index b46cf90967b30b86bf225e4baa781bd40931bea3..0c499fff0e88763ed5078994ed8e41bb5889ba1a 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "SketchPlugin_ConstraintDistance.h"
 #include <SketchPlugin_Point.h>
+#include <SketchPlugin_Circle.h>
 
 #include <GeomAPI_Lin2d.h>
 #include <GeomAPI_Pnt2d.h>
@@ -109,6 +110,9 @@ boost::shared_ptr<GeomDataAPI_Point2D> getFeaturePoint(DataPtr theData,
   if (aFeature && aFeature->getKind() == SketchPlugin_Point::ID())
     aPointAttr = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>
                                            (aFeature->data()->attribute(SketchPlugin_Point::COORD_ID()));
+  else if (aFeature && aFeature->getKind() == SketchPlugin_Circle::ID())
+    aPointAttr = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>
+                                          (aFeature->data()->attribute(SketchPlugin_Circle::CENTER_ID()));
   else {
     if (anAttr->attr())
       aPointAttr = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(anAttr->attr());