SHAPER  9.12.0
SketchSolver_ConstraintMiddle Class Reference

Converts middle-point constraint to the constraint applicable for solver. More...

Inheritance diagram for SketchSolver_ConstraintMiddle:
Inheritance graph

Public Member Functions

 SketchSolver_ConstraintMiddle (ConstraintPtr theConstraint)
 Constructor based on SketchPlugin constraint. More...
 
virtual void notify (const FeaturePtr &theFeature, PlaneGCSSolver_Update *theUpdater)
 Notify this object about the feature is changed somewhere. More...
 
virtual bool remove ()
 Remove constraint. More...
 
void process (StoragePtr theStorage, bool theEvensBlocked)
 Initializes parameters and start constraint creation. More...
 
virtual void update ()
 Update constraint. More...
 
virtual void blockEvents (bool isBlocked)
 Block or unblock events from this 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 getAttributes (EntityWrapperPtr &theValue, std::vector< EntityWrapperPtr > &theAttributes)
 Generate list of attributes of constraint in order useful for constraints. More...
 
virtual void process ()
 Converts SketchPlugin constraint to a list of solver constraints. 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

bool myInSolver
 shows the constraint is added to the solver More...
 
EntityWrapperPtr myFeatureExtremities [2]
 extremities of a feature, a point is coincident to More...
 
ScalarWrapperPtr myAuxValue
 parameter on B-spline curve More...
 
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...
 

Detailed Description

Converts middle-point constraint to the constraint applicable for solver.

Constructor & Destructor Documentation

◆ SketchSolver_ConstraintMiddle()

SketchSolver_ConstraintMiddle::SketchSolver_ConstraintMiddle ( ConstraintPtr  theConstraint)
inline

Constructor based on SketchPlugin constraint.

Member Function Documentation

◆ notify()

void SketchSolver_ConstraintMiddle::notify ( const FeaturePtr &  theFeature,
PlaneGCSSolver_Update theUpdater 
)
virtual

Notify this object about the feature is changed somewhere.

Reimplemented from SketchSolver_ConstraintCoincidence.

◆ remove()

bool SketchSolver_ConstraintMiddle::remove ( )
virtual

Remove constraint.

Reimplemented from SketchSolver_ConstraintCoincidence.

◆ getAttributes()

void SketchSolver_ConstraintMiddle::getAttributes ( EntityWrapperPtr &  theValue,
std::vector< EntityWrapperPtr > &  theAttributes 
)
protectedvirtual

Generate list of attributes of constraint in order useful for constraints.

Parameters
[out]theValuenumerical characteristic of constraint (e.g. distance)
[out]theAttributeslist of attributes to be filled

Reimplemented from SketchSolver_ConstraintCoincidence.

◆ process() [1/2]

void SketchSolver_ConstraintCoincidence::process ( )
protectedvirtualinherited

Converts SketchPlugin constraint to a list of solver constraints.

Reimplemented from SketchSolver_Constraint.

◆ process() [2/2]

void SketchSolver_Constraint::process ( StoragePtr  theStorage,
bool  theEvensBlocked 
)
inherited

Initializes parameters and start constraint creation.

Parameters
theStorage[in] storage where to place new constraint
theEventsBlocked[in] all events from this constraint should be blocked

◆ adjustConstraint()

void SketchSolver_ConstraintCoincidence::adjustConstraint ( )
protectedvirtualinherited

This method is used in derived objects to check consistency of constraint.

E.g. the distance between line and point may be signed.

Reimplemented from SketchSolver_Constraint.

◆ update()

void SketchSolver_Constraint::update ( )
virtualinherited

◆ blockEvents()

void SketchSolver_Constraint::blockEvents ( bool  isBlocked)
virtualinherited

◆ TYPE()

SketchSolver_ConstraintType SketchSolver_Constraint::TYPE ( ConstraintPtr  theConstraint)
staticinherited

Obtain a type of SketchPlugin constraint.

◆ getType()

virtual SketchSolver_ConstraintType SketchSolver_Constraint::getType ( ) const
inlinevirtualinherited

Returns the type of constraint.

◆ error()

const std::string& SketchSolver_Constraint::error ( ) const
inlineinherited

Shows error message.

◆ cleanErrorMsg()

void SketchSolver_Constraint::cleanErrorMsg ( )
inlineprotectedinherited

Removes last error.

Field Documentation

◆ myInSolver

bool SketchSolver_ConstraintCoincidence::myInSolver
protectedinherited

shows the constraint is added to the solver

◆ myFeatureExtremities

EntityWrapperPtr SketchSolver_ConstraintCoincidence::myFeatureExtremities[2]
protectedinherited

extremities of a feature, a point is coincident to

◆ myAuxValue

ScalarWrapperPtr SketchSolver_ConstraintCoincidence::myAuxValue
protectedinherited

parameter on B-spline curve

◆ myBaseConstraint

ConstraintPtr SketchSolver_Constraint::myBaseConstraint
protectedinherited

base SketchPlugin constraint

◆ mySolverConstraint

ConstraintWrapperPtr SketchSolver_Constraint::mySolverConstraint
protectedinherited

wrapper for PlaneGCS constraint

◆ myStorage

StoragePtr SketchSolver_Constraint::myStorage
protectedinherited

storage, which contains all information about entities and constraints

◆ myType

SketchSolver_ConstraintType SketchSolver_Constraint::myType
protectedinherited

type of constraint

◆ myAttributes

std::list<EntityWrapperPtr> SketchSolver_Constraint::myAttributes
protectedinherited

attributes of constraint

◆ myErrorMsg

std::string SketchSolver_Constraint::myErrorMsg
protectedinherited

error message