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 #define MyTextHeight 20
22 namespace SketcherPrs_Tools {
24 SKETCHERPRS_EXPORT ObjectPtr getResult(SketchPlugin_Constraint* theFeature,
25 const std::string& theAttrName);
27 SKETCHERPRS_EXPORT std::shared_ptr<GeomAPI_Shape> getShape(ObjectPtr theObject);
29 SKETCHERPRS_EXPORT std::shared_ptr<GeomAPI_Pnt2d> getPoint(SketchPlugin_Constraint* theFeature,
30 const std::string& theAttrName);
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);
36 // SKETCHERPRS_EXPORT std::shared_ptr<SketchPlugin_Line> getFeatureLine(DataPtr theData,
37 // const std::string& theAttribute);
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);
43 SKETCHERPRS_EXPORT double getArrowSize();
45 SKETCHERPRS_EXPORT void setArrowSize(double theSize);