SHAPER  9.12.0
SketcherPrs_PositionMgr Class Reference

A class Position Manager which manages position of constraints symbols along a source object line. More...

Public Member Functions

gp_Pnt getPosition (ObjectPtr theLine, const SketcherPrs_SymbolPrs *thePrs, double theStep=20, GeomPointPtr thePnt=GeomPointPtr())
 Returns position of symbol for the given presentation. More...
 
void deleteConstraint (const SketcherPrs_SymbolPrs *thePrs)
 Deletes constraint object from internal structures. More...
 
void clearAll ()
 Cleares all stored positions for all constraints. More...
 

Static Public Member Functions

static SketcherPrs_PositionMgrget ()
 Returns current instance of position manager. More...
 

Detailed Description

A class Position Manager which manages position of constraints symbols along a source object line.

it expects that symbol icons have size 16x16 px

Member Function Documentation

◆ get()

SketcherPrs_PositionMgr * SketcherPrs_PositionMgr::get ( )
static

Returns current instance of position manager.

◆ getPosition()

gp_Pnt SketcherPrs_PositionMgr::getPosition ( ObjectPtr  theLine,
const SketcherPrs_SymbolPrs thePrs,
double  theStep = 20,
GeomPointPtr  thePnt = GeomPointPtr() 
)

Returns position of symbol for the given presentation.

Parameters
theLineconstrained object
thePrsa presentation of constraint
theStepstep between symbols

◆ deleteConstraint()

void SketcherPrs_PositionMgr::deleteConstraint ( const SketcherPrs_SymbolPrs thePrs)

Deletes constraint object from internal structures.

Has to be called on constraint delete.

Parameters
thePrsa constraint presentation

◆ clearAll()

void SketcherPrs_PositionMgr::clearAll ( )
inline

Cleares all stored positions for all constraints.