SHAPER 9.16.0
GDMLPlugin_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 GDMLPLUGIN_CONESEGMENT_H_
21#define GDMLPLUGIN_CONESEGMENT_H_
22
23#include <GDMLPlugin.h>
24#include <ModelAPI_Feature.h>
25#include <GeomAlgoAPI_ConeSegment.h>
26
27class GeomAPI_Shape;
29
35{
36 public:
38 inline static const std::string& ID()
39 {
40 static const std::string MY_CONESEGMENT_ID("ConeSegment");
41 return MY_CONESEGMENT_ID;
42 }
44 inline static const std::string& RMIN1_ID()
45 {
46 static const std::string MY_RMIN1_ID("rmin1");
47 return MY_RMIN1_ID;
48 }
50 inline static const std::string& RMAX1_ID()
51 {
52 static const std::string MY_RMAX1_ID("rmax1");
53 return MY_RMAX1_ID;
54 }
56 inline static const std::string& RMIN2_ID()
57 {
58 static const std::string MY_RMIN2_ID("rmin2");
59 return MY_RMIN2_ID;
60 }
62 inline static const std::string& RMAX2_ID()
63 {
64 static const std::string MY_RMAX2_ID("rmax2");
65 return MY_RMAX2_ID;
66 }
68 inline static const std::string& Z_ID()
69 {
70 static const std::string MY_Z_ID("z");
71 return MY_Z_ID;
72 }
74 inline static const std::string& STARTPHI_ID()
75 {
76 static const std::string MY_STARTPHI_ID("startphi");
77 return MY_STARTPHI_ID;
78 }
80 inline static const std::string& DELTAPHI_ID()
81 {
82 static const std::string MY_DELTAPHI_ID("deltaphi");
83 return MY_DELTAPHI_ID;
84 }
85
87 GDMLPLUGIN_EXPORT virtual const std::string& getKind()
88 {
89 static std::string MY_KIND = GDMLPlugin_ConeSegment::ID();
90 return MY_KIND;
91 }
92
94 GDMLPLUGIN_EXPORT virtual void execute();
95
97 GDMLPLUGIN_EXPORT virtual void initAttributes();
98
101
102 private:
104 void loadNamingDS(std::shared_ptr<GeomAlgoAPI_ConeSegment> theConeSegmentAlgo,
105 std::shared_ptr<ModelAPI_ResultBody> theResultConeSegment);
106
107};
108
109#endif // GDMLPLUGIN_CONESEGMENT_H_
Interface for primitive ConeSegment feature.
Definition: GDMLPlugin_ConeSegment.h:35
GDMLPlugin_ConeSegment()
Use plugin manager for features creation.
Definition: GDMLPlugin_ConeSegment.cpp:27
static const std::string & DELTAPHI_ID()
attribute name of the angle of the segment
Definition: GDMLPlugin_ConeSegment.h:80
virtual GDMLPLUGIN_EXPORT void execute()
Creates a new part document if needed.
Definition: GDMLPlugin_ConeSegment.cpp:44
virtual GDMLPLUGIN_EXPORT void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: GDMLPlugin_ConeSegment.cpp:32
static const std::string & RMIN1_ID()
attribute name of the inner radius at base of cone
Definition: GDMLPlugin_ConeSegment.h:44
virtual GDMLPLUGIN_EXPORT const std::string & getKind()
Returns the kind of a feature.
Definition: GDMLPlugin_ConeSegment.h:87
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
Interface to the topological shape object.
Definition: GeomAPI_Shape.h:43
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:41
The body (shape) result of a feature.
Definition: ModelAPI_ResultBody.h:43