Salome HOME
Create selection validator and selection object
[modules/shaper.git] / src / PartSet / PartSet_Tools.h
index 7b81b3f10015e3c7e444d50cd9ed490759c5647a..1cd763ca0e9af86623bf246e7b675d7dfd61afc1 100644 (file)
 #include <list>
 
 class Handle_V3d_View;
-class XGUI_ViewerPrs;
+class ModuleBase_ViewerPrs;
 class GeomDataAPI_Point2D;
 class GeomAPI_Pln;
 class GeomAPI_Pnt2d;
 class GeomAPI_Pnt;
-class PartSet_FeaturePrs;
 
 /*!
  \class PartSet_Tools
@@ -53,27 +52,13 @@ public:
   static void convertTo3D(const double theX, const double theY, FeaturePtr theSketch,
                           gp_Pnt& thePoint);
 
-  /// Creates the feature presentation
-  /// \param theKind a feature kind
-  /// \param theSketch the sketch of the feature
-  /// \param theFeature the feature
-  static boost::shared_ptr<PartSet_FeaturePrs> createFeaturePrs(const std::string& theKind,
-                                                                FeaturePtr theSketch,
-                                                                FeaturePtr theFeature = FeaturePtr());
-
   /// Returns a feature that is under the mouse point
   /// \param thePoint a screen point
   /// \param theView a 3D view
   /// \param theSketch the sketch feature
   /// \param theFeatures the list of selected presentations
   static FeaturePtr nearestFeature(QPoint thePoint, Handle_V3d_View theView, FeaturePtr theSketch,
-                                   const std::list<XGUI_ViewerPrs>& theFeatures);
-
-  /// \brief Move the feature.
-  /// \param theFeature the source feature
-  /// \param theDeltaX the delta for X coordinate is moved
-  /// \param theDeltaY the delta for Y coordinate is moved
-  static void moveFeature(FeaturePtr theFeature, double theDeltaX, double theDeltaY);
+                                   const std::list<ModuleBase_ViewerPrs>& theFeatures);
 
   /// Returns pointer to the root document.
   static boost::shared_ptr<ModelAPI_Document> document();
@@ -116,12 +101,14 @@ public:
                                boost::shared_ptr<GeomDataAPI_Point2D> thePoint1,
                                boost::shared_ptr<GeomDataAPI_Point2D> thePoint2);
 
-  /// 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
-  static boost::shared_ptr<GeomDataAPI_Point2D> findPoint(FeaturePtr theFeature, double theX,
-                                                          double theY);
+  /// Creates constrains of the current 
+  /// \param theSketch a sketch feature
+  /// \param theFeature a source feature
+  /// \param theAttribute a name of the requried attribute attribute
+  /// \param theClickedX the horizontal coordnate of the point
+  /// \param theClickedY the vertical coordnate of the point
+  static void setConstraints(FeaturePtr theSketch, FeaturePtr theFeature,
+                             const std::string& theAttribute, double theClickedX, double theClickedY);
 
   /// Create a sketch plane instance
   /// \param theSketch a sketch feature
@@ -138,13 +125,6 @@ public:
   /// \param theKind a feature kind
   /// \return the boolean value
   static bool isConstraintFeature(const std::string& theKind);
-
-private:
-  /// 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
-  static double distanceToPoint(FeaturePtr theFeature, double theX, double theY);
 };
 
 #endif