X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FBuildPlugin%2FBuildPlugin_Edge.h;h=db5397f3aaf6d76707bc747e4f8799d561364ff3;hb=7ec27d9ade25264df5a6d8e2308b3fb742366170;hp=f22df477d30357f3e39c4b6c351901e0b77e8ffd;hpb=a94fc319f2aa64b43c9a73b5ff7063923648faec;p=modules%2Fshaper.git diff --git a/src/BuildPlugin/BuildPlugin_Edge.h b/src/BuildPlugin/BuildPlugin_Edge.h index f22df477d..db5397f3a 100644 --- a/src/BuildPlugin/BuildPlugin_Edge.h +++ b/src/BuildPlugin/BuildPlugin_Edge.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2022 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 @@ -12,10 +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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef BuildPlugin_Edge_H_ @@ -55,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