-// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef SketcherPrs_PositionMgr_H
#define SketcherPrs_PositionMgr_H
+#include "SketcherPrs.h"
#include "SketcherPrs_SymbolPrs.h"
#include <GeomAPI_Shape.h>
{
public:
/// Returns current instance of position manager
- static SketcherPrs_PositionMgr* get();
+ SKETCHERPRS_EXPORT static SketcherPrs_PositionMgr* get();
/// Returns position of symbol for the given presentation
/// \param theLine constrained object
/// \param thePrs a presentation of constraint
/// \param theStep step between symbols
- gp_Pnt getPosition(ObjectPtr theLine, const SketcherPrs_SymbolPrs* thePrs,
- double theStep = 20, GeomPointPtr thePnt = GeomPointPtr());
+ SKETCHERPRS_EXPORT gp_Pnt getPosition(ObjectPtr theLine, const SketcherPrs_SymbolPrs* thePrs,
+ double theStep = 20, GeomPointPtr thePnt = GeomPointPtr());
/// Deletes constraint object from internal structures. Has to be called on constraint delete.
/// \param thePrs a constraint presentation
- void deleteConstraint(const SketcherPrs_SymbolPrs* thePrs);
+ SKETCHERPRS_EXPORT void deleteConstraint(const SketcherPrs_SymbolPrs* thePrs);
+
+ /// Cleares all stored positions for all constraints
+ void clearAll() { myShapes.clear(); myPntShapes.clear(); }
private:
/// Constructor
typedef std::map<const SketcherPrs_SymbolPrs*, int> PositionsMap;
typedef std::map<const ModelAPI_Feature*, std::array<int, 2>> FeaturesMap;
- /// The map which contains position of presentation
- PositionsMap myIndexes;
-
/// The map contains position index
std::map<ObjectPtr, PositionsMap> myShapes;