Salome HOME
Change icons for chamfer
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Tools.h
index 6653b44ff349611d4e3ad338e5f519c8a91ca490..730d865b9127c4c9eee76c2995c18a862cd4bc01 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #ifndef SKETCHPLUGIN_TOOLS_H_
@@ -28,6 +27,7 @@
 #include <ModelAPI_AttributeRefAttr.h>
 #include <GeomDataAPI_Point2D.h>
 
+class SketchPlugin_Constraint;
 class SketchPlugin_Feature;
 class SketchPlugin_Sketch;
 
@@ -66,30 +66,30 @@ void resetAttribute(SketchPlugin_Feature* theFeature, const std::string& theId);
 /// \param[in] theConstraintId    a constraint identifier
 /// \param[in] theFirstAttribute  an attribute of further constraint
 /// \param[in] theSecondAttribute an attribute of further constraint
-FeaturePtr createConstraint(SketchPlugin_Sketch* theSketch,
-                            const std::string& theConstraintId,
-                            const AttributePtr& theFirstAttribute,
-                            const AttributePtr& theSecondAttribute);
+FeaturePtr createConstraintAttrAttr(SketchPlugin_Sketch* theSketch,
+                                    const std::string& theConstraintId,
+                                    const AttributePtr& theFirstAttribute,
+                                    const AttributePtr& theSecondAttribute);
 
 /// Create new constraint between given attribute and object
 /// \param[in] theSketch         a sketch where the constraint will be created
 /// \param[in] theConstraintId   a constraint identifier
 /// \param[in] theFirstAttribute an attribute of further constraint
 /// \param[in] theSecondObject   an attribute of further constraint
-FeaturePtr createConstraint(SketchPlugin_Sketch* theSketch,
-                            const std::string& theConstraintId,
-                            const AttributePtr& theFirstAttribute,
-                            const ObjectPtr& theSecondObject);
+FeaturePtr createConstraintAttrObject(SketchPlugin_Sketch* theSketch,
+                                      const std::string& theConstraintId,
+                                      const AttributePtr& theFirstAttribute,
+                                      const ObjectPtr& theSecondObject);
 
 /// Create new constraint between given objects
 /// \param[in] theSketch       a sketch where the constraint will be created
 /// \param[in] theConstraintId a constraint identifier
 /// \param[in] theFirstObject  an attribute of further constraint
 /// \param[in] theSecondObject an attribute of further constraint
-FeaturePtr createConstraint(SketchPlugin_Sketch* theSketch,
-                            const std::string& theConstraintId,
-                            const ObjectPtr& theFirstObject,
-                            const ObjectPtr& theSecondObject);
+FeaturePtr createConstraintObjectObject(SketchPlugin_Sketch* theSketch,
+                                        const std::string& theConstraintId,
+                                        const ObjectPtr& theFirstObject,
+                                        const ObjectPtr& theSecondObject);
 
 /// Creates coincidence or tangent constraint.
 /// \param[in] theFeature to get selected attribute or object
@@ -112,6 +112,10 @@ void convertRefAttrToPointOrTangentCurve(const AttributeRefAttrPtr&      theRefA
                                          const AttributePtr&             theDefaultAttr,
                                          std::shared_ptr<GeomAPI_Shape>& theTangentCurve,
                                          std::shared_ptr<GeomAPI_Pnt2d>& thePassingPoint);
+
+
+/// Calculate global coordinates for flyout point of Length constraint
+GeomPnt2dPtr flyoutPointCoordinates(const std::shared_ptr<SketchPlugin_Constraint>& theConstraint);
 }; // namespace SketchPlugin_Tools
 
 #endif // SKETCHPLUGIN_TOOLS_H_
\ No newline at end of file