24 #ifndef SketchSolver_ConstraintMovement_H_
25 #define SketchSolver_ConstraintMovement_H_
27 #include <SketchSolver_ConstraintFixed.h>
45 void startPoint(
const std::shared_ptr<GeomAPI_Pnt2d>& theStartPoint);
49 void moveTo(
const std::shared_ptr<GeomAPI_Pnt2d>& theDestinationPoint);
56 {
return myMovedFeature; }
67 ConstraintWrapperPtr
fixArcExtremity(
const EntityWrapperPtr& theArcExtremity);
76 FeaturePtr myMovedFeature;
77 AttributePtr myDraggedAttribute;
78 int myDraggedPointIndex;
79 std::shared_ptr<GeomAPI_Pnt2d> myStartPoint;
2D point defined by two coordinates
Definition: GeomAPI_Pnt2d.h:36
Stores data of the Fixed constraint.
Definition: SketchSolver_ConstraintFixed.h:30
Stores data to the Fixed constraint for the moved feature only.
Definition: SketchSolver_ConstraintMovement.h:36
ConstraintWrapperPtr fixArcExtremity(const EntityWrapperPtr &theArcExtremity)
Create constraint to fix moved arc extremity.
Definition: SketchSolver_ConstraintMovement.cpp:156
virtual void blockEvents(bool isBlocked)
Block or unblock events from this constraint.
Definition: SketchSolver_ConstraintMovement.cpp:67
SketchSolver_ConstraintMovement(FeaturePtr theFeature)
Creates movement constraint based on feature.
Definition: SketchSolver_ConstraintMovement.cpp:50
void startPoint(const std::shared_ptr< GeomAPI_Pnt2d > &theStartPoint)
Set coordinates of the start point of the movement.
Definition: SketchSolver_ConstraintMovement.cpp:300
ConstraintWrapperPtr fixPointOnCircle(const EntityWrapperPtr &theCircular)
Create constraint to fix moved point on circle/arc.
Definition: SketchSolver_ConstraintMovement.cpp:194
void moveTo(const std::shared_ptr< GeomAPI_Pnt2d > &theDestinationPoint)
Set coordinates of fixed feature to the values where it has been dragged.
Definition: SketchSolver_ConstraintMovement.cpp:310
ConstraintWrapperPtr fixPointOnEllipse(const EntityWrapperPtr &theConic)
Create constraint to fix moved point on ellipse/elliptic arc.
Definition: SketchSolver_ConstraintMovement.cpp:236
virtual void process()
Converts SketchPlugin constraint to a list of SolveSpace constraints.
Definition: SketchSolver_ConstraintMovement.cpp:73
FeaturePtr movedFeature() const
Returns moved feature.
Definition: SketchSolver_ConstraintMovement.h:55
ConstraintWrapperPtr initMovement()
Create Fixed constraint for the feature basing on its type and moved point.
Definition: SketchSolver_ConstraintMovement.cpp:109