]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomAlgoAPI/GeomAlgoAPI_Pipe.h
Salome HOME
bc97bef65d4a9af03925521b902ef20ed38b1ba3
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Pipe.h
1 // Copyright (C) 2014-2019  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef GeomAlgoAPI_Pipe_H_
21 #define GeomAlgoAPI_Pipe_H_
22
23 #include "GeomAlgoAPI.h"
24
25 #include "GeomAlgoAPI_MakeSweep.h"
26
27 #include <GeomAPI_Shape.h>
28
29 /// \class GeomAlgoAPI_Pipe
30 /// \ingroup DataAlgo
31 /// \brief Allows to create extrusion of objects along a path.
32 /// It produces the following results from objects:\n
33 /// Vertex -> Edge\n
34 /// Edge -> Face\n
35 /// Wire -> Shell\n
36 /// Face -> Solid
37 class GeomAlgoAPI_Pipe : public GeomAlgoAPI_MakeSweep
38 {
39 public:
40   /// \brief Creates extrusion for the given shape along a path.
41   /// \param[in] theBaseShape base shape(vertex, edge, wire of face).
42   /// \param[in] thePathShape path shape(edge or wire).
43   GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const GeomShapePtr theBaseShape,
44                                       const GeomShapePtr thePathShape);
45
46   /// \brief Creates extrusion for the given shape along a path.
47   /// \param[in] theBaseShape base shape(vertex, edge, wire of face).
48   /// \param[in] thePathShape path shape(edge or wire).
49   /// \param[in] theBiNormal edge or wire to preserve the constant angle between the normal vector
50   /// to the base object and the BiNormal vector.
51   GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const GeomShapePtr theBaseShape,
52                                       const GeomShapePtr thePathShape,
53                                       const GeomShapePtr theBiNormal);
54
55   /// \brief Creates extrusion for the given shape along a path.
56   /// \param[in] theBaseShapes base shape(vertex, edge, wire of face).
57   /// \param[in] theLocations vertexes on the path. Should be empty or same size as theBaseShapes.
58   /// \param[in] thePathShape path shape(edge or wire).
59   /// to the base object and the BiNormal vector.
60   GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const ListOfShape& theBaseShapes,
61                                       const ListOfShape& theLocations,
62                                       const GeomShapePtr thePathShape);
63
64   /// \return the list of shapes generated from theShape.
65   /// \param[in] theShape base shape.
66   /// \param[out] theHistory generated shapes.
67   GEOMALGOAPI_EXPORT void generated(const GeomShapePtr theShape,
68                                     ListOfShape& theHistory);
69
70 private:
71   void build(const GeomShapePtr theBaseShape,
72              const GeomShapePtr thePathShape);
73
74   void build(const GeomShapePtr theBaseShape,
75              const GeomShapePtr thePathShape,
76              const GeomShapePtr theBiNormal);
77
78   void build(const ListOfShape& theBaseShapes,
79              const ListOfShape& theLocations,
80              const GeomShapePtr thePathShape);
81 };
82
83 #endif