20 #ifndef SketcherPrs_PositionMgr_H
21 #define SketcherPrs_PositionMgr_H
23 #include "SketcherPrs.h"
24 #include "SketcherPrs_SymbolPrs.h"
26 #include <GeomAPI_Shape.h>
27 #include <GeomAPI_Pnt.h>
29 #include <ModelAPI_Object.h>
50 double theStep = 20, GeomPointPtr thePnt = GeomPointPtr());
57 void clearAll() { myShapes.clear(); myPntShapes.clear(); }
71 const std::array<int, 2>& getPositionIndex(GeomPointPtr thePos,
80 double theStep, GeomPointPtr thePnt);
82 static bool isPntConstraint(
const std::string& theName);
85 typedef std::map<const SketcherPrs_SymbolPrs*, int> PositionsMap;
86 typedef std::map<const ModelAPI_Feature*, std::array<int, 2>> FeaturesMap;
89 std::map<ObjectPtr, PositionsMap> myShapes;
92 FeaturesMap myPntShapes;
A class Position Manager which manages position of constraints symbols along a source object line.
Definition: SketcherPrs_PositionMgr.h:40
gp_Pnt getPosition(ObjectPtr theLine, const SketcherPrs_SymbolPrs *thePrs, double theStep=20, GeomPointPtr thePnt=GeomPointPtr())
Returns position of symbol for the given presentation.
Definition: SketcherPrs_PositionMgr.cpp:233
static SketcherPrs_PositionMgr * get()
Returns current instance of position manager.
Definition: SketcherPrs_PositionMgr.cpp:54
void clearAll()
Cleares all stored positions for all constraints.
Definition: SketcherPrs_PositionMgr.h:57
void deleteConstraint(const SketcherPrs_SymbolPrs *thePrs)
Deletes constraint object from internal structures.
Definition: SketcherPrs_PositionMgr.cpp:475
A base class of constraint presentation which is represented by an icon.
Definition: SketcherPrs_SymbolPrs.h:52