Salome HOME
Create dimension presentations
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Tools.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        SketcherPrs_Tools.h
4 // Created:     10 March 2015
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef SketcherPrs_Tools_H
8 #define SketcherPrs_Tools_H
9
10 #include "SketcherPrs.h"
11 #include <GeomAPI_Shape.h>
12 #include <GeomAPI_Pnt2d.h>
13 #include <ModelAPI_Object.h>
14 #include <string>
15
16 class SketchPlugin_Constraint;
17 class SketchPlugin_Line;
18 class GeomDataAPI_Point2D;
19
20 namespace SketcherPrs_Tools {
21
22   SKETCHERPRS_EXPORT ObjectPtr getResult(SketchPlugin_Constraint* theFeature,
23                       const std::string& theAttrName);
24
25   SKETCHERPRS_EXPORT std::shared_ptr<GeomAPI_Shape> getShape(ObjectPtr theObject);
26
27   SKETCHERPRS_EXPORT std::shared_ptr<GeomAPI_Pnt2d> getPoint(SketchPlugin_Constraint* theFeature,
28                                           const std::string& theAttrName);
29
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);
33
34   SKETCHERPRS_EXPORT std::shared_ptr<SketchPlugin_Line> getFeatureLine(DataPtr theData,
35                                                     const std::string& theAttribute);
36
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);
40
41 };
42
43 #endif