Salome HOME
Fix the Linux compilation problem
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Prism.h
index 642ff9b305f064acd07f01a3cf67724506a1ca2a..e7c18fcb9af367051b048777238a8cb2b5ca03d4 100644 (file)
@@ -23,26 +23,26 @@ class GeomAlgoAPI_Prism : public GeomAPI_Interface
 {
 public:
   /** \brief Creates extrusion for the given shape along the normal for this shape.
-   *  \param[in] theBasis face or wire to be extruded.
-   *  \param[in] theFromSize offset for "from" plane.
+   *  \param[in] theBaseShape face or wire to be extruded.
    *  \param[in] theToSize offset for "to" plane.
+   *  \param[in] theFromSize offset for "from" plane.
    */
-  GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(std::shared_ptr<GeomAPI_Shape> theBasis,
-                                       double                         theFromSize,
-                                       double                         theToSize);
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(std::shared_ptr<GeomAPI_Shape> theBaseShape,
+                                       double                         theToSize,
+                                       double                         theFromSize);
 
   /** \brief Creates extrusion for the given shape along the normal for this shape.
-   *  \param[in] theBasis face or wire to be extruded.
-   *  \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.
+   *  \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] 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> theBasis,
-                                       std::shared_ptr<GeomAPI_Shape> theFromShape,
-                                       double                         theFromSize,
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(std::shared_ptr<GeomAPI_Shape> theBaseShape,
                                        std::shared_ptr<GeomAPI_Shape> theToShape,
-                                       double                         theToSize);
+                                       double                         theToSize,
+                                       std::shared_ptr<GeomAPI_Shape> theFromShape,
+                                       double                         theFromSize);
 
   /// \return true if algorithm succeed.
   GEOMALGOAPI_EXPORT bool isDone() const;
@@ -56,11 +56,11 @@ public:
   /// \return result of the Prism algorithm.
   GEOMALGOAPI_EXPORT std::shared_ptr<GeomAPI_Shape> shape() const;
 
-  /// \returns the first shape.
-  GEOMALGOAPI_EXPORT std::shared_ptr<GeomAPI_Shape> firstShape() const;
+  /// \returns the list of from faces.
+  GEOMALGOAPI_EXPORT const ListOfShape& fromFaces() const;
 
-  /// \return the last shape.
-  GEOMALGOAPI_EXPORT std::shared_ptr<GeomAPI_Shape> lastShape() const;
+  /// \return the list of to faces.
+  GEOMALGOAPI_EXPORT const ListOfShape& toFaces() const;
 
   /// \return map of sub-shapes of the result. To be used for History keeping.
   GEOMALGOAPI_EXPORT std::shared_ptr<GeomAPI_DataMapOfShapeShape> mapOfShapes() const;
@@ -70,18 +70,18 @@ public:
 
 private:
   /// Builds resulting shape.
-  void build(const std::shared_ptr<GeomAPI_Shape>& theBasis,
-             const std::shared_ptr<GeomAPI_Shape>& theFromShape,
-             double                                theFromSize,
+  void build(const std::shared_ptr<GeomAPI_Shape>& theBaseShape,
              const std::shared_ptr<GeomAPI_Shape>& theToShape,
-             double                                theToSize);
+             double                                theToSize,
+             const std::shared_ptr<GeomAPI_Shape>& theFromShape,
+             double                                theFromSize);
 
 private:
   /// Fields.
   bool myDone;
   std::shared_ptr<GeomAPI_Shape> myShape;
-  std::shared_ptr<GeomAPI_Shape> myFirst;
-  std::shared_ptr<GeomAPI_Shape> myLast;
+  ListOfShape myFromFaces;
+  ListOfShape myToFaces;
   std::shared_ptr<GeomAPI_DataMapOfShapeShape> myMap;
   std::shared_ptr<GeomAlgoAPI_MakeShape> myMkShape;
 };