Salome HOME
Create check box "Show constraints"
[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 #define MyTextHeight 20
21
22 namespace SketcherPrs_Tools {
23
24   SKETCHERPRS_EXPORT ObjectPtr getResult(SketchPlugin_Constraint* theFeature,
25                       const std::string& theAttrName);
26
27   SKETCHERPRS_EXPORT std::shared_ptr<GeomAPI_Shape> getShape(ObjectPtr theObject);
28
29   SKETCHERPRS_EXPORT std::shared_ptr<GeomAPI_Pnt2d> getPoint(SketchPlugin_Constraint* theFeature,
30                                           const std::string& theAttrName);
31
32   SKETCHERPRS_EXPORT std::shared_ptr<GeomAPI_Pnt2d> getProjectionPoint(
33                         const std::shared_ptr<SketchPlugin_Line>& theLine,
34                         const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
35
36   SKETCHERPRS_EXPORT std::shared_ptr<SketchPlugin_Line> getFeatureLine(DataPtr theData,
37                                                     const std::string& theAttribute);
38
39   /// Obtain the point object from specified constraint parameter
40   SKETCHERPRS_EXPORT std::shared_ptr<GeomDataAPI_Point2D> getFeaturePoint(DataPtr theData,
41                                                        const std::string& theAttribute);
42
43   SKETCHERPRS_EXPORT double getArrowSize();
44
45   SKETCHERPRS_EXPORT void setArrowSize(double theSize);
46 };
47
48 #endif