Salome HOME
Issue #2148: Moving an arc displays a circle
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Pipe.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_Pipe.h
4 // Created:     16 March 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef GeomAlgoAPI_Pipe_H_
8 #define GeomAlgoAPI_Pipe_H_
9
10 #include "GeomAlgoAPI.h"
11
12 #include "GeomAlgoAPI_MakeSweep.h"
13
14 #include <GeomAPI_Shape.h>
15
16 /// \class GeomAlgoAPI_Pipe
17 /// \ingroup DataAlgo
18 /// \brief Allows to create extrusion of objects along a path.
19 /// It produces the following results from objects:\n
20 /// Vertex -> Edge\n
21 /// Edge -> Face\n
22 /// Wire -> Shell\n
23 /// Face -> Solid
24 class GeomAlgoAPI_Pipe : public GeomAlgoAPI_MakeSweep
25 {
26 public:
27   /// \brief Creates extrusion for the given shape along a path.
28   /// \param[in] theBaseShape base shape(vertex, edge, wire of face).
29   /// \param[in] thePathShape path shape(edge or wire).
30   GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const GeomShapePtr theBaseShape,
31                                       const GeomShapePtr thePathShape);
32
33   /// \brief Creates extrusion for the given shape along a path.
34   /// \param[in] theBaseShape base shape(vertex, edge, wire of face).
35   /// \param[in] thePathShape path shape(edge or wire).
36   /// \param[in] theBiNormal edge or wire to preserve the constant angle between the normal vector
37   /// to the base object and the BiNormal vector.
38   GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const GeomShapePtr theBaseShape,
39                                       const GeomShapePtr thePathShape,
40                                       const GeomShapePtr theBiNormal);
41
42   /// \brief Creates extrusion for the given shape along a path.
43   /// \param[in] theBaseShapes base shape(vertex, edge, wire of face).
44   /// \param[in] theLocations vertexes on the path. Should be empty or same size as theBaseShapes.
45   /// \param[in] thePathShape path shape(edge or wire).
46   /// to the base object and the BiNormal vector.
47   GEOMALGOAPI_EXPORT GeomAlgoAPI_Pipe(const ListOfShape& theBaseShapes,
48                                       const ListOfShape& theLocations,
49                                       const GeomShapePtr thePathShape);
50
51   /// \return the list of shapes generated from theShape.
52   /// \param[in] theShape base shape.
53   /// \param[out] theHistory generated shapes.
54   GEOMALGOAPI_EXPORT void generated(const GeomShapePtr theShape,
55                                     ListOfShape& theHistory);
56
57 private:
58   void build(const GeomShapePtr theBaseShape,
59              const GeomShapePtr thePathShape);
60
61   void build(const GeomShapePtr theBaseShape,
62              const GeomShapePtr thePathShape,
63              const GeomShapePtr theBiNormal);
64
65   void build(const ListOfShape& theBaseShapes,
66              const ListOfShape& theLocations,
67              const GeomShapePtr thePathShape);
68 };
69
70 #endif