X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConstructionPlugin%2FConstructionPlugin_Plane.h;h=ce66bb66f32ae2d1ecc6e0c9c759398f5ee387aa;hb=ea593bc59e7e9461f6c4e2afd3f24d621edb1011;hp=3bfecc7a71a526afd1097e6c9baf804b42b30cb7;hpb=24e5375957ba83cea9bf9fbe9bff030df996914a;p=modules%2Fshaper.git diff --git a/src/ConstructionPlugin/ConstructionPlugin_Plane.h b/src/ConstructionPlugin/ConstructionPlugin_Plane.h index 3bfecc7a7..ce66bb66f 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Plane.h +++ b/src/ConstructionPlugin/ConstructionPlugin_Plane.h @@ -1,8 +1,21 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: ConstructionPlugin_Plane.h -// Created: 12 Dec 2014 -// Author: Vitaly Smetannikov +// 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 +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// 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 +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #ifndef ConstructionPlugin_Plane_H #define ConstructionPlugin_Plane_H @@ -145,6 +158,13 @@ public: return ATTR_ID; } + /// Attribute name for perpendicular flag. + inline static const std::string& PERPENDICULAR() + { + static const std::string ATTR_ID("perpendicular"); + return ATTR_ID; + } + /// Attribute name for selected plane. inline static const std::string& PLANE() { @@ -159,6 +179,47 @@ public: return ATTR_ID; } + /// Attribute name for reverse flag. + inline static const std::string& REVERSE() + { + static const std::string ATTR_ID("reverse"); + return ATTR_ID; + } + + /// Attribute name for coincident point. + inline static const std::string& COINCIDENT_POINT() + { + static const std::string ATTR_ID("coincident_point"); + return ATTR_ID; + } + + /// Attribute name for axis. + inline static const std::string& AXIS() + { + static const std::string ATTR_ID("axis"); + return ATTR_ID; + } + + /// Attribute name for angle. + inline static const std::string& ANGLE() + { + static const std::string ATTR_ID("angle"); + return ATTR_ID; + } + + inline static const std::string& PLANE1() + { + static const std::string ATTR_ID("plane1"); + return ATTR_ID; + } + + inline static const std::string& PLANE2() + { + static const std::string ATTR_ID("plane2"); + return ATTR_ID; + } + + /// Attribute name for a parameter for the general equation of a plane (ax+by+cz+d=0) inline static const std::string& A() { @@ -190,9 +251,6 @@ public: /// Request for initialization of data model of the feature: adding all attributes CONSTRUCTIONPLUGIN_EXPORT virtual void initAttributes(); - /// Construction result is always recomputed on the fly - CONSTRUCTIONPLUGIN_EXPORT virtual bool isPersistentResult() {return false;} - /// Use plugin manager for features creation ConstructionPlugin_Plane(); @@ -205,6 +263,9 @@ protected: std::shared_ptr createByGeneralEquation(); std::shared_ptr createByThreePoints(); std::shared_ptr createByLineAndPoint(); + std::shared_ptr createByCoincidentPoint(); + std::shared_ptr createByRotation(); + std::shared_ptr createByTwoParallelPlanes(); /// Creates a new plane by copy of face plane with translation along the normal /// to the specified distance. std::shared_ptr createByDistanceFromOther();