X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_FeatureArcPrs.h;h=b06e0882bb080e0c232b2280f537d90f6719dfab;hb=258a626d26271b93bae55eb0803de020e2b6f315;hp=ea25b971f2332b69aee18d245edb6a233f92806d;hpb=575552af0d56b268d9cdd1ddd423365f99b95d77;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_FeatureArcPrs.h b/src/PartSet/PartSet_FeatureArcPrs.h index ea25b971f..b06e0882b 100644 --- a/src/PartSet/PartSet_FeatureArcPrs.h +++ b/src/PartSet/PartSet_FeatureArcPrs.h @@ -10,7 +10,10 @@ #include "PartSet_FeaturePrs.h" #include "PartSet_Constants.h" +#include + class GeomDataAPI_Point2D; +class Handle_V3d_View; /*! \class PartSet_FeatureArcPrs @@ -21,6 +24,10 @@ class GeomDataAPI_Point2D; class PARTSET_EXPORT PartSet_FeatureArcPrs : public PartSet_FeaturePrs { public: + /// Returns the feature type processed by this presentation + /// \return the feature kind + static std::string getKind(); + /// Constructor /// \param theSketch the sketch feature PartSet_FeatureArcPrs(FeaturePtr theSketch); @@ -44,6 +51,34 @@ public: /// \return next attribute selection mode virtual PartSet_SelectionMode getNextMode(const std::string& theAttribute) const; + /// Project the view point on the feature. The output coordinates belong to the feature + /// \param theFeature a feature + /// \param theSketch the sketch feature + /// \param thePoint a viewer point + /// \param theView the OCC view + /// \theX the output horizontal coordinate of a projected point + /// \theY the output vertical coordinate of a projected point + static void projectPointOnFeature(FeaturePtr theFeature, FeaturePtr theSketch, gp_Pnt& thePoint, + Handle_V3d_View theView, double& theX, double& theY); + + /// \brief Move the full feature. + /// \param theDeltaX the delta for X coordinate is moved + /// \param theDeltaY the delta for Y coordinate is moved + virtual void move(double theDeltaX, double theDeltaY); + + /// Return the distance between the feature and the point + /// \param theFeature feature object + /// \param theX the horizontal coordinate of the point + /// \param theX the vertical coordinate of the point + virtual double distanceToPoint(FeaturePtr theFeature, double theX, double theY); + + /// Find a point in the line with given coordinates + /// \param theFeature the line feature + /// \param theX the horizontal point coordinate + /// \param theY the vertical point coordinate + virtual boost::shared_ptr findPoint(FeaturePtr theFeature, double theX, + double theY); + protected: /// Returns the feature point in the selection mode position. /// \param theMode the current operation selection mode. The feature attribute depends on the mode