1 // Copyright (C) 2014-2019 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 email : webmaster.salome@opencascade.com
20 #ifndef GDMLAPI_ConeSegment_H_
21 #define GDMLAPI_ConeSegment_H_
25 #include <GDMLPlugin_ConeSegment.h>
27 #include <ModelHighAPI_Interface.h>
28 #include <ModelHighAPI_Macro.h>
30 class ModelHighAPI_Double;
32 /// \class GDMLPlugin_ConeSegment
33 /// \ingroup CPPHighAPI
34 /// \brief Interface for primitive ConeSegment feature.
35 class GDMLAPI_ConeSegment: public ModelHighAPI_Interface
38 /// Constructor without values.
40 explicit GDMLAPI_ConeSegment(const std::shared_ptr<ModelAPI_Feature>& theFeature);
42 /// Constructor with values.
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);
55 virtual ~GDMLAPI_ConeSegment();
57 INTERFACE_7(GDMLPlugin_ConeSegment::ID(),
58 rmin1, GDMLPlugin_ConeSegment::RMIN1_ID(),
59 ModelAPI_AttributeDouble, /** Inner radius at base of cone */,
60 rmax1, GDMLPlugin_ConeSegment::RMAX1_ID(),
61 ModelAPI_AttributeDouble, /** Outer radius at base of cone */,
62 rmin2, GDMLPlugin_ConeSegment::RMIN2_ID(),
63 ModelAPI_AttributeDouble, /** Inner radius at top of cone */,
64 rmax2, GDMLPlugin_ConeSegment::RMAX2_ID(),
65 ModelAPI_AttributeDouble, /** Outer radius at top of cone */,
66 z, GDMLPlugin_ConeSegment::Z_ID(),
67 ModelAPI_AttributeDouble, /** Height of the cone segment */,
68 startphi, GDMLPlugin_ConeSegment::STARTPHI_ID(),
69 ModelAPI_AttributeDouble, /** Start angle of the segment */,
70 deltaphi, GDMLPlugin_ConeSegment::DELTAPHI_ID(),
71 ModelAPI_AttributeDouble, /** Angle of the segment */)
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);
83 /// Dump wrapped feature
85 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
88 /// Pointer on primitive ConeSegment object
89 typedef std::shared_ptr<GDMLAPI_ConeSegment> ConeSegmentPtr;
91 /// \ingroup CPPHighAPI
92 /// \brief Create GDML ConeSegment feature.
94 ConeSegmentPtr 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);
103 #endif // GDMLAPI_ConeSegment_H_