SHAPER 9.16.0
GDMLPlugin_Ellipsoid.h
1// Copyright (C) 2014-2026 CEA, EDF
2//
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.
7//
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.
12//
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
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef GDMLPLUGIN_ELLIPSOID_H_
21#define GDMLPLUGIN_ELLIPSOID_H_
22
23#include <GDMLPlugin.h>
24#include <ModelAPI_Feature.h>
25#include <GeomAlgoAPI_Ellipsoid.h>
26
27class GeomAPI_Shape;
29
35{
36 public:
38 inline static const std::string& ID()
39 {
40 static const std::string MY_CONESEGMENT_ID("Ellipsoid");
41 return MY_CONESEGMENT_ID;
42 }
44 inline static const std::string& AX_ID()
45 {
46 static const std::string MY_AX_ID("ax");
47 return MY_AX_ID;
48 }
50 inline static const std::string& BY_ID()
51 {
52 static const std::string MY_BY_ID("by");
53 return MY_BY_ID;
54 }
56 inline static const std::string& CZ_ID()
57 {
58 static const std::string MY_CZ_ID("cz");
59 return MY_CZ_ID;
60 }
62 inline static const std::string& ZCUT1_ID()
63 {
64 static const std::string MY_ZCUT1_ID("zcut1");
65 return MY_ZCUT1_ID;
66 }
68 inline static const std::string& USE_ZCUT1_ID()
69 {
70 static const std::string MY_USE_ZCUT1_ID("use_zcut1");
71 return MY_USE_ZCUT1_ID;
72 }
74 inline static const std::string& USE_ZCUT2_ID()
75 {
76 static const std::string MY_USE_ZCUT2_ID("use_zcut2");
77 return MY_USE_ZCUT2_ID;
78 }
80 inline static const std::string& ZCUT2_ID()
81 {
82 static const std::string MY_ZCUT2_ID("zcut2");
83 return MY_ZCUT2_ID;
84 }
85
87 GDMLPLUGIN_EXPORT virtual const std::string& getKind()
88 {
89 static std::string MY_KIND = GDMLPlugin_Ellipsoid::ID();
90 return MY_KIND;
91 }
92
94 GDMLPLUGIN_EXPORT virtual void execute();
95
97 GDMLPLUGIN_EXPORT virtual void initAttributes();
98
101
102 private:
104 void loadNamingDS(std::shared_ptr<GeomAlgoAPI_Ellipsoid> theEllipsoidAlgo,
105 std::shared_ptr<ModelAPI_ResultBody> theResultEllipsoid);
106
107};
108
109#endif // GDMLPLUGIN_ELLIPSOID_H_
Feature for creation of a GDML Ellipsoid solid.
Definition: GDMLPlugin_Ellipsoid.h:35
virtual GDMLPLUGIN_EXPORT void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: GDMLPlugin_Ellipsoid.cpp:37
static const std::string & ZCUT1_ID()
attribute name of the outer radius at top of cone
Definition: GDMLPlugin_Ellipsoid.h:62
GDMLPlugin_Ellipsoid()
Use plugin manager for features creation.
Definition: GDMLPlugin_Ellipsoid.cpp:32
static const std::string & AX_ID()
attribute name of the inner radius at base of cone
Definition: GDMLPlugin_Ellipsoid.h:44
static const std::string & ZCUT2_ID()
attribute name of the outer radius at top of cone
Definition: GDMLPlugin_Ellipsoid.h:80
static const std::string & CZ_ID()
attribute name of the inner radius at top of cone
Definition: GDMLPlugin_Ellipsoid.h:56
static const std::string & USE_ZCUT1_ID()
attribute name of the outer radius at top of cone
Definition: GDMLPlugin_Ellipsoid.h:68
static const std::string & USE_ZCUT2_ID()
attribute name of the outer radius at top of cone
Definition: GDMLPlugin_Ellipsoid.h:74
virtual GDMLPLUGIN_EXPORT void execute()
Creates a new part document if needed.
Definition: GDMLPlugin_Ellipsoid.cpp:49
static const std::string & ID()
Cone segment kind.
Definition: GDMLPlugin_Ellipsoid.h:38
virtual GDMLPLUGIN_EXPORT const std::string & getKind()
Returns the kind of a feature.
Definition: GDMLPlugin_Ellipsoid.h:87
static const std::string & BY_ID()
attribute name of the outer radius at base of cone
Definition: GDMLPlugin_Ellipsoid.h:50
Interface to the topological shape object.
Definition: GeomAPI_Shape.h:43
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:41
The body (shape) result of a feature.
Definition: ModelAPI_ResultBody.h:43