Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_PositionMgr.h
index 8c8445de8d2b9195e91e2710873fc4edd3e72d92..d8a956ff9f4398a033ca4b591c50344bc85f1566 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <GeomAPI_Shape.h>
 #include <gp_Pnt.hxx>
+#include <ModelAPI_Object.h>
 
 #include <map>
 
@@ -28,11 +29,12 @@ public:
   /// Returns position of symbol for the given presentation
   /// \param theLine constrained object 
   /// \param thePrs a presentation of constraint
-  gp_Pnt getPosition(std::shared_ptr<GeomAPI_Shape> theLine, Handle(SketcherPrs_SymbolPrs) thePrs);
+  /// \param theStep step between symbols
+  gp_Pnt getPosition(ObjectPtr theLine, const SketcherPrs_SymbolPrs* thePrs, double theStep = 20);
 
   /// Deletes constraint object from internal structures. Has to be called on constraint delete.
   /// \param thePrs a constraint presentation
-  void deleteConstraint(Handle(SketcherPrs_SymbolPrs) thePrs);
+  void deleteConstraint(const SketcherPrs_SymbolPrs* thePrs);
 
 private:
   /// Constructor
@@ -41,16 +43,16 @@ private:
   /// Returns position index of the given constraint
   /// \param theLine constrained object 
   /// \param thePrs a presentation of constraint
-  int getPositionIndex(std::shared_ptr<GeomAPI_Shape> theLine, Handle(SketcherPrs_SymbolPrs) thePrs);
+  int getPositionIndex(ObjectPtr theLine, const SketcherPrs_SymbolPrs* thePrs);
 
 private:
-  typedef std::map<void*, int> PositionsMap;
+  typedef std::map<const SketcherPrs_SymbolPrs*, int> PositionsMap;
 
   /// The map which contains position of presentation
   PositionsMap myIndexes;
 
   /// The map contains position index 
-  std::map<std::shared_ptr<GeomAPI_Shape>, PositionsMap> myShapes;
+  std::map<ObjectPtr, PositionsMap> myShapes;
 };
 
 #endif
\ No newline at end of file