SHAPER 9.16.0
GDMLAPI_ConeSegment.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 GDMLAPI_ConeSegment_H_
21#define GDMLAPI_ConeSegment_H_
22
23#include "GDMLAPI.h"
24
25#include <GDMLPlugin_ConeSegment.h>
26
27#include <ModelHighAPI_Interface.h>
28#include <ModelHighAPI_Macro.h>
29
31
36{
37public:
39 GDMLAPI_EXPORT
40 explicit GDMLAPI_ConeSegment(const std::shared_ptr<ModelAPI_Feature>& theFeature);
41
43 GDMLAPI_EXPORT
44 explicit GDMLAPI_ConeSegment(const std::shared_ptr<ModelAPI_Feature>& theFeature,
45 const ModelHighAPI_Double& theRMin1,
46 const ModelHighAPI_Double& theRMax1,
47 const ModelHighAPI_Double& theRMin2,
48 const ModelHighAPI_Double& theRMax2,
49 const ModelHighAPI_Double& theZ,
50 const ModelHighAPI_Double& theStartPhi,
51 const ModelHighAPI_Double& theDeltaPhi);
52
54 GDMLAPI_EXPORT
55 virtual ~GDMLAPI_ConeSegment();
56
57 INTERFACE_7(GDMLPlugin_ConeSegment::ID(),
72
73
74 GDMLAPI_EXPORT
75 void setAttributes(const ModelHighAPI_Double& theRMin1,
76 const ModelHighAPI_Double& theRMax1,
77 const ModelHighAPI_Double& theRMin2,
78 const ModelHighAPI_Double& theRMax2,
79 const ModelHighAPI_Double& theZ,
80 const ModelHighAPI_Double& theStartPhi,
81 const ModelHighAPI_Double& theDeltaPhi);
82
84 GDMLAPI_EXPORT
85 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
86};
87
89typedef std::shared_ptr<GDMLAPI_ConeSegment> ConeSegmentPtr;
90
93GDMLAPI_EXPORT
94ConeSegmentPtr addConeSegment(const std::shared_ptr<ModelAPI_Document>& thePart,
95 const ModelHighAPI_Double& theRMin1,
96 const ModelHighAPI_Double& theRMax1,
97 const ModelHighAPI_Double& theRMin2,
98 const ModelHighAPI_Double& theRMax2,
99 const ModelHighAPI_Double& theZ,
100 const ModelHighAPI_Double& theStartPhi,
101 const ModelHighAPI_Double& theDeltaPhi);
102
103#endif // GDMLAPI_ConeSegment_H_
Definition: GDMLAPI_ConeSegment.h:36
virtual std::shared_ptr< ModelAPI_AttributeDouble > deltaphi() const
Angle of the segment.
Definition: GDMLAPI_ConeSegment.h:71
virtual std::shared_ptr< ModelAPI_AttributeDouble > rmax1() const
Outer radius at base of cone.
Definition: GDMLAPI_ConeSegment.h:71
virtual std::shared_ptr< ModelAPI_AttributeDouble > rmin2() const
Inner radius at top of cone.
Definition: GDMLAPI_ConeSegment.h:71
virtual std::shared_ptr< ModelAPI_AttributeDouble > z() const
Height of the cone segment.
Definition: GDMLAPI_ConeSegment.h:71
virtual ~GDMLAPI_ConeSegment()
Destructor.
Definition: GDMLAPI_ConeSegment.cpp:48
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: GDMLAPI_ConeSegment.cpp:73
virtual std::shared_ptr< ModelAPI_AttributeDouble > rmax2() const
Outer radius at top of cone.
Definition: GDMLAPI_ConeSegment.h:71
virtual std::shared_ptr< ModelAPI_AttributeDouble > startphi() const
Start angle of the segment.
Definition: GDMLAPI_ConeSegment.h:71
GDMLAPI_ConeSegment(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: GDMLAPI_ConeSegment.cpp:26
void setAttributes(const ModelHighAPI_Double &theRMin1, const ModelHighAPI_Double &theRMax1, const ModelHighAPI_Double &theRMin2, const ModelHighAPI_Double &theRMax2, const ModelHighAPI_Double &theZ, const ModelHighAPI_Double &theStartPhi, const ModelHighAPI_Double &theDeltaPhi)
Set dimensions.
Definition: GDMLAPI_ConeSegment.cpp:53
virtual std::shared_ptr< ModelAPI_AttributeDouble > rmin1() const
Inner radius at base of cone.
Definition: GDMLAPI_ConeSegment.h:71
static const std::string & DELTAPHI_ID()
attribute name of the angle of the segment
Definition: GDMLPlugin_ConeSegment.h:80
static const std::string & RMIN1_ID()
attribute name of the inner radius at base of cone
Definition: GDMLPlugin_ConeSegment.h:44
static const std::string & RMIN2_ID()
attribute name of the inner radius at top of cone
Definition: GDMLPlugin_ConeSegment.h:56
static const std::string & RMAX2_ID()
attribute name of the outer radius at top of cone
Definition: GDMLPlugin_ConeSegment.h:62
static const std::string & ID()
Cone segment kind.
Definition: GDMLPlugin_ConeSegment.h:38
static const std::string & STARTPHI_ID()
attribute name of the start angle of the segment
Definition: GDMLPlugin_ConeSegment.h:74
static const std::string & RMAX1_ID()
attribute name of the outer radius at base of cone
Definition: GDMLPlugin_ConeSegment.h:50
static const std::string & Z_ID()
attribute name of the height of the cone segment
Definition: GDMLPlugin_ConeSegment.h:68
Attribute that contains real value with double precision.
Definition: ModelAPI_AttributeDouble.h:34
Document for internal data structure of any object storage.
Definition: ModelAPI_Document.h:53
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:46
ConeSegmentPtr addConeSegment(const std::shared_ptr< ModelAPI_Document > &thePart, const ModelHighAPI_Double &theRMin1, const ModelHighAPI_Double &theRMax1, const ModelHighAPI_Double &theRMin2, const ModelHighAPI_Double &theRMax2, const ModelHighAPI_Double &theZ, const ModelHighAPI_Double &theStartPhi, const ModelHighAPI_Double &theDeltaPhi)
Create GDML ConeSegment feature.
Definition: GDMLAPI_ConeSegment.cpp:95