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 GDMLAPI_ConeSegment_H_
22 #define GDMLAPI_ConeSegment_H_
26 #include <GDMLPlugin_ConeSegment.h>
28 #include <ModelHighAPI_Interface.h>
29 #include <ModelHighAPI_Macro.h>
31 class ModelHighAPI_Double;
33 /// \class GDMLPlugin_ConeSegment
34 /// \ingroup CPPHighAPI
35 /// \brief Interface for primitive ConeSegment feature.
36 class GDMLAPI_ConeSegment: public ModelHighAPI_Interface
39 /// Constructor without values.
41 explicit GDMLAPI_ConeSegment(const std::shared_ptr<ModelAPI_Feature>& theFeature);
43 /// Constructor with values.
45 explicit GDMLAPI_ConeSegment(const std::shared_ptr<ModelAPI_Feature>& theFeature,
46 const ModelHighAPI_Double& theRMin1,
47 const ModelHighAPI_Double& theRMax1,
48 const ModelHighAPI_Double& theRMin2,
49 const ModelHighAPI_Double& theRMax2,
50 const ModelHighAPI_Double& theZ,
51 const ModelHighAPI_Double& theStartPhi,
52 const ModelHighAPI_Double& theDeltaPhi);
56 virtual ~GDMLAPI_ConeSegment();
58 INTERFACE_7(GDMLPlugin_ConeSegment::ID(),
59 rmin1, GDMLPlugin_ConeSegment::RMIN1_ID(),
60 ModelAPI_AttributeDouble, /** Inner radius at base of cone */,
61 rmax1, GDMLPlugin_ConeSegment::RMAX1_ID(),
62 ModelAPI_AttributeDouble, /** Outer radius at base of cone */,
63 rmin2, GDMLPlugin_ConeSegment::RMIN2_ID(),
64 ModelAPI_AttributeDouble, /** Inner radius at top of cone */,
65 rmax2, GDMLPlugin_ConeSegment::RMAX2_ID(),
66 ModelAPI_AttributeDouble, /** Outer radius at top of cone */,
67 z, GDMLPlugin_ConeSegment::Z_ID(),
68 ModelAPI_AttributeDouble, /** Height of the cone segment */,
69 startphi, GDMLPlugin_ConeSegment::STARTPHI_ID(),
70 ModelAPI_AttributeDouble, /** Start angle of the segment */,
71 deltaphi, GDMLPlugin_ConeSegment::DELTAPHI_ID(),
72 ModelAPI_AttributeDouble, /** Angle of the segment */)
76 void setAttributes(const ModelHighAPI_Double& theRMin1,
77 const ModelHighAPI_Double& theRMax1,
78 const ModelHighAPI_Double& theRMin2,
79 const ModelHighAPI_Double& theRMax2,
80 const ModelHighAPI_Double& theZ,
81 const ModelHighAPI_Double& theStartPhi,
82 const ModelHighAPI_Double& theDeltaPhi);
84 /// Dump wrapped feature
86 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
89 /// Pointer on primitive ConeSegment object
90 typedef std::shared_ptr<GDMLAPI_ConeSegment> ConeSegmentPtr;
92 /// \ingroup CPPHighAPI
93 /// \brief Create GDML ConeSegment feature.
95 ConeSegmentPtr addConeSegment(const std::shared_ptr<ModelAPI_Document>& thePart,
96 const ModelHighAPI_Double& theRMin1,
97 const ModelHighAPI_Double& theRMax1,
98 const ModelHighAPI_Double& theRMin2,
99 const ModelHighAPI_Double& theRMax2,
100 const ModelHighAPI_Double& theZ,
101 const ModelHighAPI_Double& theStartPhi,
102 const ModelHighAPI_Double& theDeltaPhi);
104 #endif // GDMLAPI_ConeSegment_H_