]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
refs #80 - Sketch base GUI: create/draw point, circle and arc
authornds <natalia.donis@opencascade.com>
Tue, 10 Jun 2014 14:14:43 +0000 (18:14 +0400)
committernds <natalia.donis@opencascade.com>
Tue, 10 Jun 2014 14:14:43 +0000 (18:14 +0400)
Edit feature: move call for all entities. There are bugs in moving.

13 files changed:
src/PartSet/PartSet_FeatureArcPrs.cpp
src/PartSet/PartSet_FeatureArcPrs.h
src/PartSet/PartSet_FeatureCirclePrs.cpp
src/PartSet/PartSet_FeatureCirclePrs.h
src/PartSet/PartSet_FeatureLinePrs.cpp
src/PartSet/PartSet_FeatureLinePrs.h
src/PartSet/PartSet_FeaturePointPrs.cpp
src/PartSet/PartSet_FeaturePointPrs.h
src/PartSet/PartSet_FeaturePrs.h
src/PartSet/PartSet_OperationEditFeature.cpp
src/PartSet/PartSet_OperationEditFeature.h
src/PartSet/PartSet_Tools.cpp
src/PartSet/PartSet_Tools.h

index b742b64d7b67277691f068384f0a4bf7623f9946..dc9fd82e514ac8430a2f67875a41d564a7020cf6 100644 (file)
@@ -94,6 +94,80 @@ PartSet_SelectionMode PartSet_FeatureArcPrs::getNextMode(const std::string& theA
   return aMode;
 }
 
