1 // Copyright (C) 2014-2019 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef GeomAlgoAPI_Pipe_H_
21 #define GeomAlgoAPI_Pipe_H_
23 #include "GeomAlgoAPI.h"
25 #include "GeomAlgoAPI_MakeSweep.h"
27 #include <GeomAPI_Shape.h>
29 /// \class GeomAlgoAPI_Pipe
31 /// \brief Allows to create extrusion of objects along a path.
32 /// It produces the following results from objects:\n
37 class GeomAlgoAPI_Pipe : public GeomAlgoAPI_MakeSweep
39 GeomAPI_DataMapOfShapeShape myMovedPath; ///< map from initial path edges to the moved
41 /// \brief Creates extrusion for the given shape along a path.
42 /// \param[in] theBaseShape base shape(vertex, edge, wire of face).
43 /// \param[in] thePathShape path shape(edge or wire).
44 GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const GeomShapePtr theBaseShape,
45 const GeomShapePtr thePathShape);
47 /// \brief Creates extrusion for the given shape along a path.
48 /// \param[in] theBaseShape base shape(vertex, edge, wire of face).
49 /// \param[in] thePathShape path shape(edge or wire).
50 /// \param[in] theBiNormal edge or wire to preserve the constant angle between the normal vector
51 /// to the base object and the BiNormal vector.
52 GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const GeomShapePtr theBaseShape,
53 const GeomShapePtr thePathShape,
54 const GeomShapePtr theBiNormal);
56 /// \brief Creates extrusion for the given shape along a path.
57 /// \param[in] theBaseShapes base shape(vertex, edge, wire of face).
58 /// \param[in] theLocations vertexes on the path. Should be empty or same size as theBaseShapes.
59 /// \param[in] thePathShape path shape(edge or wire).
60 /// to the base object and the BiNormal vector.
61 GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const ListOfShape& theBaseShapes,
62 const ListOfShape& theLocations,
63 const GeomShapePtr thePathShape);
65 /// \return the list of shapes generated from theShape.
66 /// \param[in] theShape base shape.
67 /// \param[out] theHistory generated shapes.
68 GEOMALGOAPI_EXPORT void generated(const GeomShapePtr theShape,
69 ListOfShape& theHistory);
72 void build(const GeomShapePtr theBaseShape,
73 const GeomShapePtr thePathShape);
75 void build(const GeomShapePtr theBaseShape,
76 const GeomShapePtr thePathShape,
77 const GeomShapePtr theBiNormal);
79 void build(const ListOfShape& theBaseShapes,
80 const ListOfShape& theLocations,
81 const GeomShapePtr thePathShape);
82 /// keeps the information about the moved path shapes into myMovedPath field
83 void addMovedPath(GeomShapePtr thePath, GeomShapePtr theMoved);