Salome HOME
Fix crashes in Boolean operations
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Pipe.h
index 197e1be8006534a18a0c057e87a06392059612a0..17c11374ac76ba0db79bd71366e4ea2a678a952b 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        GeomAlgoAPI_Pipe.h
-// Created:     16 March 2016
-// Author:      Dmitry Bobylev
+// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
 
 #ifndef GeomAlgoAPI_Pipe_H_
 #define GeomAlgoAPI_Pipe_H_
@@ -15,7 +29,8 @@
 
 /// \class GeomAlgoAPI_Pipe
 /// \ingroup DataAlgo
-/// \brief Allows to create extrusion of objects along a path. It produces the following results from objects:\n
+/// \brief Allows to create extrusion of objects along a path.
+/// It produces the following results from objects:\n
 /// Vertex -> Edge\n
 /// Edge -> Face\n
 /// Wire -> Shell\n
@@ -26,17 +41,17 @@ public:
   /// \brief Creates extrusion for the given shape along a path.
   /// \param[in] theBaseShape base shape(vertex, edge, wire of face).
   /// \param[in] thePathShape path shape(edge or wire).
-  GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const std::shared_ptr<GeomAPI_Shape> theBaseShape,
-                                      const std::shared_ptr<GeomAPI_Shape> thePathShape);
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const GeomShapePtr theBaseShape,
+                                      const GeomShapePtr thePathShape);
 
   /// \brief Creates extrusion for the given shape along a path.
   /// \param[in] theBaseShape base shape(vertex, edge, wire of face).
   /// \param[in] thePathShape path shape(edge or wire).
   /// \param[in] theBiNormal edge or wire to preserve the constant angle between the normal vector
   /// to the base object and the BiNormal vector.
-  GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const std::shared_ptr<GeomAPI_Shape> theBaseShape,
-                                      const std::shared_ptr<GeomAPI_Shape> thePathShape,
-                                      const std::shared_ptr<GeomAPI_Shape> theBiNormal);
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const GeomShapePtr theBaseShape,
+                                      const GeomShapePtr thePathShape,
+                                      const GeomShapePtr theBiNormal);
 
   /// \brief Creates extrusion for the given shape along a path.
   /// \param[in] theBaseShapes base shape(vertex, edge, wire of face).
@@ -45,30 +60,25 @@ public:
   /// to the base object and the BiNormal vector.
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const ListOfShape& theBaseShapes,
                                       const ListOfShape& theLocations,
-                                      const std::shared_ptr<GeomAPI_Shape> thePathShape);
+                                      const GeomShapePtr thePathShape);
 
   /// \return the list of shapes generated from theShape.
   /// \param[in] theShape base shape.
   /// \param[out] theHistory generated shapes.
-  GEOMALGOAPI_EXPORT void generated(const std::shared_ptr<GeomAPI_Shape> theShape,
+  GEOMALGOAPI_EXPORT void generated(const GeomShapePtr theShape,
                                     ListOfShape& theHistory);
 
 private:
-  void build(const std::shared_ptr<GeomAPI_Shape> theBaseShape,
-             const std::shared_ptr<GeomAPI_Shape> thePathShape);
+  void build(const GeomShapePtr theBaseShape,
+             const GeomShapePtr thePathShape);
 
-  void build(const std::shared_ptr<GeomAPI_Shape> theBaseShape,
-             const std::shared_ptr<GeomAPI_Shape> thePathShape,
-             const std::shared_ptr<GeomAPI_Shape> theBiNormal);
+  void build(const GeomShapePtr theBaseShape,
+             const GeomShapePtr thePathShape,
+             const GeomShapePtr theBiNormal);
 
   void build(const ListOfShape& theBaseShapes,
              const ListOfShape& theLocations,
-             const std::shared_ptr<GeomAPI_Shape> thePathShape);
-
-private:
-  //bool myIsPipeShellUsed;
-  std::shared_ptr<GeomAPI_Shape> myBaseShape;
-  std::shared_ptr<GeomAPI_Shape> myPathShape;
+             const GeomShapePtr thePathShape);
 };
 
 #endif