SHAPER  9.12.0
GDMLAPI_Ellipsoid.h
1 // Copyright (C) 2014-2023 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 GDMLAPI_Ellipsoid_H_
21 #define GDMLAPI_Ellipsoid_H_
22 
23 #include "GDMLAPI.h"
24 
25 #include <GDMLPlugin_Ellipsoid.h>
26 
27 #include <ModelHighAPI_Interface.h>
28 #include <ModelHighAPI_Macro.h>
29 
31 
36 {
37 public:
39  GDMLAPI_EXPORT
40  explicit GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature);
41 
43  GDMLAPI_EXPORT
44  explicit GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
45  const ModelHighAPI_Double& theAX,
46  const ModelHighAPI_Double& theBY,
47  const ModelHighAPI_Double& theCZ);
48 
50  GDMLAPI_EXPORT
51  explicit GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
52  const ModelHighAPI_Double& theAX,
53  const ModelHighAPI_Double& theBY,
54  const ModelHighAPI_Double& theCZ,
55  const ModelHighAPI_Double& theZCut1,
56  const ModelHighAPI_Double& theZCut2);
57 
59  GDMLAPI_EXPORT
60  virtual ~GDMLAPI_Ellipsoid();
61 
62  INTERFACE_7(GDMLPlugin_Ellipsoid::ID(),
84 
85 
86  GDMLAPI_EXPORT
87  void setSizes(const ModelHighAPI_Double& theAX,
88  const ModelHighAPI_Double& theBY,
89  const ModelHighAPI_Double& theCZ);
90 
92  GDMLAPI_EXPORT
93  void setZCut1(const ModelHighAPI_Double& theZCut1);
94 
96  GDMLAPI_EXPORT
97  void setZCut2(const ModelHighAPI_Double& theZCut2);
98 
100  GDMLAPI_EXPORT
101  virtual void dump(ModelHighAPI_Dumper& theDumper) const;
102 };
103 
105 typedef std::shared_ptr<GDMLAPI_Ellipsoid> EllipsoidPtr;
106 
109 GDMLAPI_EXPORT
110 EllipsoidPtr addEllipsoid(const std::shared_ptr<ModelAPI_Document>& thePart,
111  const ModelHighAPI_Double& theAX,
112  const ModelHighAPI_Double& theBY,
113  const ModelHighAPI_Double& theCZ);
114 
117 GDMLAPI_EXPORT
118 EllipsoidPtr addEllipsoid(const std::shared_ptr<ModelAPI_Document>& thePart,
119  const ModelHighAPI_Double& theAX,
120  const ModelHighAPI_Double& theBY,
121  const ModelHighAPI_Double& theCZ,
122  const ModelHighAPI_Double& theZCut1,
123  const ModelHighAPI_Double& theZCut2);
124 #endif // GDMLAPI_Ellipsoid_H_
Interface for primitive Ellipsoid feature.
Definition: GDMLAPI_Ellipsoid.h:36
GDMLAPI_Ellipsoid(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: GDMLAPI_Ellipsoid.cpp:25
virtual std::shared_ptr< ModelAPI_AttributeDouble > by() const
Ellipsoid size along Y axis.
Definition: GDMLAPI_Ellipsoid.h:83
virtual std::shared_ptr< ModelAPI_AttributeString > useZCut2() const
Second cut of the ellipsoid along Z axis.
Definition: GDMLAPI_Ellipsoid.h:83
void setZCut1(const ModelHighAPI_Double &theZCut1)
Set Z cut no.1.
Definition: GDMLAPI_Ellipsoid.cpp:74
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: GDMLAPI_Ellipsoid.cpp:92
virtual ~GDMLAPI_Ellipsoid()
Destructor.
Definition: GDMLAPI_Ellipsoid.cpp:59
void setSizes(const ModelHighAPI_Double &theAX, const ModelHighAPI_Double &theBY, const ModelHighAPI_Double &theCZ)
Set dimensions.
Definition: GDMLAPI_Ellipsoid.cpp:63
virtual std::shared_ptr< ModelAPI_AttributeDouble > zCut1() const
Position of the first cut.
Definition: GDMLAPI_Ellipsoid.h:83
virtual std::shared_ptr< ModelAPI_AttributeDouble > ax() const
Ellipsoid size along X axis.
Definition: GDMLAPI_Ellipsoid.h:83
virtual std::shared_ptr< ModelAPI_AttributeDouble > zCut2() const
Position of the second cut.
Definition: GDMLAPI_Ellipsoid.h:83
virtual std::shared_ptr< ModelAPI_AttributeString > useZCut1() const
First cut of the ellipsoid along Z axis.
Definition: GDMLAPI_Ellipsoid.h:83
virtual std::shared_ptr< ModelAPI_AttributeDouble > cz() const
Ellipsoid size along Z axis.
Definition: GDMLAPI_Ellipsoid.h:83
void setZCut2(const ModelHighAPI_Double &theZCut2)
Set Z cut no.2.
Definition: GDMLAPI_Ellipsoid.cpp:82
static const std::string & ID()
Cone segment kind.
Definition: GDMLPlugin_Ellipsoid.h:38
static const std::string & BY_ID()
attribute name of the outer radius at base of cone
Definition: GDMLPlugin_Ellipsoid.h:50
static const std::string & ZCUT1_ID()
attribute name of the outer radius at top of cone
Definition: GDMLPlugin_Ellipsoid.h:62
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 & ZCUT2_ID()
attribute name of the outer radius at top of cone
Definition: GDMLPlugin_Ellipsoid.h:80
static const std::string & USE_ZCUT2_ID()
attribute name of the outer radius at top of cone
Definition: GDMLPlugin_Ellipsoid.h:74
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 & CZ_ID()
attribute name of the inner radius at top of cone
Definition: GDMLPlugin_Ellipsoid.h:56
Attribute that contains real value with double precision.
Definition: ModelAPI_AttributeDouble.h:34
API for the attribute that contains std (null terminated) string.
Definition: ModelAPI_AttributeString.h:33
Class for filling ModelAPI_AttributeDouble.
Definition: ModelHighAPI_Double.h:37
Dump engine for the model.
Definition: ModelHighAPI_Dumper.h:81
Base class for feature interfaces.
Definition: ModelHighAPI_Interface.h:42
EllipsoidPtr addEllipsoid(const std::shared_ptr< ModelAPI_Document > &thePart, const ModelHighAPI_Double &theAX, const ModelHighAPI_Double &theBY, const ModelHighAPI_Double &theCZ)
Create GDML Ellipsoid feature.
Definition: GDMLAPI_Ellipsoid.cpp:125