]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/SketchPlugin_Tools.h
Salome HOME
Issue #2024: Redesign of circle and arc of circle
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Tools.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        SketchPlugin_Tools.h
4 // Created:     07 July 2015
5 // Author:      Sergey POKHODENKO
6
7 #ifndef SKETCHPLUGIN_TOOLS_H_
8 #define SKETCHPLUGIN_TOOLS_H_
9
10 #include <GeomAPI_Pnt2d.h>
11
12 #include <ModelAPI_Feature.h>
13 #include <ModelAPI_Attribute.h>
14
15 class SketchPlugin_Feature;
16
17 namespace SketchPlugin_Tools {
18
19 /// Clears text expressions for all attributes of the feature
20 void clearExpressions(FeaturePtr theFeature);
21
22 /// \return coincidence point
23 /// \param[in] theStartCoin coincidence feature
24 std::shared_ptr<GeomAPI_Pnt2d> getCoincidencePoint(const FeaturePtr theStartCoin);
25
26 /// Finds lines coincident at point
27 /// \param[in] theStartCoin coincidence feature
28 /// \param[in] theAttr attribute name
29 /// \param[out] theList list of lines
30 void findCoincidences(const FeaturePtr theStartCoin,
31                       const std::string& theAttr,
32                       std::set<FeaturePtr>& theList);
33
34 /// Creates coincidence or tangent constraint.
35 /// \param[in] theFeature to get selected attribute or object
36 /// \param[in] theId ID of attribute where selection is.
37 /// \param[in] theObject object for constraint
38 /// \param[in] theIsCanBeTangent if true constraint can be tangent or coincidence, depending on
39 ///                              the selection in the attribute with passed ID.
40 void createConstraint(SketchPlugin_Feature* theFeature,
41                       const std::string& theId,
42                       const AttributePtr theAttr,
43                       const ObjectPtr theObject,
44                       const bool theIsCanBeTangent);
45 }; // namespace SketchPlugin_Tools
46
47 #endif // SKETCHPLUGIN_TOOLS_H_