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>
14 #include <ModelAPI_Feature.h>
17 class GeomDataAPI_Point2D;
19 #define MyTextHeight 20
21 namespace SketcherPrs_Tools {
23 SKETCHERPRS_EXPORT ObjectPtr getResult(ModelAPI_Feature* theFeature,
24 const std::string& theAttrName);
26 SKETCHERPRS_EXPORT std::shared_ptr<GeomAPI_Shape> getShape(ObjectPtr theObject);
28 SKETCHERPRS_EXPORT std::shared_ptr<GeomAPI_Pnt2d> getPoint(ModelAPI_Feature* theFeature,
29 const std::string& theAttrName);
31 SKETCHERPRS_EXPORT std::shared_ptr<GeomAPI_Pnt2d> getProjectionPoint(
32 const FeaturePtr theLine,
33 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
35 SKETCHERPRS_EXPORT FeaturePtr getFeatureLine(DataPtr theData,
36 const std::string& theAttribute);
38 /// Obtain the point object from specified constraint parameter
39 SKETCHERPRS_EXPORT std::shared_ptr<GeomDataAPI_Point2D> getFeaturePoint(DataPtr theData,
40 const std::string& theAttribute);
42 SKETCHERPRS_EXPORT double getArrowSize();
44 SKETCHERPRS_EXPORT void setArrowSize(double theSize);