SHAPER  9.12.0
PrimitivesAPI_Tube.h
1 // Copyright (C) 2017-2023 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_TUBE_H_
21 #define PRIMITIVESAPI_TUBE_H_
22 
23 #include "PrimitivesAPI.h"
24 
25 #include <PrimitivesPlugin_Tube.h>
26 
27 #include <ModelHighAPI_Double.h>
28 #include <ModelHighAPI_Interface.h>
29 #include <ModelHighAPI_Macro.h>
30 
31 
36 {
37 public:
39  PRIMITIVESAPI_EXPORT
40  explicit PrimitivesAPI_Tube(const std::shared_ptr<ModelAPI_Feature>& theFeature);
41 
43  PRIMITIVESAPI_EXPORT
44  explicit PrimitivesAPI_Tube(const std::shared_ptr<ModelAPI_Feature>& theFeature,
45  const ModelHighAPI_Double& theRMin,
46  const ModelHighAPI_Double& theRMax,
47  const ModelHighAPI_Double& theHeight);
48 
50  PRIMITIVESAPI_EXPORT
51  virtual ~PrimitivesAPI_Tube();
52 
53  INTERFACE_3(PrimitivesPlugin_Tube::ID(),
60 
61 
62  PRIMITIVESAPI_EXPORT
63  void setRadius(const ModelHighAPI_Double& theRMin,
64  const ModelHighAPI_Double& theRMax);
65 
67  PRIMITIVESAPI_EXPORT
68  void setHeight(const ModelHighAPI_Double& theHeight);
69 
71  PRIMITIVESAPI_EXPORT
72  virtual void dump(ModelHighAPI_Dumper& theDumper) const;
73 };
74 
76 typedef std::shared_ptr<PrimitivesAPI_Tube> TubePtr;
77 
80 PRIMITIVESAPI_EXPORT
81 TubePtr addTube(const std::shared_ptr<ModelAPI_Document>& thePart,
82  const ModelHighAPI_Double& theRMin,
83  const ModelHighAPI_Double& theRMax,
84  const ModelHighAPI_Double& theHeight);
85 
86 #endif // PRIMITIVESAPI_TUBE_H_
Attribute that contains real value with double precision.
Definition: ModelAPI_AttributeDouble.h:34
Document for internal data structure of any object storage.
Definition: ModelAPI_Document.h:52
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:42
Interface for primitive Tube feature.
Definition: PrimitivesAPI_Tube.h:36
PrimitivesAPI_Tube(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: PrimitivesAPI_Tube.cpp:26
void setRadius(const ModelHighAPI_Double &theRMin, const ModelHighAPI_Double &theRMax)
Set radius.
Definition: PrimitivesAPI_Tube.cpp:52
virtual std::shared_ptr< ModelAPI_AttributeDouble > rmin() const
Inner radius.
Definition: PrimitivesAPI_Tube.h:59
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: PrimitivesAPI_Tube.cpp:68
virtual ~PrimitivesAPI_Tube()
Destructor.
Definition: PrimitivesAPI_Tube.cpp:47
void setHeight(const ModelHighAPI_Double &theHeight)
Set height.
Definition: PrimitivesAPI_Tube.cpp:61
virtual std::shared_ptr< ModelAPI_AttributeDouble > rmax() const
Outer radius.
Definition: PrimitivesAPI_Tube.h:59
virtual std::shared_ptr< ModelAPI_AttributeDouble > height() const
Height.
Definition: PrimitivesAPI_Tube.h:59
static const std::string & RMAX_ID()
Attrinute name of the outer radius.
Definition: PrimitivesPlugin_Tube.h:53
static const std::string & RMIN_ID()
Attrinute name of the inner radius.
Definition: PrimitivesPlugin_Tube.h:46
static const std::string & ID()
Tube kind.
Definition: PrimitivesPlugin_Tube.h:39
static const std::string & HEIGHT_ID()
Attrinute name of the height.
Definition: PrimitivesPlugin_Tube.h:60
TubePtr addTube(const std::shared_ptr< ModelAPI_Document > &thePart, const ModelHighAPI_Double &theRMin, const ModelHighAPI_Double &theRMax, const ModelHighAPI_Double &theHeight)
Create primitive Tube feature.
Definition: PrimitivesAPI_Tube.cpp:84