SHAPER  9.12.0
SketchSolver_ConstraintMultiTranslation Class Reference

Convert translated features to the list of SolveSpace constraints. More...

Inheritance diagram for SketchSolver_ConstraintMultiTranslation:
Inheritance graph

Public Member Functions

 SketchSolver_ConstraintMultiTranslation (ConstraintPtr theConstraint)
 Constructor based on SketchPlugin constraint. More...
 
virtual void update ()
 Update constraint. More...
 
virtual void notify (const FeaturePtr &theFeature, PlaneGCSSolver_Update *)
 Notify this object about the feature is changed somewhere. More...
 
virtual bool remove ()
 Tries to remove constraint. More...
 
virtual void blockEvents (bool isBlocked)
 Block or unblock events from this constraint. More...
 
void process (StoragePtr theStorage, bool theEvensBlocked)
 Initializes parameters and start constraint creation. 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...
 
void getAttributes (EntityWrapperPtr &theStartPoint, EntityWrapperPtr &theEndPoint, bool &theFullValue, std::list< EntityWrapperPtr > &theEntities)
 Generate list of translated entities. More...
 
virtual void adjustConstraint ()
 This method is used in derived objects to check consistence of constraint. More...
 
virtual void updateLocal ()
 Update parameters (called from base class) More...
 
void getEntities (std::list< EntityWrapperPtr > &theEntities)
 Collect entities which are translated or rotated (not their copies) More...
 
virtual void getAttributes (EntityWrapperPtr &, std::vector< EntityWrapperPtr > &)
 Generate list of attributes of constraint in order useful for SolveSpace constraints. More...
 
void cleanErrorMsg ()
 Removes last error. More...
 

Protected Attributes

int myNumberOfObjects
 number of previous initial objects More...
 
int myNumberOfCopies
 number of previous copies of initial objects More...
 
bool myIsFullValue
 value whether the angle/distance is a full or single for objects More...
 
bool myAdjusted
 the constraint is already adjusted (to not do it several times) More...
 
std::set< FeaturePtr > myOriginalFeatures
 lists of original features and their copies to find whether some of them are disappeared More...
 
std::set< FeaturePtr > myCopiedFeatures
 
bool myIsEventsBlocked
 
bool myIsProcessingNotify
 the notification is already processing 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

Convert translated features to the list of SolveSpace constraints.

Constructor & Destructor Documentation

◆ SketchSolver_ConstraintMultiTranslation()

SketchSolver_ConstraintMultiTranslation::SketchSolver_ConstraintMultiTranslation ( ConstraintPtr  theConstraint)
inline

Constructor based on SketchPlugin constraint.

Member Function Documentation

◆ process() [1/2]

void SketchSolver_ConstraintMultiTranslation::process ( )
protectedvirtual

Converts SketchPlugin constraint to a list of SolveSpace constraints.

Reimplemented from SketchSolver_ConstraintMulti.

◆ getAttributes() [1/2]

void SketchSolver_ConstraintMultiTranslation::getAttributes ( EntityWrapperPtr &  theStartPoint,
EntityWrapperPtr &  theEndPoint,
bool &  theFullValue,
std::list< EntityWrapperPtr > &  theEntities 
)
protected

Generate list of translated entities.

Parameters
[out]theStartPointstart point of translation
[out]theEndPointfinal point of translation
[out]theFullValueapplying translation using the distance as a full or single value
[out]theEntitieslist of base entities

◆ adjustConstraint()

void SketchSolver_ConstraintMultiTranslation::adjustConstraint ( )
protectedvirtual

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

Reimplemented from SketchSolver_ConstraintMulti.

◆ updateLocal()

void SketchSolver_ConstraintMultiTranslation::updateLocal ( )
protectedvirtual

Update parameters (called from base class)

Implements SketchSolver_ConstraintMulti.

◆ update()

void SketchSolver_ConstraintMulti::update ( )
virtualinherited

Update constraint.

Reimplemented from SketchSolver_Constraint.

◆ notify()

void SketchSolver_ConstraintMulti::notify ( const FeaturePtr &  theFeature,
PlaneGCSSolver_Update  
)
virtualinherited

Notify this object about the feature is changed somewhere.

Reimplemented from SketchSolver_Constraint.

◆ remove()

bool SketchSolver_ConstraintMulti::remove ( )
virtualinherited

Tries to remove constraint.

Returns
false, if current constraint contains another SketchPlugin constraints (like for multiple coincidence)

Reimplemented from SketchSolver_Constraint.

◆ blockEvents()

void SketchSolver_ConstraintMulti::blockEvents ( bool  isBlocked)
virtualinherited

Block or unblock events from this constraint.

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

◆ getEntities()

void SketchSolver_ConstraintMulti::getEntities ( std::list< EntityWrapperPtr > &  theEntities)
protectedinherited

Collect entities which are translated or rotated (not their copies)

◆ getAttributes() [2/2]

virtual void SketchSolver_ConstraintMulti::getAttributes ( EntityWrapperPtr &  ,
std::vector< EntityWrapperPtr > &   
)
inlineprotectedvirtualinherited

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

Reimplemented from SketchSolver_Constraint.

◆ 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

◆ myNumberOfObjects

int SketchSolver_ConstraintMulti::myNumberOfObjects
protectedinherited

number of previous initial objects

◆ myNumberOfCopies

int SketchSolver_ConstraintMulti::myNumberOfCopies
protectedinherited

number of previous copies of initial objects

◆ myIsFullValue

bool SketchSolver_ConstraintMulti::myIsFullValue
protectedinherited

value whether the angle/distance is a full or single for objects

◆ myAdjusted

bool SketchSolver_ConstraintMulti::myAdjusted
protectedinherited

the constraint is already adjusted (to not do it several times)

◆ myOriginalFeatures

std::set<FeaturePtr> SketchSolver_ConstraintMulti::myOriginalFeatures
protectedinherited

lists of original features and their copies to find whether some of them are disappeared

◆ myIsProcessingNotify

bool SketchSolver_ConstraintMulti::myIsProcessingNotify
protectedinherited

the notification is already processing

◆ 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