+void PartSet_FeatureArcPrs::move(double theDeltaX, double theDeltaY)
+{
+  boost::shared_ptr<ModelAPI_Data> aData = feature()->data();
+  if (!aData->isValid())
+    return;
+
+  boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 =
+        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(ARC_ATTR_CENTER));
+  aPoint1->setValue(aPoint1->x() + theDeltaX, aPoint1->y() + theDeltaY);
+
+  boost::shared_ptr<GeomDataAPI_Point2D> aPoint2 =
+        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(ARC_ATTR_START));
+  aPoint2->setValue(aPoint2->x() + theDeltaX, aPoint2->y() + theDeltaY);
+
+  boost::shared_ptr<GeomDataAPI_Point2D> aPoint3 =
+        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(ARC_ATTR_END));
+  aPoint1->setValue(aPoint3->x() + theDeltaX, aPoint3->y() + theDeltaY);
+}
+
+double PartSet_FeatureArcPrs::distanceToPoint(FeaturePtr theFeature,
+                                               double theX, double theY)
+{
+  double aDelta = 0;
+  if (!theFeature || theFeature->getKind() != getKind())
+    return aDelta;
+  boost::shared_ptr<GeomAPI_Pnt2d> aPoint2d(new GeomAPI_Pnt2d(theX, theY));
+
+
+  boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
+
+  boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 =
+        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(ARC_ATTR_CENTER));
+  aDelta = aPoint1->pnt()->distance(aPoint2d);
+
+  boost::shared_ptr<GeomDataAPI_Point2D> aPoint2 =
+        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(ARC_ATTR_START));
+  aDelta = qMin(aDelta, aPoint2->pnt()->distance(aPoint2d));
+
+  boost::shared_ptr<GeomDataAPI_Point2D> aPoint3 =
+        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(ARC_ATTR_END));
+  aDelta = qMin(aDelta, aPoint3->pnt()->distance(aPoint2d));
+
+  return aDelta;
+}
+
+boost::shared_ptr<GeomDataAPI_Point2D> PartSet_FeatureArcPrs::findPoint(FeaturePtr theFeature,
+                                                                        double theX, double theY)
+{
+  boost::shared_ptr<GeomDataAPI_Point2D> aPoint2D;
+  if (!theFeature || theFeature->getKind() != getKind())
+    return aPoint2D;
+
+  boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
+  boost::shared_ptr<GeomDataAPI_Point2D> aPoint =
+        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(ARC_ATTR_CENTER));
+  if (fabs(aPoint->x() - theX) < Precision::Confusion() &&
+      fabs(aPoint->y() - theY) < Precision::Confusion()) {
+    aPoint2D = aPoint;
+  }
+  if (!aPoint2D) {
+    aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(ARC_ATTR_START));
+    if (fabs(aPoint->x() - theX) < Precision::Confusion() &&
+        fabs(aPoint->y() - theY) < Precision::Confusion())
+      aPoint2D = aPoint;
+  }
+  if (!aPoint2D) {
+    aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(ARC_ATTR_END));
+    if (fabs(aPoint->x() - theX) < Precision::Confusion() &&
+        fabs(aPoint->y() - theY) < Precision::Confusion())
+      aPoint2D = aPoint;
+  }
+  return aPoint2D;
+}
+
 void PartSet_FeatureArcPrs::projectPointOnArc(gp_Pnt& thePoint, Handle(V3d_View) theView,
                                               double& theX, double& theY)
 {
index dc8a91bfab93a74d5c7eb3b4addf4c45bebb70b5..80d07e014d1c1c2a3d3b6df87ff771c2ace62bb6 100644 (file)
@@ -54,6 +54,24 @@ public:
   void projectPointOnArc(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<GeomDataAPI_Point2D> 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
index 976d96408fb4bfcc6b85c30a9b9b0c2690f6882b..71bd9721cd1249925c4b50cd036a7ac311b2f194 100644 (file)
@@ -87,6 +87,17 @@ PartSet_SelectionMode PartSet_FeatureCirclePrs::getNextMode(const std::string& t
   return aMode;
 }
 
+void PartSet_FeatureCirclePrs::move(double theDeltaX, double theDeltaY)
+{
+  boost::shared_ptr<ModelAPI_Data> aData = feature()->data();
+  if (!aData->isValid())
+    return;
+
+  boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 =
+        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(CIRCLE_ATTR_CENTER));
+  aPoint1->setValue(aPoint1->x() + theDeltaX, aPoint1->y() + theDeltaY);
+}
+
 double PartSet_FeatureCirclePrs::distanceToPoint(FeaturePtr theFeature,
                                                  double theX, double theY)
 {
index d75584d33bd65057a513d966ae648957415cfd87..72a3d48553c3870a1b191053b54d39e3c0b493c6 100644 (file)
@@ -48,18 +48,23 @@ public:
   /// \return next attribute selection mode
   virtual PartSet_SelectionMode getNextMode(const std::string& theAttribute) const;
 
+  /// \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
-  static double distanceToPoint(FeaturePtr theFeature, double theX, double theY);
+  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
-  static boost::shared_ptr<GeomDataAPI_Point2D> findPoint(FeaturePtr theFeature, double theX,
-                                                          double theY);
+  virtual boost::shared_ptr<GeomDataAPI_Point2D> 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
index 53aa6befb1d4f36d48572ed5a140214a3607ae4a..54af4c9737b90afa6240782dee35da4360d765ac 100644 (file)
@@ -102,6 +102,21 @@ PartSet_SelectionMode PartSet_FeatureLinePrs::getNextMode(const std::string& the
   return aMode;
 }
 
+void PartSet_FeatureLinePrs::move(double theDeltaX, double theDeltaY)
+{
+  boost::shared_ptr<ModelAPI_Data> aData = feature()->data();
+  if (!aData->isValid())
+    return;
+
+  boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 =
+        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(LINE_ATTR_START));
+  aPoint1->setValue(aPoint1->x() + theDeltaX, aPoint1->y() + theDeltaY);
+
+  boost::shared_ptr<GeomDataAPI_Point2D> aPoint2 =
+        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(LINE_ATTR_END));
+  aPoint2->setValue(aPoint2->x() + theDeltaX, aPoint2->y() + theDeltaY);
+}
+
 void PartSet_FeatureLinePrs::projectPointOnLine(FeaturePtr theFeature,
                                                 const PartSet_SelectionMode& theMode,
                                                 const gp_Pnt& thePoint, Handle(V3d_View) theView,
@@ -133,7 +148,7 @@ double PartSet_FeatureLinePrs::distanceToPoint(FeaturePtr theFeature,
                                       double theX, double theY)
 {
   double aDelta = 0;
-  if (!theFeature || theFeature->getKind() != SKETCH_LINE_KIND)
+  if (!theFeature || theFeature->getKind() != getKind())
     return aDelta;
 
   boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
@@ -153,12 +168,10 @@ boost::shared_ptr<GeomDataAPI_Point2D> PartSet_FeatureLinePrs::findPoint(Feature
                                                                          double theX, double theY)
 {
   boost::shared_ptr<GeomDataAPI_Point2D> aPoint2D;
-  if (!theFeature || theFeature->getKind() != SKETCH_LINE_KIND)
+  if (!theFeature || theFeature->getKind() != getKind())
     return aPoint2D;
 
   boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
-  aPoint2D = PartSet_FeatureLinePrs::findPoint(theFeature, theX, theY);
-
   boost::shared_ptr<GeomDataAPI_Point2D> aPoint =
         boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(LINE_ATTR_START));
   if (fabs(aPoint->x() - theX) < Precision::Confusion() &&
index b34e66c01de10222edbb0df267880b46ff4f3da3..08ccc3837adeabee3cf33bb39a3940a034243c88 100644 (file)
@@ -51,6 +51,10 @@ public:
   /// \return next attribute selection mode
   virtual PartSet_SelectionMode getNextMode(const std::string& theAttribute) const;
 
+  /// \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);
 
   /// Project the point on a feature
   /// \param theFeature the feature to be projected on
@@ -67,14 +71,14 @@ public:
   /// \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);
+  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
-  static boost::shared_ptr<GeomDataAPI_Point2D> findPoint(FeaturePtr theFeature, double theX,
-                                                          double theY);
+  virtual boost::shared_ptr<GeomDataAPI_Point2D> findPoint(FeaturePtr theFeature, double theX,
+                                                           double theY);
 
 protected:
   /// Initializes current feature by the given
index 569c771e03475e638cbd9fa5f2aead9ae5022da7..df9c76bc9fdcfca4aa56bf1e0918765072fce28d 100644 (file)
@@ -71,6 +71,17 @@ PartSet_SelectionMode PartSet_FeaturePointPrs::getNextMode(const std::string& th
   return aMode;
 }
 
+void PartSet_FeaturePointPrs::move(double theDeltaX, double theDeltaY)
+{
+  boost::shared_ptr<ModelAPI_Data> aData = feature()->data();
+  if (!aData->isValid())
+    return;
+
+  boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 =
+        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(POINT_ATTR_COORD));
+  aPoint1->setValue(aPoint1->x() + theDeltaX, aPoint1->y() + theDeltaY);
+}
+
 double PartSet_FeaturePointPrs::distanceToPoint(FeaturePtr theFeature,
                                                 double theX, double theY)
 {
index b07bc1c380cf0f4a82e4e32c97bdab9a5cc8410a..f0962585e2483625e0dfccddc1dcd03ffe112e7f 100644 (file)
@@ -48,17 +48,22 @@ public:
   /// \return next attribute selection mode
   virtual PartSet_SelectionMode getNextMode(const std::string& theAttribute) const;
 
+  /// \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
-  static double distanceToPoint(FeaturePtr theFeature, double theX, double theY);
+  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
-  static boost::shared_ptr<GeomDataAPI_Point2D> findPoint(FeaturePtr theFeature, double theX,
+  virtual boost::shared_ptr<GeomDataAPI_Point2D> findPoint(FeaturePtr theFeature, double theX,
                                                           double theY);
 
 protected:
index bf965ed8de53ba80e95366344c412808707ad884..6ba12c6d8630a711424c1286f55f501f056da41b 100644 (file)
@@ -53,6 +53,24 @@ public:
   /// \return next attribute selection mode
   virtual PartSet_SelectionMode getNextMode(const std::string& theAttribute) const = 0;
 
+  /// \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) = 0;
+
+  /// 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) = 0;
+
+  /// 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<GeomDataAPI_Point2D> findPoint(FeaturePtr theFeature, double theX,
+                                                           double theY) = 0;
+
   /// Creates constrains of the current 
   /// \param theX the horizontal coordnate of the point
   /// \param theY the vertical coordnate of the point
index 092df06049e7bd8dcff86d1785e8b982b579b7e1..fb86907205b2a34de9402a75f8a147e4428a2cf4 100644 (file)
@@ -132,16 +132,14 @@ void PartSet_OperationEditFeature::mouseMoved(QMouseEvent* theEvent, Handle(V3d_
     double aDeltaX = aX - aCurX;
     double aDeltaY = anY - aCurY;
 
-    moveLinePoint(feature(), aDeltaX, aDeltaY, LINE_ATTR_START);
-    moveLinePoint(feature(), aDeltaX, aDeltaY, LINE_ATTR_END);
+    PartSet_Tools::moveFeature(feature(), aDeltaX, aDeltaY);
 
     std::list<XGUI_ViewerPrs>::const_iterator anIt = myFeatures.begin(), aLast = myFeatures.end();
     for (; anIt != aLast; anIt++) {
       FeaturePtr aFeature = (*anIt).feature();
       if (!aFeature || aFeature == feature())
         continue;
-      moveLinePoint(aFeature, aDeltaX, aDeltaY, LINE_ATTR_START);
-      moveLinePoint(aFeature, aDeltaX, aDeltaY, LINE_ATTR_END);
+      PartSet_Tools::moveFeature(aFeature, aDeltaX, aDeltaY);
     }
   }
   sendFeatures();
@@ -211,22 +209,6 @@ FeaturePtr PartSet_OperationEditFeature::createFeature(const bool /*theFlushMess
   return FeaturePtr();
 }
 
-void PartSet_OperationEditFeature::moveLinePoint(FeaturePtr theFeature,
-                                               double theDeltaX, double theDeltaY,
-                                               const std::string& theAttribute)
-{
-  if (!theFeature || theFeature->getKind() != SKETCH_LINE_KIND)
-    return;
-
-  boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
-  if (!aData->isValid())
-    return;
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint =
-        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(theAttribute));
-
-  aPoint->setValue(aPoint->x() + theDeltaX, aPoint->y() + theDeltaY);
-}
-
 void PartSet_OperationEditFeature::sendFeatures()
 {
   static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_MOVED);
index b3f5f8ee9a626742693d1ef90c620470b33e851d..c817fc1ab798a49df0dd86cc29d648e9d04405c3 100644 (file)
@@ -126,14 +126,6 @@ protected:
   /// \param isRestoreSelection the state whether the selected objects should be reselected
   void blockSelection(bool isBlocked, const bool isRestoreSelection = true);
 
-  /// \brief Save the point to the line.
-  /// \param theFeature the source feature
-  /// \param theDeltaX the delta for X coordinate is moved
-  /// \param theDeltaY the delta for Y coordinate is moved
-  /// \param theAttribute the start or end attribute of the line
-  void  moveLinePoint(FeaturePtr theFeature,
-                      double theDeltaX, double theDeltaY,
-                      const std::string& theAttribute);
   /// Sends the features
   void sendFeatures();
 
index bc73da323c6f1de6ecb374c0e16b759164b440a0..3cfa835db921703800889a8d995ff0aaeab7cb67 100644 (file)
@@ -229,21 +229,26 @@ FeaturePtr PartSet_Tools::nearestFeature(QPoint thePoint, Handle_V3d_View theVie
 double PartSet_Tools::distanceToPoint(FeaturePtr theFeature,
                                       double theX, double theY)
 {
+  boost::shared_ptr<PartSet_FeaturePrs> aFeaturePrs = PartSet_Tools::createFeaturePrs(
+                                           theFeature->getKind(), FeaturePtr(), theFeature);
   double aDelta = 0;
-  std::string aKind = theFeature->getKind();
-  if (aKind == PartSet_FeatureLinePrs::getKind()) {
-    aDelta = PartSet_FeatureLinePrs::distanceToPoint(theFeature, theX, theY);
-  }
-  else if (aKind == PartSet_FeaturePointPrs::getKind()) {
-    aDelta = PartSet_FeaturePointPrs::distanceToPoint(theFeature, theX, theY);
-  }
-  else if (aKind == PartSet_FeatureCirclePrs::getKind()) {
-    aDelta = PartSet_FeatureCirclePrs::distanceToPoint(theFeature, theX, theY);
-  }
+  if (aFeaturePrs)
+    aDelta = aFeaturePrs->distanceToPoint(theFeature, theX, theY);
 
   return aDelta;
 }
 
+void PartSet_Tools::moveFeature(FeaturePtr theFeature, double theDeltaX, double theDeltaY)
+{
+  if (!theFeature)
+    return;
+
+  boost::shared_ptr<PartSet_FeaturePrs> aFeaturePrs = PartSet_Tools::createFeaturePrs(
+                                           theFeature->getKind(), FeaturePtr(), theFeature);
+  if (aFeaturePrs)
+  aFeaturePrs->move(theDeltaX, theDeltaY);
+}
+
 boost::shared_ptr<ModelAPI_Document> PartSet_Tools::document()
 {
   return ModelAPI_PluginManager::get()->rootDocument();
@@ -303,20 +308,12 @@ void PartSet_Tools::createConstraint(FeaturePtr theSketch,
 boost::shared_ptr<GeomDataAPI_Point2D> PartSet_Tools::findPoint(FeaturePtr theFeature,
                                                                 double theX, double theY)
 {
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint2D;
-  if (!theFeature)
-    return aPoint2D;
+  boost::shared_ptr<PartSet_FeaturePrs> aFeaturePrs = PartSet_Tools::createFeaturePrs(
+                                           theFeature->getKind(), FeaturePtr(), theFeature);
 
-  std::string aKind = theFeature->getKind();
-  if (aKind == PartSet_FeatureLinePrs::getKind()) {
-    aPoint2D = PartSet_FeatureLinePrs::findPoint(theFeature, theX, theY);
-  }
-  else if (aKind == PartSet_FeaturePointPrs::getKind()) {
-    aPoint2D = PartSet_FeaturePointPrs::findPoint(theFeature, theX, theY);
-  }
-  else if (aKind == PartSet_FeatureCirclePrs::getKind()) {
-    aPoint2D = PartSet_FeatureCirclePrs::findPoint(theFeature, theX, theY);
-  }
+  boost::shared_ptr<GeomDataAPI_Point2D> aPoint2D;
+  if (aFeaturePrs)
+    aPoint2D = aFeaturePrs->findPoint(theFeature, theX, theY);
 
   return aPoint2D;
 }
index 4dd228226bf3fb886c7e1319e90f1b8be01dc38a..fff206b6f166b4da4d9bc475607f467180b87310 100644 (file)
@@ -84,7 +84,6 @@ public:
                                                                 FeaturePtr theSketch,
                                                                 FeaturePtr theFeature = FeaturePtr());
 
-
   /// Returns a feature that is under the mouse point
   /// \param thePoint a screen point
   /// \param theView a 3D view
@@ -93,6 +92,12 @@ public:
   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);
+
   /// Returns pointer to the root document.
   static boost::shared_ptr<ModelAPI_Document> document();