1 // Copyright (C) 2014-201x CEA/DEN, EDF R&D -->
3 // File: PrimitivesAPI_Torus.h
4 // Created: 20 Mar 2017
5 // Author: Clarisse Genrault
7 #ifndef PRIMITIVESAPI_TORUS_H_
8 #define PRIMITIVESAPI_TORUS_H_
10 #include "PrimitivesAPI.h"
12 #include <PrimitivesPlugin_Torus.h>
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
17 class ModelHighAPI_Double;
18 class ModelHighAPI_Selection;
20 /// \class PrimitivesAPI_Torus
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for primitive Cone feature.
23 class PrimitivesAPI_Torus: public ModelHighAPI_Interface
26 /// Constructor without values.
28 explicit PrimitivesAPI_Torus(const std::shared_ptr<ModelAPI_Feature>& theFeature);
30 /// Constructor with values.
32 explicit PrimitivesAPI_Torus(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33 const ModelHighAPI_Selection& theBasePoint,
34 const ModelHighAPI_Selection& theAxis,
35 const ModelHighAPI_Double& theRadius,
36 const ModelHighAPI_Double& theRingRadius);
40 virtual ~PrimitivesAPI_Torus();
42 INTERFACE_4(PrimitivesPlugin_Torus::ID(),
43 basePoint, PrimitivesPlugin_Torus::BASE_POINT_ID(),
44 ModelAPI_AttributeSelection, /** Base point */,
45 axis, PrimitivesPlugin_Torus::AXIS_ID(),
46 ModelAPI_AttributeSelection, /** Axis */,
47 radius, PrimitivesPlugin_Torus::RADIUS_ID(),
48 ModelAPI_AttributeDouble, /** Radius */,
49 ringRadius, PrimitivesPlugin_Torus::RING_RADIUS_ID(),
50 ModelAPI_AttributeDouble, /** Ring radius */)
54 void setRadius(const ModelHighAPI_Double& theRadius,
55 const ModelHighAPI_Double& theRingRadius);
57 /// Dump wrapped feature
59 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
62 /// Pointer on primitive Cone object
63 typedef std::shared_ptr<PrimitivesAPI_Torus> TorusPtr;
65 /// \ingroup CPPHighAPI
66 /// \brief Create primitive Cone feature.
68 TorusPtr addTorus(const std::shared_ptr<ModelAPI_Document>& thePart,
69 const ModelHighAPI_Selection& theBasePoint,
70 const ModelHighAPI_Selection& theAxis,
71 const ModelHighAPI_Double& theRadius,
72 const ModelHighAPI_Double& theRingRadius);
74 /// \ingroup CPPHighAPI
75 /// \brief Create primitive Cone feature.
77 TorusPtr addTorus(const std::shared_ptr<ModelAPI_Document>& thePart,
78 const ModelHighAPI_Double& theRadius,
79 const ModelHighAPI_Double& theRingRadius);
81 #endif // PRIMITIVESAPI_TORUS_H_