]> 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 void resetAttribute(SketchPlugin_Feature* theFeature, const std::string& theId);
35
36 /// Creates coincidence or tangent constraint.
37 /// \param[in] theFeature to get selected attribute or object
38 /// \param[in] theId ID of attribute where selection is.
39 /// \param[in] theObject object for constraint
40 /// \param[in] theIsCanBeTangent if true constraint can be tangent or coincidence, depending on
41 ///                              the selection in the attribute with passed ID.
42 void createConstraint(SketchPlugin_Feature* theFeature,
43                       const std::string& theId,
44                       const AttributePtr theAttr,
45                       const ObjectPtr theObject,
46                       const bool theIsCanBeTangent);
47 }; // namespace SketchPlugin_Tools
48
49 #endif // SKETCHPLUGIN_TOOLS_H_