X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Constraint.h;h=632243ba608557cc11ea325f61724794fde566ce;hb=5e79a0b847d0a3e650703ebf112beefbfda4e153;hp=08dc621c70cc342be1b7be4df2dc41dba79a3dd9;hpb=b088ac567eda79830c071c32443896ad59d56628;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Constraint.h b/src/SketchPlugin/SketchPlugin_Constraint.h index 08dc621c7..632243ba6 100644 --- a/src/SketchPlugin/SketchPlugin_Constraint.h +++ b/src/SketchPlugin/SketchPlugin_Constraint.h @@ -12,6 +12,10 @@ #include #include +const int CONSTRAINT_TEXT_HEIGHT = 28; /// the text height of the constraint +const int CONSTRAINT_TEXT_SELECTION_TOLERANCE = 20; /// the text selection tolerance + + /* Description: * Each constraint uses a set of parameters. In the SolveSpace library * these parameters are named "valA", "ptA", "ptB", "entityA", "entityB". @@ -26,8 +30,8 @@ */ /// The value parameter for the constraint const std::string CONSTRAINT_ATTR_VALUE("ConstraintValue"); -/// The value parameter for the constraint -const std::string CONSTRAINT_ATTR_FLYOUT_VALUE("ConstraintFlyoutValue"); +/// The 2D value parameter for the constraint +const std::string CONSTRAINT_ATTR_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt"); /// First entity for the constraint const std::string CONSTRAINT_ATTR_ENTITY_A("ConstraintEntityA"); /// Second entity for the constraint @@ -61,6 +65,21 @@ public: SKETCHPLUGIN_EXPORT virtual const void addSub( const FeaturePtr& theFeature) {} + /// \brief Returns the sketch preview + SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr& preview(); + + /// Returns the AIS preview + SKETCHPLUGIN_EXPORT virtual Handle_AIS_InteractiveObject getAISShape(Handle_AIS_InteractiveObject thePrevious); + + /// Moves the feature + /// \param theDeltaX the delta for X coordinate is moved + /// \param theDeltaY the delta for Y coordinate is moved + SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY) {}; + + /// Return the distance between the feature and the point + /// \param thePoint the point + virtual double distanceToPoint(const boost::shared_ptr& thePoint) { return 0; }; + protected: /// \brief Use plugin manager for features creation SketchPlugin_Constraint() {}