Salome HOME
bos#35152 [EDF] (2023-T1) Sketch Circle should allow user to position construction...
[modules/shaper.git] / src / SketchAPI / SketchAPI_Circle.h
index dcc58c7153b8aadcfc5a718f10feebd0f4909b74..96744ebf5cf42fe0f9c8e594611fa003e70e0d4d 100644 (file)
@@ -42,13 +42,15 @@ public:
   SketchAPI_Circle(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                    double theCenterX,
                    double theCenterY,
-                   double theRadius);
+                   double theRadius,
+                   double theAngle);
 
   /// Constructor with values.
   SKETCHAPI_EXPORT
   SketchAPI_Circle(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                    const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
-                   double theRadius);
+                   double theRadius,
+                   double theAngle);
 
   /// Constructor with values.
   SKETCHAPI_EXPORT
@@ -64,21 +66,25 @@ public:
   SKETCHAPI_EXPORT
   virtual ~SketchAPI_Circle();
 
-  INTERFACE_3(SketchPlugin_Circle::ID(),
+  INTERFACE_4(SketchPlugin_Circle::ID(),
               center, SketchPlugin_Circle::CENTER_ID(),
               GeomDataAPI_Point2D, /** Center point */,
               radius, SketchPlugin_Circle::RADIUS_ID(),
               ModelAPI_AttributeDouble, /** Radius */,
               external, SketchPlugin_Circle::EXTERNAL_ID(),
-              ModelAPI_AttributeSelection, /** External */)
+              ModelAPI_AttributeSelection, /** External */,
+              angle, SketchPlugin_Circle::ANGLE_ID(),
+              ModelAPI_AttributeDouble, /** Angle */)
 
   /// Set by center and radius.
   SKETCHAPI_EXPORT
-  void setByCenterAndRadius(double theCenterX, double theCenterY, double theRadius);
+  void setByCenterAndRadius(double theCenterX, double theCenterY,
+                            double theRadius, double theAngle);
 
   /// Set by center and radius.
   SKETCHAPI_EXPORT
-  void setByCenterAndRadius(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter, double theRadius);
+  void setByCenterAndRadius(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
+                            double theRadius, double theAngle);
 
   /// Set by external.
   SKETCHAPI_EXPORT
@@ -100,9 +106,20 @@ public:
   SKETCHAPI_EXPORT
   void setRadius(double theRadius);
 
+  /// Set angle.
+  SKETCHAPI_EXPORT
+  void setAngle(double theAngle);
+
+  /// Returns created points on circle
+  SKETCHAPI_EXPORT
+  std::shared_ptr<SketchAPI_SketchEntity> createdPoint() const;
+
   /// Dump wrapped feature
   SKETCHAPI_EXPORT
   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
+
+private:
+  void createPoint();
 };
 
 /// Pointer on Circle object.