1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: SketcherPrs_Tools.h
4 // Created: 10 March 2015
5 // Author: Vitaly SMETANNIKOV
7 #ifndef SketcherPrs_Tools_H
8 #define SketcherPrs_Tools_H
10 #include "SketcherPrs.h"
11 #include <GeomAPI_Shape.h>
12 #include <GeomAPI_Pnt2d.h>
13 #include <ModelAPI_Object.h>
16 class SketchPlugin_Constraint;
17 class SketchPlugin_Line;
18 class GeomDataAPI_Point2D;
20 namespace SketcherPrs_Tools {
22 SKETCHERPRS_EXPORT ObjectPtr getResult(SketchPlugin_Constraint* theFeature,
23 const std::string& theAttrName);
25 SKETCHERPRS_EXPORT std::shared_ptr<GeomAPI_Shape> getShape(ObjectPtr theObject);
27 SKETCHERPRS_EXPORT std::shared_ptr<GeomAPI_Pnt2d> getPoint(SketchPlugin_Constraint* theFeature,
28 const std::string& theAttrName);
30 SKETCHERPRS_EXPORT std::shared_ptr<GeomAPI_Pnt2d> getProjectionPoint(
31 const std::shared_ptr<SketchPlugin_Line>& theLine,
32 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
34 SKETCHERPRS_EXPORT std::shared_ptr<SketchPlugin_Line> getFeatureLine(DataPtr theData,
35 const std::string& theAttribute);
37 /// Obtain the point object from specified constraint parameter
38 SKETCHERPRS_EXPORT std::shared_ptr<GeomDataAPI_Point2D> getFeaturePoint(DataPtr theData,
39 const std::string& theAttribute);