Salome HOME
#816 In multi-rotation, be able to put the total angle or the step angle (Rotation...
[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 namespace SketchPlugin_Tools {
16
17 /// Clears text expressions for all attributes of the feature 
18 void clearExpressions(FeaturePtr theFeature);
19
20 /// \return coincidence point
21 /// \param[in] theStartCoin coincidence feature
22 std::shared_ptr<GeomAPI_Pnt2d> getCoincidencePoint(const FeaturePtr theStartCoin);
23
24 /// Finds lines coincident at point
25 /// \param[in] theStartCoin coincidence feature
26 /// \param[in] theAttr attribute name
27 /// \param[out] theList list of lines
28 void findCoincidences(const FeaturePtr theStartCoin,
29                       const std::string& theAttr,
30                       std::set<FeaturePtr>& theList);
31
32 /// Changes the second attribute value to full or single angle. If it is corrected to full
33 /// value, the first angle is miltipied to the number of copies otherwise it is separated by it.
34 /// \param theFirstAngleAttribute the source attribute
35 /// \param theSecondAngleAttribute the changed attribute
36 /// \param theNumberOfCopies a value for modification
37 /// \param toFullAngle a type of modification
38 void updateAngleAttribute(const AttributePtr& theFirstAngleAttribute,
39                           const AttributePtr& theSecondAngleAttribute,
40                           const int& theNumberOfCopies,
41                           const bool toFullAngle);
42
43 }; // namespace SketchPlugin_Tools
44
45 #endif // SKETCHPLUGIN_TOOLS_H_