Salome HOME
GeomAlgoAPI_Prism now derived from GeomAlgoAPI_MakeSweep
[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 #include <GeomAPI_Shape.h>
12 #include <GeomAlgoAPI_MakeSweep.h>
13
14 #include <memory>
15
16 /// \class GeomAlgoAPI_Prism
17 /// \ingroup DataAlgo
18 /// \brief Allows to create the prism based on a given face and bounding planes.
19 /// \n Note that only planar faces are allowed as bounding faces and resulting
20 /// extrusion will be bounded by the infinite planes taken from the faces.
21 class GeomAlgoAPI_Prism : public GeomAlgoAPI_MakeSweep
22 {
23 public:
24   /// \brief Creates extrusion for the given shape along the normal for this shape.
25   /// \param[in] theBaseShape face or wire to be extruded.
26   /// \param[in] theToSize offset for "to" plane.
27   /// \param[in] theFromSize offset for "from" plane.
28   GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(std::shared_ptr<GeomAPI_Shape> theBaseShape,
29                                        double                         theToSize,
30                                        double                         theFromSize);
31
32   /// \brief Creates extrusion for the given shape along the normal for this shape.
33   /// \param[in] theBaseShape face or wire to be extruded.
34   /// \param[in] theToShape top bounding shape.  Can be empty. In this case offset will be applied to the basis.
35   /// \param[in] theToSize offset for "to" plane.
36   /// \param[in] theFromShape bottom bounding shape. Can be empty. In this case offset will be applied to the basis.
37   /// \param[in] theFromSize offset for "from" plane.
38   GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(std::shared_ptr<GeomAPI_Shape> theBaseShape,
39                                        std::shared_ptr<GeomAPI_Shape> theToShape,
40                                        double                         theToSize,
41                                        std::shared_ptr<GeomAPI_Shape> theFromShape,
42                                        double                         theFromSize);
43
44 private:
45   /// Builds resulting shape.
46   void build(const std::shared_ptr<GeomAPI_Shape>& theBaseShape,
47              const std::shared_ptr<GeomAPI_Shape>& theToShape,
48              double                                theToSize,
49              const std::shared_ptr<GeomAPI_Shape>& theFromShape,
50              double                                theFromSize);
51 };
52
53 #endif