SHAPER 9.16.0
PrimitivesAPI_Cone.h
1// Copyright (C) 2017-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// File: PrimitivesAPI_Cone.h
21// Created: 20 Mar 2017
22// Author: Clarisse Genrault
23
24#ifndef PRIMITIVESAPI_CONE_H_
25#define PRIMITIVESAPI_CONE_H_
26
27#include "PrimitivesAPI.h"
28
29#include <PrimitivesPlugin_Cone.h>
30
31#include <ModelHighAPI_Interface.h>
32#include <ModelHighAPI_Macro.h>
33
36
41{
42public:
44 PRIMITIVESAPI_EXPORT
45 explicit PrimitivesAPI_Cone(const std::shared_ptr<ModelAPI_Feature>& theFeature);
46
48 PRIMITIVESAPI_EXPORT
49 explicit PrimitivesAPI_Cone(const std::shared_ptr<ModelAPI_Feature>& theFeature,
50 const ModelHighAPI_Selection& theBasePoint,
51 const ModelHighAPI_Selection& theAxis,
52 const ModelHighAPI_Double& theBaseRadius,
53 const ModelHighAPI_Double& theTopRadius,
54 const ModelHighAPI_Double& theHeight);
55
57 PRIMITIVESAPI_EXPORT
58 virtual ~PrimitivesAPI_Cone();
59
60 INTERFACE_5(PrimitivesPlugin_Cone::ID(),
71
72
73 PRIMITIVESAPI_EXPORT
74 void setRadius(const ModelHighAPI_Double& theBaseRadius,
75 const ModelHighAPI_Double& theTopRadius);
76
78 PRIMITIVESAPI_EXPORT
79 void setHeight(const ModelHighAPI_Double& theHeight);
80
82 PRIMITIVESAPI_EXPORT
83 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
84};
85
87typedef std::shared_ptr<PrimitivesAPI_Cone> ConePtr;
88
91PRIMITIVESAPI_EXPORT
92ConePtr addCone(const std::shared_ptr<ModelAPI_Document>& thePart,
93 const ModelHighAPI_Selection& theBasePoint,
94 const ModelHighAPI_Selection& theAxis,
95 const ModelHighAPI_Double& theBaseRadius,
96 const ModelHighAPI_Double& theTopRadius,
97 const ModelHighAPI_Double& theHeight);
98
101PRIMITIVESAPI_EXPORT
102ConePtr addCone(const std::shared_ptr<ModelAPI_Document>& thePart,
103 const ModelHighAPI_Double& theBaseRadius,
104 const ModelHighAPI_Double& theTopRadius,
105 const ModelHighAPI_Double& theHeight);
106
107#endif // PRIMITIVESAPI_CONE_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
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 Cone feature.
Definition: PrimitivesAPI_Cone.h:41
void setRadius(const ModelHighAPI_Double &theBaseRadius, const ModelHighAPI_Double &theTopRadius)
Set radius.
Definition: PrimitivesAPI_Cone.cpp:61
virtual std::shared_ptr< ModelAPI_AttributeDouble > height() const
Height.
Definition: PrimitivesAPI_Cone.h:70
PrimitivesAPI_Cone(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: PrimitivesAPI_Cone.cpp:31
virtual std::shared_ptr< ModelAPI_AttributeDouble > topRadius() const
Top radius.
Definition: PrimitivesAPI_Cone.h:70
virtual std::shared_ptr< ModelAPI_AttributeSelection > axis() const
Axis.
Definition: PrimitivesAPI_Cone.h:70
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: PrimitivesAPI_Cone.cpp:77
void setHeight(const ModelHighAPI_Double &theHeight)
Set height.
Definition: PrimitivesAPI_Cone.cpp:70
virtual ~PrimitivesAPI_Cone()
Destructor.
Definition: PrimitivesAPI_Cone.cpp:56
virtual std::shared_ptr< ModelAPI_AttributeSelection > basePoint() const
Base point.
Definition: PrimitivesAPI_Cone.h:70
virtual std::shared_ptr< ModelAPI_AttributeDouble > baseRadius() const
Base radius.
Definition: PrimitivesAPI_Cone.h:70
static const std::string & HEIGHT_ID()
Attribute name of the radius.
Definition: PrimitivesPlugin_Cone.h:76
static const std::string & ID()
Cone kind.
Definition: PrimitivesPlugin_Cone.h:41
static const std::string & TOP_RADIUS_ID()
Attribute name of the radius.
Definition: PrimitivesPlugin_Cone.h:69
static const std::string & BASE_RADIUS_ID()
Attribute name of the base radius.
Definition: PrimitivesPlugin_Cone.h:62
static const std::string & BASE_POINT_ID()
Attribute name of the base point.
Definition: PrimitivesPlugin_Cone.h:48
static const std::string & AXIS_ID()
Attribute name of the axis.
Definition: PrimitivesPlugin_Cone.h:55
ConePtr addCone(const std::shared_ptr< ModelAPI_Document > &thePart, const ModelHighAPI_Selection &theBasePoint, const ModelHighAPI_Selection &theAxis, const ModelHighAPI_Double &theBaseRadius, const ModelHighAPI_Double &theTopRadius, const ModelHighAPI_Double &theHeight)
Create primitive Cone feature.
Definition: PrimitivesAPI_Cone.cpp:99