SHAPER  9.12.0
SolveSpaceSolver_Builder Class Reference

Create bridges between SketchPlugin constraints and SolveSpace constraints. More...

Inheritance diagram for SolveSpaceSolver_Builder:
Inheritance graph

Public Member Functions

virtual StoragePtr createStorage (const GroupID &theGroup) const
 Creates a storage specific for used solver. More...
 
virtual SolverPtr createSolver () const
 Creates specific solver. More...
 
virtual std::list< ConstraintWrapperPtr > createConstraint (ConstraintPtr theConstraint, const GroupID &theGroupID, const EntityID &theSketchID, const SketchSolver_ConstraintType &theType, const double &theValue, const EntityWrapperPtr &theEntity1, const EntityWrapperPtr &theEntity2=EntityWrapperPtr(), const EntityWrapperPtr &theEntity3=EntityWrapperPtr(), const EntityWrapperPtr &theEntity4=EntityWrapperPtr()) const
 Creates new constraint(s) using given parameters. More...
 
virtual std::list< ConstraintWrapperPtr > createConstraint (ConstraintPtr theConstraint, const GroupID &theGroupID, const EntityID &theSketchID, const SketchSolver_ConstraintType &theType, const double &theValue, const bool theFullValue, const EntityWrapperPtr &thePoint1, const EntityWrapperPtr &thePoint2, const std::list< EntityWrapperPtr > &theTrsfEnt) const
 Creates new multi-translation or multi-rotation constraint. More...
 
virtual void adjustConstraint (ConstraintWrapperPtr theConstraint) const
 Update flags for several kinds of constraints. More...
 
virtual EntityWrapperPtr createFeature (FeaturePtr theFeature, const std::list< EntityWrapperPtr > &theAttributes, const GroupID &theGroupID, const EntityID &theSketchID=EID_UNKNOWN) const
 Creates a feature using list of already created attributes. More...
 
virtual EntityWrapperPtr createAttribute (AttributePtr theAttribute, const GroupID &theGroup, const EntityID &theSketchID=EID_UNKNOWN) const
 Creates an attribute. More...
 

Static Public Member Functions

static BuilderPtr getInstance ()
 Returns single instance of builder. More...
 

Detailed Description

Create bridges between SketchPlugin constraints and SolveSpace constraints.

Member Function Documentation

◆ getInstance()

BuilderPtr SolveSpaceSolver_Builder::getInstance ( )
static

Returns single instance of builder.

◆ createStorage()

StoragePtr SolveSpaceSolver_Builder::createStorage ( const GroupID &  theGroup) const
virtual

Creates a storage specific for used solver.

◆ createSolver()

SolverPtr SolveSpaceSolver_Builder::createSolver ( ) const
virtual

Creates specific solver.

◆ createConstraint() [1/2]

std::list< ConstraintWrapperPtr > SolveSpaceSolver_Builder::createConstraint ( ConstraintPtr  theConstraint,
const GroupID &  theGroupID,
const EntityID &  theSketchID,
const SketchSolver_ConstraintType &  theType,
const double &  theValue,
const EntityWrapperPtr &  theEntity1,
const EntityWrapperPtr &  theEntity2 = EntityWrapperPtr(),
const EntityWrapperPtr &  theEntity3 = EntityWrapperPtr(),
const EntityWrapperPtr &  theEntity4 = EntityWrapperPtr() 
) const
virtual

Creates new constraint(s) using given parameters.

Parameters
theConstraint[in] original constraint
theGroupID[in] group the constraint belongs to
theSketchID[in] sketch the constraint belongs to
theType[in] type of constraint
theValue[in] numeric characteristic of constraint (e.g. distance or radius) if applicable
theEntity1[in] first attribute of constraint
theEntity2[in] second attribute of constraint
theEntity3[in] third attribute of constraint
theEntity4[in] fourth attribute of constraint
Returns
Created list of wrappers of constraints applicable for specific solver. Most of constraint types lead to single constraint, but there are some kind of constraints (e.g. mirror), which may produce couple of constraints.

◆ createConstraint() [2/2]

std::list< ConstraintWrapperPtr > SolveSpaceSolver_Builder::createConstraint ( ConstraintPtr  theConstraint,
const GroupID &  theGroupID,
const EntityID &  theSketchID,
const SketchSolver_ConstraintType &  theType,
const double &  theValue,
const bool  theFullValue,
const EntityWrapperPtr &  thePoint1,
const EntityWrapperPtr &  thePoint2,
const std::list< EntityWrapperPtr > &  theTrsfEnt 
) const
virtual

Creates new multi-translation or multi-rotation constraint.

Parameters
theConstraint[in] original constraint
theGroupID[in] group the constraint belongs to
theSketchID[in] sketch the constraint belongs to
theType[in] type of constraint
theValue[in] numeric characteristic of constraint (angle for multi-rotation) if applicable
theFullValue[in] indicates theValue shows full translation delta/rotation angle or delta/angle between neighbor entities
thePoint1[in] center for multi-rotation or start point for multi-translation
thePoint2[in] end point for multi-translation (empty for multi-rotation)
theTrsfEnt[in] list of transformed entities

◆ adjustConstraint()

void SolveSpaceSolver_Builder::adjustConstraint ( ConstraintWrapperPtr  theConstraint) const
virtual

Update flags for several kinds of constraints.

◆ createFeature()

EntityWrapperPtr SolveSpaceSolver_Builder::createFeature ( FeaturePtr  theFeature,
const std::list< EntityWrapperPtr > &  theAttributes,
const GroupID &  theGroupID,
const EntityID &  theSketchID = EID_UNKNOWN 
) const
virtual

Creates a feature using list of already created attributes.

Parameters
theFeature[in] feature to create
theAttributes[in] attributes of the feature
theGroupID[in] group the feature belongs to
theSketchID[in] sketch the feature belongs to
Returns
Created wrapper of the feature applicable for specific solver

◆ createAttribute()

EntityWrapperPtr SolveSpaceSolver_Builder::createAttribute ( AttributePtr  theAttribute,
const GroupID &  theGroup,
const EntityID &  theSketchID = EID_UNKNOWN 
) const
virtual

Creates an attribute.

Parameters
theAttribute[in] attribute to create
theGroup[in] group the attribute belongs to
theSketchID[in] sketch the attribute belongs to
Returns
Created wrapper of the attribute applicable for specific solver