Salome HOME
Issue #2148: Moving an arc displays a circle
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Prism.h
index f286e6970ebcedbfc9f66d9af11289748a1db3ea..d751d41222d980e8fed05c755d3cbf47ceb4992d 100644 (file)
@@ -7,9 +7,12 @@
 #ifndef GeomAlgoAPI_Prism_H_
 #define GeomAlgoAPI_Prism_H_
 
-#include <GeomAlgoAPI.h>
+#include "GeomAlgoAPI.h"
+
+#include "GeomAlgoAPI_MakeSweep.h"
+
+#include <GeomAPI_Dir.h>
 #include <GeomAPI_Shape.h>
-#include <GeomAlgoAPI_MakeSweep.h>
 
 #include <memory>
 
@@ -22,32 +25,63 @@ class GeomAlgoAPI_Prism : public GeomAlgoAPI_MakeSweep
 {
 public:
   /// \brief Creates extrusion for the given shape along the normal for this shape.
-  /// \param[in] theBaseShape face or wire to be extruded.
+  /// \param[in] theBaseShape planar face or wire to be extruded.
+  /// \param[in] theToSize offset for "to" plane.
+  /// \param[in] theFromSize offset for "from" plane.
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(const GeomShapePtr theBaseShape,
+                                       const double       theToSize,
+                                       const double       theFromSize);
+
+  /// \brief Creates extrusion for the given shape along the normal for this shape.
+  /// \param[in] theBaseShape vertex, edge, wire, face or shell.
+  /// \param[in] theDirection direction of extrusion.
+  ///                         Can be empty if theBaseShape is planar wire or face.
+  /// \param[in] theToSize offset for "to" plane.
+  /// \param[in] theFromSize offset for "from" plane.
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(const GeomShapePtr                 theBaseShape,
+                                       const std::shared_ptr<GeomAPI_Dir> theDirection,
+                                       const double                       theToSize,
+                                       const double                       theFromSize);
+
+  /// \brief Creates extrusion for the given shape along the normal for this shape.
+  /// \param[in] theBaseShape planar face or wire to be extruded.
+  /// \param[in] theToShape top bounding shape. Can be empty.
+  ///                       In this case offset will be applied to the basis.
   /// \param[in] theToSize offset for "to" plane.
+  /// \param[in] theFromShape bottom bounding shape. Can be empty.
+  ///                         In this case offset will be applied to the basis.
   /// \param[in] theFromSize offset for "from" plane.
-  GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(std::shared_ptr<GeomAPI_Shape> theBaseShape,
-                                       double                         theToSize,
-                                       double                         theFromSize);
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(const GeomShapePtr theBaseShape,
+                                       const GeomShapePtr theToShape,
+                                       const double       theToSize,
+                                       const GeomShapePtr theFromShape,
+                                       const double       theFromSize);
 
   /// \brief Creates extrusion for the given shape along the normal for this shape.
-  /// \param[in] theBaseShape face or wire to be extruded.
-  /// \param[in] theToShape top bounding shape.  Can be empty. In this case offset will be applied to the basis.
+  /// \param[in] theBaseShape planar face or wire to be extruded.
+  /// \param[in] theDirection direction of extrusion.
+  ///                         Can be empty if theBaseShape is planar wire or face.
+  /// \param[in] theToShape top bounding shape. Can be empty.
+  ///                       In this case offset will be applied to the basis.
   /// \param[in] theToSize offset for "to" plane.
-  /// \param[in] theFromShape bottom bounding shape. Can be empty. In this case offset will be applied to the basis.
+  /// \param[in] theFromShape bottom bounding shape. Can be empty.
+  ///                         In this case offset will be applied to the basis.
   /// \param[in] theFromSize offset for "from" plane.
-  GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(std::shared_ptr<GeomAPI_Shape> theBaseShape,
-                                       std::shared_ptr<GeomAPI_Shape> theToShape,
-                                       double                         theToSize,
-                                       std::shared_ptr<GeomAPI_Shape> theFromShape,
-                                       double                         theFromSize);
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(const GeomShapePtr                 theBaseShape,
+                                       const std::shared_ptr<GeomAPI_Dir> theDirection,
+                                       const GeomShapePtr                 theToShape,
+                                       const double                       theToSize,
+                                       const GeomShapePtr                 theFromShape,
+                                       const double                       theFromSize);
 
 private:
   /// Builds resulting shape.
-  void build(const std::shared_ptr<GeomAPI_Shape>& theBaseShape,
-             const std::shared_ptr<GeomAPI_Shape>& theToShape,
-             double                                theToSize,
-             const std::shared_ptr<GeomAPI_Shape>& theFromShape,
-             double                                theFromSize);
+  void build(const GeomShapePtr&                theBaseShape,
+             const std::shared_ptr<GeomAPI_Dir> theDirection,
+             const GeomShapePtr&                theToShape,
+             const double                       theToSize,
+             const GeomShapePtr&                theFromShape,
+             const double                       theFromSize);
 };
 
 #endif