1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
3 // File: GDMLPlugin_ConeSegment.h
4 // Created: 23 Nov 2016
5 // Author: Clarisse Genrault (CEA)
7 #ifndef GDMLPLUGIN_CONESEGMENT_H_
8 #define GDMLPLUGIN_CONESEGMENT_H_
10 #include <GDMLPlugin.h>
11 #include <ModelAPI_Feature.h>
12 #include <GeomAlgoAPI_ConeSegment.h>
15 class ModelAPI_ResultBody;
17 /**\class GDMLPlugin_ConeSegment
19 * \brief Feature for creation of a GDML ConeSegment solid.
21 class GDMLPlugin_ConeSegment : public ModelAPI_Feature
25 inline static const std::string& ID()
27 static const std::string MY_CONESEGMENT_ID("ConeSegment");
28 return MY_CONESEGMENT_ID;
30 /// attribute name of the inner radius at base of cone
31 inline static const std::string& RMIN1_ID()
33 static const std::string MY_RMIN1_ID("rmin1");
36 /// attribute name of the outer radius at base of cone
37 inline static const std::string& RMAX1_ID()
39 static const std::string MY_RMAX1_ID("rmax1");
42 /// attribute name of the inner radius at top of cone
43 inline static const std::string& RMIN2_ID()
45 static const std::string MY_RMIN2_ID("rmin2");
48 /// attribute name of the outer radius at top of cone
49 inline static const std::string& RMAX2_ID()
51 static const std::string MY_RMAX2_ID("rmax2");
54 /// attribute name of the height of the cone segment
55 inline static const std::string& Z_ID()
57 static const std::string MY_Z_ID("z");
60 /// attribute name of the start angle of the segment
61 inline static const std::string& STARTPHI_ID()
63 static const std::string MY_STARTPHI_ID("startphi");
64 return MY_STARTPHI_ID;
66 /// attribute name of the angle of the segment
67 inline static const std::string& DELTAPHI_ID()
69 static const std::string MY_DELTAPHI_ID("deltaphi");
70 return MY_DELTAPHI_ID;
73 /// Returns the kind of a feature
74 GDMLPLUGIN_EXPORT virtual const std::string& getKind()
76 static std::string MY_KIND = GDMLPlugin_ConeSegment::ID();
80 /// Creates a new part document if needed
81 GDMLPLUGIN_EXPORT virtual void execute();
83 /// Request for initialization of data model of the feature: adding all attributes
84 GDMLPLUGIN_EXPORT virtual void initAttributes();
86 /// Use plugin manager for features creation
87 GDMLPlugin_ConeSegment();
90 /// Load Naming data structure of the feature to the document
91 void loadNamingDS(std::shared_ptr<GeomAlgoAPI_ConeSegment> theConeSegmentAlgo,
92 std::shared_ptr<ModelAPI_ResultBody> theResultConeSegment);
96 #endif // GDMLPLUGIN_CONESEGMENT_H_