SHAPER
9.12.0
|
Stores data to the Fixed constraint for the moved feature only. More...
Public Member Functions | |
SketchSolver_ConstraintMovement (FeaturePtr theFeature) | |
Creates movement constraint based on feature. More... | |
SketchSolver_ConstraintMovement (AttributePtr theMovedAttribute, const int thePointIndex=-1) | |
Creates movement constraint based on point. More... | |
void | startPoint (const std::shared_ptr< GeomAPI_Pnt2d > &theStartPoint) |
Set coordinates of the start point of the movement. More... | |
void | moveTo (const std::shared_ptr< GeomAPI_Pnt2d > &theDestinationPoint) |
Set coordinates of fixed feature to the values where it has been dragged. More... | |
virtual void | blockEvents (bool isBlocked) |
Block or unblock events from this constraint. More... | |
FeaturePtr | movedFeature () const |
Returns moved feature. More... | |
void | process (StoragePtr theStorage, bool theEvensBlocked) |
Initializes parameters and start constraint creation. More... | |
virtual void | notify (const FeaturePtr &theFeature, PlaneGCSSolver_Update *theUpdater) |
Notify this object about the feature is changed somewhere. More... | |
virtual void | update () |
Update constraint. More... | |
virtual bool | remove () |
Tries to remove constraint. More... | |
virtual SketchSolver_ConstraintType | getType () const |
Returns the type of constraint. More... | |
const std::string & | error () const |
Shows error message. More... | |
Static Public Member Functions | |
static SketchSolver_ConstraintType | TYPE (ConstraintPtr theConstraint) |
Obtain a type of SketchPlugin constraint. More... | |
Protected Member Functions | |
virtual void | process () |
Converts SketchPlugin constraint to a list of SolveSpace constraints. More... | |
ConstraintWrapperPtr | initMovement () |
Create Fixed constraint for the feature basing on its type and moved point. More... | |
ConstraintWrapperPtr | fixArcExtremity (const EntityWrapperPtr &theArcExtremity) |
Create constraint to fix moved arc extremity. More... | |
ConstraintWrapperPtr | fixPointOnCircle (const EntityWrapperPtr &theCircular) |
Create constraint to fix moved point on circle/arc. More... | |
ConstraintWrapperPtr | fixPointOnEllipse (const EntityWrapperPtr &theConic) |
Create constraint to fix moved point on ellipse/elliptic arc. More... | |
virtual void | getAttributes (EntityWrapperPtr &, std::vector< EntityWrapperPtr > &) |
Generate list of attributes of constraint in order useful for constraints. More... | |
EntityWrapperPtr | entityToFix () |
Obtain entity to be fixed. More... | |
ConstraintWrapperPtr | fixFeature (EntityWrapperPtr theFeature) |
Create Fixed constraint for the feature basing on its type. More... | |
virtual void | adjustConstraint () |
This method is used in derived objects to check consistency of constraint. More... | |
void | cleanErrorMsg () |
Removes last error. More... | |
Protected Attributes | |
std::vector< double > | myFixedValues |
ConstraintPtr | myBaseConstraint |
base SketchPlugin constraint More... | |
ConstraintWrapperPtr | mySolverConstraint |
wrapper for PlaneGCS constraint More... | |
StoragePtr | myStorage |
storage, which contains all information about entities and constraints More... | |
SketchSolver_ConstraintType | myType |
type of constraint More... | |
std::list< EntityWrapperPtr > | myAttributes |
attributes of constraint More... | |
std::string | myErrorMsg |
error message More... | |
Stores data to the Fixed constraint for the moved feature only.
SketchSolver_ConstraintMovement::SketchSolver_ConstraintMovement | ( | FeaturePtr | theFeature | ) |
Creates movement constraint based on feature.
SketchSolver_ConstraintMovement::SketchSolver_ConstraintMovement | ( | AttributePtr | theMovedAttribute, |
const int | thePointIndex = -1 |
||
) |
Creates movement constraint based on point.
void SketchSolver_ConstraintMovement::startPoint | ( | const std::shared_ptr< GeomAPI_Pnt2d > & | theStartPoint | ) |
Set coordinates of the start point of the movement.
void SketchSolver_ConstraintMovement::moveTo | ( | const std::shared_ptr< GeomAPI_Pnt2d > & | theDestinationPoint | ) |
Set coordinates of fixed feature to the values where it has been dragged.
Useful when the feature is being moved.
|
virtual |
Block or unblock events from this constraint.
Reimplemented from SketchSolver_ConstraintFixed.
|
inline |
Returns moved feature.
|
protectedvirtual |
Converts SketchPlugin constraint to a list of SolveSpace constraints.
Reimplemented from SketchSolver_ConstraintFixed.
|
protected |
Create Fixed constraint for the feature basing on its type and moved point.
|
protected |
Create constraint to fix moved arc extremity.
|
protected |
Create constraint to fix moved point on circle/arc.
|
protected |
Create constraint to fix moved point on ellipse/elliptic arc.
|
inherited |
Initializes parameters and start constraint creation.
theStorage | [in] storage where to place new constraint |
theEventsBlocked | [in] all events from this constraint should be blocked |
|
inlineprotectedvirtualinherited |
Generate list of attributes of constraint in order useful for constraints.
[out] | theValue | numerical characteristic of constraint (e.g. distance) |
[out] | theAttributes | list of attributes to be filled |
Reimplemented from SketchSolver_Constraint.
|
protectedinherited |
Obtain entity to be fixed.
|
protectedinherited |
Create Fixed constraint for the feature basing on its type.
theFeature | [in] feature, converted to solver specific format |
|
inlinevirtualinherited |
Notify this object about the feature is changed somewhere.
Reimplemented in SketchSolver_ConstraintTangent, SketchSolver_ConstraintPerpendicular, SketchSolver_ConstraintMiddle, SketchSolver_ConstraintCollinear, SketchSolver_ConstraintCoincidence, SketchSolver_ConstraintMulti, SketchSolver_ConstraintMirror, and SketchSolver_ConstraintDistance.
|
virtualinherited |
Update constraint.
Reimplemented in SketchSolver_ConstraintOffset, SketchSolver_ConstraintMulti, SketchSolver_ConstraintMirror, and SketchSolver_ConstraintDistance.
|
virtualinherited |
Tries to remove constraint.
false
, if current constraint contains another SketchPlugin constraints (like for multiple coincidence) Reimplemented in SketchSolver_ConstraintTangent, SketchSolver_ConstraintMulti, SketchSolver_ConstraintMiddle, SketchSolver_ConstraintEqual, SketchSolver_ConstraintDistance, and SketchSolver_ConstraintCoincidence.
|
staticinherited |
Obtain a type of SketchPlugin constraint.
|
inlinevirtualinherited |
Returns the type of constraint.
|
inlineinherited |
Shows error message.
|
inlineprotectedvirtualinherited |
This method is used in derived objects to check consistency of constraint.
E.g. the distance between line and point may be signed.
Reimplemented in SketchSolver_ConstraintTangent, SketchSolver_ConstraintMultiTranslation, SketchSolver_ConstraintMultiRotation, SketchSolver_ConstraintMulti, SketchSolver_ConstraintMirror, SketchSolver_ConstraintDistance, SketchSolver_ConstraintCoincidence, and SketchSolver_ConstraintAngle.
|
inlineprotectedinherited |
Removes last error.
|
protectedinherited |
base SketchPlugin constraint
|
protectedinherited |
wrapper for PlaneGCS constraint
|
protectedinherited |
storage, which contains all information about entities and constraints
|
protectedinherited |
type of constraint
|
protectedinherited |
attributes of constraint
|
protectedinherited |
error message