]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/SketchPlugin_ConstraintLength.h
Salome HOME
Values of constraint (length, distance, radius) now initialized on reference definition
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintLength.h
index 5f3ae9aae121173e9897dbf8268c5bd2f178c845..9cdd7e153fce2a676989ee9239862733e75583d5 100644 (file)
@@ -10,6 +10,8 @@
 #include <SketchPlugin_Sketch.h>
 #include <list>
 
+class GeomDataAPI_Point2D;
+
 #define LENGTH_COLOR "#ff00ff"
 
 /** \class SketchPlugin_ConstraintLength
@@ -50,8 +52,19 @@ class SketchPlugin_ConstraintLength : public SketchPlugin_ConstraintBase
   /// \param theDeltaY the delta for Y coordinate is moved
   SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY);
 
+  /// Called on change of any argument-attribute of this object
+  /// \param theID identifier of changed attribute
+  SKETCHPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
+
   /// \brief Use plugin manager for features creation
   SketchPlugin_ConstraintLength();
+
+private:
+  // retrns the points-base of length, returns false if it is not possible
+  bool getPoints(
+    std::shared_ptr<GeomAPI_Pnt>& thePoint1, std::shared_ptr<GeomAPI_Pnt>& thePoint2,
+    std::shared_ptr<GeomDataAPI_Point2D>& theStartPoint,
+    std::shared_ptr<GeomDataAPI_Point2D>& theEndPoint);
 };
 
 #endif