Salome HOME
Fixed validators for Boolean and Intersection
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Circle.h
index daf4d2651eacb7d921a8b901271a4757d6331c9f..e183384d83d15b3388c65c5e8c4b57dd2b42cc5b 100644 (file)
@@ -26,6 +26,26 @@ class SketchPlugin_Circle : public SketchPlugin_SketchEntity, public GeomAPI_IPr
     return MY_CIRCLE_ID;
   }
 
+  inline static const std::string& CIRCLE_TYPE()
+  {
+    static const std::string TYPE("CircleType");
+    return TYPE;
+  }
+
+  /// Creation method by center and radius.
+  inline static const std::string& CIRCLE_TYPE_CENTER_AND_RADIUS()
+  {
+    static const std::string TYPE("CenterRadius");
+    return TYPE;
+  }
+
+  /// Creation method by three points.
+  inline static const std::string& CIRCLE_TYPE_THREE_POINTS()
+  {
+    static const std::string TYPE("ThreePoints");
+    return TYPE;
+  }
+
   /// 2D point - center of the circle
   inline static const std::string& CENTER_ID()
   {
@@ -40,6 +60,27 @@ class SketchPlugin_Circle : public SketchPlugin_SketchEntity, public GeomAPI_IPr
     return MY_CIRCLE_RADIUS_ID;
   }
 
+  /// First point id.
+  inline static const std::string& FIRST_POINT_ID()
+  {
+    static const std::string FIRST_PNT("FirstPoint");
+    return FIRST_PNT;
+  }
+
+  /// Second point id.
+  inline static const std::string& SECOND_POINT_ID()
+  {
+    static const std::string SECOND_PNT("SecondPoint");
+    return SECOND_PNT;
+  }
+
+  /// Third point id.
+  inline static const std::string& THIRD_POINT_ID()
+  {
+    static const std::string THIRD_PNT("ThirdPoint");
+    return THIRD_PNT;
+  }
+
   /// Returns the kind of a feature
   SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
   {
@@ -80,6 +121,9 @@ protected:
 private:
   /// Returns true if all obligatory attributes are initialized
   bool isFeatureValid();
+
+  /// Update coordinates of representation by three points
+  void adjustThreePoints();
 };
 
 #endif