]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/GeomAlgoAPI/GeomAlgoAPI_Revolution.h
Salome HOME
Add tools
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Revolution.h
index a10b093b05f485a2dd36285423150193fe19fa9c..2484fcee19a99412529d2892760c7a1be107f506 100644 (file)
@@ -34,27 +34,29 @@ class GeomAlgoAPI_Revolution : public GeomAPI_Interface
 public:
   /** \brief Creates revolution for the given shape.
    *  \param[in] theBasis face for revolution.
-   *  \param[in] theFromAngle from angle.
+   *  \param[in] theAxis axis for revolution.
    *  \param[in] theToAngle to angle.
+   *  \param[in] theFromAngle from angle.
    */
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Revolution(std::shared_ptr<GeomAPI_Shape> theBasis,
                                             std::shared_ptr<GeomAPI_Ax1>   theAxis,
-                                            double                         theFromAngle,
-                                            double                         theToAngle);
+                                            double                         theToAngle,
+                                            double                         theFromAngle);
 
   /** \brief Creates revolution for the given shape.
    *  \param[in] theBasis face for revolution.
-   *  \param[in] theFromShape from bounding shape. Can be empty. In this case offset will be applied to the basis.
-   *  \param[in] theFromAngle from angle.
+   *  \param[in] theAxis axis for revolution.
    *  \param[in] theToShape to bounding shape. Can be empty. In this case offset will be applied to the basis.
    *  \param[in] theToAngle to angle.
+   *  \param[in] theFromShape from bounding shape. Can be empty. In this case offset will be applied to the basis.
+   *  \param[in] theFromAngle from angle.
    */
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Revolution(std::shared_ptr<GeomAPI_Shape> theBasis,
                                             std::shared_ptr<GeomAPI_Ax1>   theAxis,
-                                            std::shared_ptr<GeomAPI_Shape> theFromShape,
-                                            double                         theFromAngle,
                                             std::shared_ptr<GeomAPI_Shape> theToShape,
-                                            double                         theToAngle);
+                                            double                         theToAngle,
+                                            std::shared_ptr<GeomAPI_Shape> theFromShape,
+                                            double                         theFromAngle);
 
   /// \return true if algorithm succeed.
   GEOMALGOAPI_EXPORT const bool isDone() const;
@@ -68,11 +70,11 @@ public:
   /// \return result of the Revolution algorithm.
   GEOMALGOAPI_EXPORT const std::shared_ptr<GeomAPI_Shape>& shape() const;
 
-  /// \return the first shape.
-  GEOMALGOAPI_EXPORT const std::shared_ptr<GeomAPI_Shape>& firstShape();
+  /// \returns the list of from faces.
+  GEOMALGOAPI_EXPORT const ListOfShape& fromFaces() const;
 
-  /// \return the last shape.
-  GEOMALGOAPI_EXPORT const std::shared_ptr<GeomAPI_Shape>& lastShape();
+  /// \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;
@@ -89,8 +91,8 @@ private:
    */
   TopoDS_Face makeFaceFromPlane(gp_Pln& thePlane, const gp_Pnt& thePoint);
 
-  /// \return solid created from face.
-  TopoDS_Solid makeSolidFromFace(const TopoDS_Face& theFace);
+  /// \return solid created from face or shell.
+  TopoDS_Solid makeSolidFromShape(const TopoDS_Shape& theShape);
 
   /** \brief Selects solid from theShape with closest center of mass to thePoint
    *  \param[in] theShape compound with solids.
@@ -102,17 +104,17 @@ private:
   /// Builds resulting shape.
   void build(const std::shared_ptr<GeomAPI_Shape>& theBasis,
              const std::shared_ptr<GeomAPI_Ax1>&   theAxis,
-             const std::shared_ptr<GeomAPI_Shape>& theFromShape,
-             double                                theFromAngle,
              const std::shared_ptr<GeomAPI_Shape>& theToShape,
-             double                                theToAngle);
+             double                                theToAngle,
+             const std::shared_ptr<GeomAPI_Shape>& theFromShape,
+             double                                theFromAngle);
 
 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;
 };