]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomAlgoAPI/GeomAlgoAPI_Prism.h
Salome HOME
Issue #1860: fix end lines with spaces
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Prism.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_Prism.h
4 // Created:     5 May 2015
5 // Author:      Dmitry Bobylev
6
7 #ifndef GeomAlgoAPI_Prism_H_
8 #define GeomAlgoAPI_Prism_H_
9
10 #include "GeomAlgoAPI.h"
11
12 #include "GeomAlgoAPI_MakeSweep.h"
13
14 #include <GeomAPI_Dir.h>
15 #include <GeomAPI_Shape.h>
16
17 #include <memory>
18
19 /// \class GeomAlgoAPI_Prism
20 /// \ingroup DataAlgo
21 /// \brief Allows to create the prism based on a given face and bounding planes.
22 /// \n Note that only planar faces are allowed as bounding faces and resulting
23 /// extrusion will be bounded by the infinite planes taken from the faces.
24 class GeomAlgoAPI_Prism : public GeomAlgoAPI_MakeSweep
25 {
26 public:
27   /// \brief Creates extrusion for the given shape along the normal for this shape.
28   /// \param[in] theBaseShape planar face or wire to be extruded.
29   /// \param[in] theToSize offset for "to" plane.
30   /// \param[in] theFromSize offset for "from" plane.
31   GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(const GeomShapePtr theBaseShape,
32                                        const double       theToSize,
33                                        const double       theFromSize);
34
35   /// \brief Creates extrusion for the given shape along the normal for this shape.
36   /// \param[in] theBaseShape vertex, edge, wire, face or shell.
37   /// \param[in] theDirection direction of extrusion.
38   ///                         Can be empty if theBaseShape is planar wire or face.
39   /// \param[in] theToSize offset for "to" plane.
40   /// \param[in] theFromSize offset for "from" plane.
41   GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(const GeomShapePtr                 theBaseShape,
42                                        const std::shared_ptr<GeomAPI_Dir> theDirection,
43                                        const double                       theToSize,
44                                        const double                       theFromSize);
45
46   /// \brief Creates extrusion for the given shape along the normal for this shape.
47   /// \param[in] theBaseShape planar face or wire to be extruded.
48   /// \param[in] theToShape top bounding shape. Can be empty.
49   ///                       In this case offset will be applied to the basis.
50   /// \param[in] theToSize offset for "to" plane.
51   /// \param[in] theFromShape bottom bounding shape. Can be empty.
52   ///                         In this case offset will be applied to the basis.
53   /// \param[in] theFromSize offset for "from" plane.
54   GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(const GeomShapePtr theBaseShape,
55                                        const GeomShapePtr theToShape,
56                                        const double       theToSize,
57                                        const GeomShapePtr theFromShape,
58                                        const double       theFromSize);
59
60   /// \brief Creates extrusion for the given shape along the normal for this shape.
61   /// \param[in] theBaseShape planar face or wire to be extruded.
62   /// \param[in] theDirection direction of extrusion.
63   ///                         Can be empty if theBaseShape is planar wire or face.
64   /// \param[in] theToShape top bounding shape. Can be empty.
65   ///                       In this case offset will be applied to the basis.
66   /// \param[in] theToSize offset for "to" plane.
67   /// \param[in] theFromShape bottom bounding shape. Can be empty.
68   ///                         In this case offset will be applied to the basis.
69   /// \param[in] theFromSize offset for "from" plane.
70   GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(const GeomShapePtr                 theBaseShape,
71                                        const std::shared_ptr<GeomAPI_Dir> theDirection,
72                                        const GeomShapePtr                 theToShape,
73                                        const double                       theToSize,
74                                        const GeomShapePtr                 theFromShape,
75                                        const double                       theFromSize);
76
77 private:
78   /// Builds resulting shape.
79   void build(const GeomShapePtr&                theBaseShape,
80              const std::shared_ptr<GeomAPI_Dir> theDirection,
81              const GeomShapePtr&                theToShape,
82              const double                       theToSize,
83              const GeomShapePtr&                theFromShape,
84              const double                       theFromSize);
85 };
86
87 #endif