1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchPlugin_Tools.h
4 // Created: 07 July 2015
5 // Author: Sergey POKHODENKO
7 #ifndef SKETCHPLUGIN_TOOLS_H_
8 #define SKETCHPLUGIN_TOOLS_H_
10 #include <GeomAPI_Pnt2d.h>
12 #include <ModelAPI_Feature.h>
13 #include <ModelAPI_Attribute.h>
15 namespace SketchPlugin_Tools {
17 /// Clears text expressions for all attributes of the feature
18 void clearExpressions(FeaturePtr theFeature);
20 /// \return coincidence point
21 /// \param[in] theStartCoin coincidence feature
22 std::shared_ptr<GeomAPI_Pnt2d> getCoincidencePoint(const FeaturePtr theStartCoin);
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);
32 /// Changes the second attribute value to be multiplied or divided by the given value.
33 /// \param theFirstAngleAttribute the source attribute
34 /// \param theSecondAngleAttribute the changed attribute
35 /// \param theValue a value for modification
36 /// \param toMultiply a type of modification
37 void updateMultiAttribute(const AttributePtr& theFirstAngleAttribute,
38 const AttributePtr& theSecondAngleAttribute,
40 const bool toMultiply);
42 /// Changes the second attribute value to be multiplied or divided by the given value.
43 /// \param theFirstAngleAttribute the source attribute
44 /// \param theSecondAngleAttribute the changed attribute
45 /// \param theValue a value for modification
46 /// \param toMultiply a type of modification
47 void updateMultiAttribute(const AttributePtr& theFirstAttribute,
48 const AttributePtr& theSecondAttribute,
49 const AttributePtr& theModifiedAttribute,
51 const bool toMultiply);
53 }; // namespace SketchPlugin_Tools
55 #endif // SKETCHPLUGIN_TOOLS_H_