Salome HOME
updated copyright message
[modules/shaper.git] / src / BuildPlugin / BuildPlugin_Edge.h
index 62b9808e4c021ccfacd44b76b0a757f8851444de..8ef56179286ada6a5acbed4cd93a5acb446bea38 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -12,9 +12,9 @@
 //
 // 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 BuildPlugin_Edge_H_
@@ -54,11 +54,59 @@ public:
     return MY_KIND;
   }
 
+  /// Attribute name for creation method.
+  inline static const std::string& CREATION_METHOD()
+  {
+    static const std::string MY_CREATION_METHOD_ID("creation_method");
+    return MY_CREATION_METHOD_ID;
+  }
+
+  /// Value for creation method.
+  inline static const std::string& CREATION_BY_SEGMENTS()
+  {
+    static const std::string MY_CREATION_METHOD_ID("by_segments");
+    return MY_CREATION_METHOD_ID;
+  }
+
+  /// Value for creation method.
+  inline static const std::string& CREATION_BY_POINTS()
+  {
+    static const std::string MY_CREATION_METHOD_ID("by_points");
+    return MY_CREATION_METHOD_ID;
+  }
+
+  /// Attribute name for the first point.
+  inline static const std::string& FIRST_POINT()
+  {
+    static const std::string MY_FIRST_POINT_ID("first_point");
+    return MY_FIRST_POINT_ID;
+  }
+
+  /// Attribute name for the second point.
+  inline static const std::string& SECOND_POINT()
+  {
+    static const std::string MY_SECOND_POINT_ID("second_point");
+    return MY_SECOND_POINT_ID;
+  }
+
+  /// Attribute name of "Compute intersections" checkbox.
+  inline static const std::string& INTERSECT_ID()
+  {
+    static const std::string MY_INTERSECT_ID("intersect");
+    return MY_INTERSECT_ID;
+  }
+
   /// Request for initialization of data model of the feature: adding all attributes.
   BUILDPLUGIN_EXPORT virtual void initAttributes();
 
   /// Creates a new part document if needed.
   BUILDPLUGIN_EXPORT virtual void execute();
+
+private:
+  /// Build edges by the set of segments
+  void edgesBySegments();
+  /// Build edge by two points.
+  void edgeByPoints();
 };
 
 #endif