1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_Prism.h
5 // Author: Dmitry Bobylev
7 #ifndef GeomAlgoAPI_Prism_H_
8 #define GeomAlgoAPI_Prism_H_
10 #include "GeomAlgoAPI.h"
12 #include "GeomAlgoAPI_MakeSweep.h"
14 #include <GeomAPI_Dir.h>
15 #include <GeomAPI_Shape.h>
19 /// \class GeomAlgoAPI_Prism
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
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);
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);
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);
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);
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);