Salome HOME
Adding tests for "Box" primitive.
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_ConeSegment.h
1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_ConeSegment.h
4 // Created:     24 Nov 2016
5 // Author:      Clarisse Genrault (CEA)
6
7 #ifndef GEOMALGOAPI_CONESEGMENT_H_
8 #define GEOMALGOAPI_CONESEGMENT_H_
9
10 #include <GeomAlgoAPI_MakeShape.h>
11
12 /**\class GeomAlgoAPI_ConeSegment
13  * \ingroup DataAlgo
14  * \brief Allows to create Cone Segment GDML Primitives.
15  */
16 class GeomAlgoAPI_ConeSegment : public GeomAlgoAPI_MakeShape
17 {
18  public:
19   GEOMALGOAPI_EXPORT GeomAlgoAPI_ConeSegment();
20
21   /// Creates a cone segment using standard GDML parameters.
22   /// \param theRMin1 Cone base inner radius.
23   /// \param theRMax1 Cone base outer radius.
24   /// \param theRMin2 Cone top inner radius.
25   /// \param theRMax2 Cone top outer radius.
26   /// \param theZ Cone height.
27   /// \param theStartPhi Start angle of the cone segment.
28   /// \param theDeltaPhi Delta angle of the cone segment.
29   GEOMALGOAPI_EXPORT GeomAlgoAPI_ConeSegment(const double theRMin1,
30                                              const double theRMax1,
31                                              const double theRMin2,
32                                              const double theRMax2,
33                                              const double theZ,
34                                              const double theStartPhi,
35                                              const double theDeltaPhi);
36
37   /// Checks if the set of parameters used to define the cone segment are OK.
38   GEOMALGOAPI_EXPORT bool check();
39
40   /// Builds the cone segment based on the parameters given in the constructor.
41   GEOMALGOAPI_EXPORT void build();
42
43  private:
44   double myRMin1; /// Cone base inner radius.
45   double myRMax1; /// Cone base outer radius.
46   double myRMin2; /// Cone top inner radius.
47   double myRMax2; /// Cone top outer radius.
48   double myZ; /// Cone height.
49   double myStartPhi; /// Start angle of the cone segment.
50   double myDeltaPhi; /// Delta angle of the cone segment.
51 };
52
53 #endif // GEOMALGOAPI_CONESEGMENT_H_
54