SHAPER  9.12.0
PlaneGCSSolver_Solver Class Reference

The main class that performs the high-level operations for connection to the PlaneGCS. More...

Public Types

enum  SolveStatus {
  STATUS_OK , STATUS_INCONSISTENT , STATUS_EMPTYSET , STATUS_DEGENERATED ,
  STATUS_FAILED , STATUS_UNKNOWN
}
 The result of constraints solution. More...
 

Public Member Functions

void clear ()
 Clear system of equations. More...
 
void addConstraint (const ConstraintID &theMultiConstraintID, const std::list< GCSConstraintPtr > &theConstraints)
 Add constraint to the system of equations. More...
 
void removeConstraint (const ConstraintID &theID)
 Remove constraints from the system of equations. More...
 
double * createParameter ()
 Initialize memory for new solver's parameter. More...
 
void addParameters (const GCS::SET_pD &theParams)
 Add parameters created elsewhere. More...
 
void removeParameters (const GCS::SET_pD &theParams)
 Release memory occupied by parameters. More...
 
void initialize ()
 Preliminary initialization of solver (useful for moving a feature). More...
 
SolveStatus solve ()
 Solve the set of equations. More...
 
void undo ()
 Revert solution to initial values. More...
 
bool isConflicting (const ConstraintID &theConstraint) const
 Check the constraint is conflicted with others. More...
 
void diagnose (const GCS::Algorithm &theAlgo=GCS::DogLeg)
 Check conflicting/redundant constraints and DoF. More...
 
void getFreeParameters (GCS::SET_pD &theFreeParams)
 Return the list of modifiable parameters. More...
 
int dof ()
 Degrees of freedom. More...
 

Detailed Description

The main class that performs the high-level operations for connection to the PlaneGCS.

Member Enumeration Documentation

◆ SolveStatus

The result of constraints solution.

Member Function Documentation

◆ clear()

void PlaneGCSSolver_Solver::clear ( )

Clear system of equations.

◆ addConstraint()

void PlaneGCSSolver_Solver::addConstraint ( const ConstraintID &  theMultiConstraintID,
const std::list< GCSConstraintPtr > &  theConstraints 
)

Add constraint to the system of equations.

Parameters
[in]theMultiConstraintIDID of the multi constraint which may consists of several primitive constraints
[in]theConstraintslist of primitive constraints

◆ removeConstraint()

void PlaneGCSSolver_Solver::removeConstraint ( const ConstraintID &  theID)

Remove constraints from the system of equations.

◆ createParameter()

double * PlaneGCSSolver_Solver::createParameter ( )

Initialize memory for new solver's parameter.

◆ addParameters()

void PlaneGCSSolver_Solver::addParameters ( const GCS::SET_pD &  theParams)

Add parameters created elsewhere.

◆ removeParameters()

void PlaneGCSSolver_Solver::removeParameters ( const GCS::SET_pD &  theParams)

Release memory occupied by parameters.

◆ initialize()

void PlaneGCSSolver_Solver::initialize ( )

Preliminary initialization of solver (useful for moving a feature).

When called, the solve() method does not reinitialize a set of constraints.

◆ solve()

PlaneGCSSolver_Solver::SolveStatus PlaneGCSSolver_Solver::solve ( )

Solve the set of equations.

Returns
identifier whether solution succeeded

◆ undo()

void PlaneGCSSolver_Solver::undo ( )

Revert solution to initial values.

◆ isConflicting()

bool PlaneGCSSolver_Solver::isConflicting ( const ConstraintID &  theConstraint) const

Check the constraint is conflicted with others.

◆ diagnose()

void PlaneGCSSolver_Solver::diagnose ( const GCS::Algorithm &  theAlgo = GCS::DogLeg)

Check conflicting/redundant constraints and DoF.

◆ getFreeParameters()

void PlaneGCSSolver_Solver::getFreeParameters ( GCS::SET_pD &  theFreeParams)

Return the list of modifiable parameters.

◆ dof()

int PlaneGCSSolver_Solver::dof ( )

Degrees of freedom.