Salome HOME
Fixed too long line
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintMovement.h
index f25bbb0afff880325d2e95e1a5b29a7bc08fafa6..05edaa814f3fe52b758b6c8e11a13bd985a58693 100644 (file)
@@ -1,4 +1,21 @@
-// Copyright (C) 2015-20xx CEA/DEN, EDF R&D
+// Copyright (C) 2017-2020  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 // File:    SketchSolver_ConstraintMovement.h
 // Created: 15 Jun 2015
@@ -22,7 +39,7 @@ public:
   SketchSolver_ConstraintMovement(FeaturePtr theFeature);
 
   /// Creates movement constraint based on point
-  SketchSolver_ConstraintMovement(AttributePtr thePoint);
+  SketchSolver_ConstraintMovement(AttributePtr theMovedAttribute, const int thePointIndex = -1);
 
   /// \brief Set coordinates of the start point of the movement
   void startPoint(const std::shared_ptr<GeomAPI_Pnt2d>& theStartPoint);
@@ -49,12 +66,16 @@ protected:
   /// \brief Create constraint to fix moved arc extremity
   ConstraintWrapperPtr fixArcExtremity(const EntityWrapperPtr& theArcExtremity);
 
-  /// \brief Creat constraint to fix moved point on circle/arc
+  /// \brief Create constraint to fix moved point on circle/arc
   ConstraintWrapperPtr fixPointOnCircle(const EntityWrapperPtr& theCircular);
 
+  /// \brief Create constraint to fix moved point on ellipse/elliptic arc
+  ConstraintWrapperPtr fixPointOnEllipse(const EntityWrapperPtr& theConic);
+
 private:
   FeaturePtr       myMovedFeature; ///< fixed feature (if set, myBaseConstraint should be NULL)
-  AttributePtr     myDraggedPoint; ///< one of the feature points which has been moved
+  AttributePtr     myDraggedAttribute; ///< one of the feature points which has been moved
+  int              myDraggedPointIndex; ///< index of the point if the moved attribute is an array
   std::shared_ptr<GeomAPI_Pnt2d> myStartPoint; ///< start point of the movement
 
   bool mySimpleMove; ///< simple move, thus all parameters should be increased by movement delta