SHAPER  9.12.0
SolveSpaceSolver_Solver Class Reference

Performs high-level operations to solve sketch in SolveSpace. More...

Inheritance diagram for SolveSpaceSolver_Solver:
Inheritance graph

Public Member Functions

void setParameters (Slvs_Param *theParameters, int theSize)
 Change array of parameters. More...
 
void setEntities (Slvs_Entity *theEntities, int theSize)
 Change array of entities. More...
 
void setConstraints (Slvs_Constraint *theConstraints, int theSize)
 Change array of constraints. More...
 
void setDraggedParameters (const Slvs_hParam *theDragged)
 Store the parameters of the point which was moved by user. More...
 
virtual SketchSolver_SolveStatus solve ()
 Solve the set of equations. More...
 
virtual void prepare ()
 Prepare for solving. Store initial values of parameters for undo. More...
 
virtual void undo ()
 Revert solution to initial values. More...
 
virtual bool isConflicting (const ConstraintID &theConstraint) const
 Check the constraint is conflicted with others. More...
 
virtual int dof () const
 Degrees of freedom. More...
 

Detailed Description

Performs high-level operations to solve sketch in SolveSpace.

Member Function Documentation

◆ setParameters()

void SolveSpaceSolver_Solver::setParameters ( Slvs_Param *  theParameters,
int  theSize 
)

Change array of parameters.

Parameters
[in]theParameterspointer to the array of parameters
[in]theSizesize of this array

◆ setEntities()

void SolveSpaceSolver_Solver::setEntities ( Slvs_Entity *  theEntities,
int  theSize 
)

Change array of entities.

Parameters
[in]theEntitiespointer to the array of entities
[in]theSizesize of this array

◆ setConstraints()

void SolveSpaceSolver_Solver::setConstraints ( Slvs_Constraint *  theConstraints,
int  theSize 
)

Change array of constraints.

Parameters
[in]theConstraintspointer to the array of constraints
[in]theSizesize of this array

◆ setDraggedParameters()

void SolveSpaceSolver_Solver::setDraggedParameters ( const Slvs_hParam *  theDragged)

Store the parameters of the point which was moved by user.

The solver will watch this items to be constant

Parameters
[in]theDraggedlist of parameters (not more than 4) which should not be changed during solving

◆ solve()

SketchSolver_SolveStatus SolveSpaceSolver_Solver::solve ( )
virtual

Solve the set of equations.

Returns
identifier whether solution succeeded

◆ prepare()

void SolveSpaceSolver_Solver::prepare ( )
virtual

Prepare for solving. Store initial values of parameters for undo.

◆ undo()

void SolveSpaceSolver_Solver::undo ( )
virtual

Revert solution to initial values.

◆ isConflicting()

bool SolveSpaceSolver_Solver::isConflicting ( const ConstraintID &  theConstraint) const
virtual

Check the constraint is conflicted with others.

◆ dof()

int SolveSpaceSolver_Solver::dof ( ) const
virtual

Degrees of freedom.