SHAPER 9.16.0
PrimitivesAPI_Cylinder.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 PRIMITIVESAPI_CYLINDER_H_
21#define PRIMITIVESAPI_CYLINDER_H_
22
23#include "PrimitivesAPI.h"
24
25#include <PrimitivesPlugin_Cylinder.h>
26
27#include <ModelHighAPI_Interface.h>
28#include <ModelHighAPI_Macro.h>
29
32
37{
38public:
40 PRIMITIVESAPI_EXPORT
41 explicit PrimitivesAPI_Cylinder(const std::shared_ptr<ModelAPI_Feature>& theFeature);
42
44 PRIMITIVESAPI_EXPORT
45 explicit PrimitivesAPI_Cylinder(const std::shared_ptr<ModelAPI_Feature>& theFeature,
46 const ModelHighAPI_Selection& theBasePoint,
47 const ModelHighAPI_Selection& theAxis,
48 const ModelHighAPI_Double& theRadius,
49 const ModelHighAPI_Double& theHeight);
50
52 PRIMITIVESAPI_EXPORT
53 explicit PrimitivesAPI_Cylinder(const std::shared_ptr<ModelAPI_Feature>& theFeature,
54 const ModelHighAPI_Selection& theBasePoint,
55 const ModelHighAPI_Selection& theAxis,
56 const ModelHighAPI_Double& theRadius,
57 const ModelHighAPI_Double& theHeight,
58 const ModelHighAPI_Double& theAngle);
59
61 PRIMITIVESAPI_EXPORT
63
77
78
79 PRIMITIVESAPI_EXPORT
80 void setSizes(const ModelHighAPI_Double& theRadius,
81 const ModelHighAPI_Double& theHeight);
82
84 PRIMITIVESAPI_EXPORT
85 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
86};
87
89typedef std::shared_ptr<PrimitivesAPI_Cylinder> CylinderPtr;
90
93PRIMITIVESAPI_EXPORT
94CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
95 const ModelHighAPI_Selection& theBasePoint,
96 const ModelHighAPI_Selection& theAxis,
97 const ModelHighAPI_Double& theRadius,
98 const ModelHighAPI_Double& theHeight);
99
102PRIMITIVESAPI_EXPORT
103CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
104 const ModelHighAPI_Selection& theBasePoint,
105 const ModelHighAPI_Selection& theAxis,
106 const ModelHighAPI_Double& theRadius,
107 const ModelHighAPI_Double& theHeight,
108 const ModelHighAPI_Double& theAngle);
109
112PRIMITIVESAPI_EXPORT
113CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
114 const ModelHighAPI_Double& theRadius,
115 const ModelHighAPI_Double& theHeight);
116
119PRIMITIVESAPI_EXPORT
120CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
121 const ModelHighAPI_Double& theRadius,
122 const ModelHighAPI_Double& theHeight,
123 const ModelHighAPI_Double& theAngle);
124
125#endif // PRIMITIVESAPI_CYLINDER_H_
Attribute that contains real value with double precision.
Definition: ModelAPI_AttributeDouble.h:34
Attribute that contains reference to the sub-shape of some result, the selected shape.
Definition: ModelAPI_AttributeSelection.h:35
API for the attribute that contains std (null terminated) string.
Definition: ModelAPI_AttributeString.h:33
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
Class for filling ModelAPI_AttributeSelection.
Definition: ModelHighAPI_Selection.h:49
Interface for primitive Cylinder feature.
Definition: PrimitivesAPI_Cylinder.h:37
virtual std::shared_ptr< ModelAPI_AttributeSelection > basePoint() const
Base point.
Definition: PrimitivesAPI_Cylinder.h:76
virtual std::shared_ptr< ModelAPI_AttributeDouble > angle() const
Angle.
Definition: PrimitivesAPI_Cylinder.h:76
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: PrimitivesAPI_Cylinder.cpp:83
virtual std::shared_ptr< ModelAPI_AttributeString > creationMethod() const
Creation method.
Definition: PrimitivesAPI_Cylinder.h:76
void setSizes(const ModelHighAPI_Double &theRadius, const ModelHighAPI_Double &theHeight)
Set dimensions.
Definition: PrimitivesAPI_Cylinder.cpp:74
virtual std::shared_ptr< ModelAPI_AttributeDouble > radius() const
Radius.
Definition: PrimitivesAPI_Cylinder.h:76
virtual ~PrimitivesAPI_Cylinder()
Destructor.
Definition: PrimitivesAPI_Cylinder.cpp:68
virtual std::shared_ptr< ModelAPI_AttributeSelection > axis() const
Axis.
Definition: PrimitivesAPI_Cylinder.h:76
PrimitivesAPI_Cylinder(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: PrimitivesAPI_Cylinder.cpp:27
virtual std::shared_ptr< ModelAPI_AttributeDouble > height() const
Height.
Definition: PrimitivesAPI_Cylinder.h:76
static const std::string & HEIGHT_ID()
Attribute name of the height.
Definition: PrimitivesPlugin_Cylinder.h:90
static const std::string & BASE_POINT_ID()
Attribute name of the base point.
Definition: PrimitivesPlugin_Cylinder.h:69
static const std::string & CREATION_METHOD()
Attribute name for creation method.
Definition: PrimitivesPlugin_Cylinder.h:48
static const std::string & ANGLE_ID()
Attribute name of the angle.
Definition: PrimitivesPlugin_Cylinder.h:97
static const std::string & AXIS_ID()
Attribute name of the axis.
Definition: PrimitivesPlugin_Cylinder.h:76
static const std::string & RADIUS_ID()
Attribute name of the radius.
Definition: PrimitivesPlugin_Cylinder.h:83
static const std::string & ID()
Cylinder kind.
Definition: PrimitivesPlugin_Cylinder.h:41
CylinderPtr addCylinder(const std::shared_ptr< ModelAPI_Document > &thePart, const ModelHighAPI_Selection &theBasePoint, const ModelHighAPI_Selection &theAxis, const ModelHighAPI_Double &theRadius, const ModelHighAPI_Double &theHeight)
Create primitive Cylinder feature.
Definition: PrimitivesAPI_Cylinder.cpp:111