1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #ifndef GDMLPLUGIN_ELLIPSOID_H_
22 #define GDMLPLUGIN_ELLIPSOID_H_
24 #include <GDMLPlugin.h>
25 #include <ModelAPI_Feature.h>
26 #include <GeomAlgoAPI_Ellipsoid.h>
29 class ModelAPI_ResultBody;
31 /**\class GDMLPlugin_Ellipsoid
33 * \brief Feature for creation of a GDML Ellipsoid solid.
35 class GDMLPlugin_Ellipsoid : public ModelAPI_Feature
39 inline static const std::string& ID()
41 static const std::string MY_CONESEGMENT_ID("Ellipsoid");
42 return MY_CONESEGMENT_ID;
44 /// attribute name of the inner radius at base of cone
45 inline static const std::string& AX_ID()
47 static const std::string MY_AX_ID("ax");
50 /// attribute name of the outer radius at base of cone
51 inline static const std::string& BY_ID()
53 static const std::string MY_BY_ID("by");
56 /// attribute name of the inner radius at top of cone
57 inline static const std::string& CZ_ID()
59 static const std::string MY_CZ_ID("cz");
62 /// attribute name of the outer radius at top of cone
63 inline static const std::string& ZCUT1_ID()
65 static const std::string MY_ZCUT1_ID("zcut1");
68 /// attribute name of the outer radius at top of cone
69 inline static const std::string& USE_ZCUT1_ID()
71 static const std::string MY_USE_ZCUT1_ID("use_zcut1");
72 return MY_USE_ZCUT1_ID;
74 /// attribute name of the outer radius at top of cone
75 inline static const std::string& USE_ZCUT2_ID()
77 static const std::string MY_USE_ZCUT2_ID("use_zcut2");
78 return MY_USE_ZCUT2_ID;
80 /// attribute name of the outer radius at top of cone
81 inline static const std::string& ZCUT2_ID()
83 static const std::string MY_ZCUT2_ID("zcut2");
87 /// Returns the kind of a feature
88 GDMLPLUGIN_EXPORT virtual const std::string& getKind()
90 static std::string MY_KIND = GDMLPlugin_Ellipsoid::ID();
94 /// Creates a new part document if needed
95 GDMLPLUGIN_EXPORT virtual void execute();
97 /// Request for initialization of data model of the feature: adding all attributes
98 GDMLPLUGIN_EXPORT virtual void initAttributes();
100 /// Use plugin manager for features creation
101 GDMLPlugin_Ellipsoid();
104 /// Load Naming data structure of the feature to the document
105 void loadNamingDS(std::shared_ptr<GeomAlgoAPI_Ellipsoid> theEllipsoidAlgo,
106 std::shared_ptr<ModelAPI_ResultBody> theResultEllipsoid);
110 #endif // GDMLPLUGIN_ELLIPSOID_H_