Salome HOME
Merge branch 'master' into cgt/devCEA
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_EdgeBuilder.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_EdgeBuilder.h
4 // Created:     23 Apr 2014
5 // Author:      Mikhail PONIKAROV
6
7 #ifndef GeomAlgoAPI_EdgeBuilder_H_
8 #define GeomAlgoAPI_EdgeBuilder_H_
9
10 #include <GeomAlgoAPI.h>
11 #include <GeomAPI_Edge.h>
12 #include <GeomAPI_Pnt.h>
13 #include <GeomAPI_Dir.h>
14 #include <GeomAPI_Lin.h>
15 #include <GeomAPI_Circ.h>
16 #include <memory>
17
18 /**\class GeomAlgoAPI_EdgeBuilder
19  * \ingroup DataAlgo
20  * \brief Allows to create face-shapes by different parameters
21  */
22
23 class GEOMALGOAPI_EXPORT GeomAlgoAPI_EdgeBuilder
24 {
25  public:
26   /// Creates linear edge by two points.
27   /// \param theStart a first point of an edge
28   /// \param theEnd an end point of an edge
29   static std::shared_ptr<GeomAPI_Edge> line(std::shared_ptr<GeomAPI_Pnt> theStart,
30                                             std::shared_ptr<GeomAPI_Pnt> theEnd);
31
32   /// Creates linear edge by three dimensions.
33   /// \param theX the X dimension
34   /// \param theY the Y dimension
35   /// \param theZ the Z dimension
36   static std::shared_ptr<GeomAPI_Edge> line(double theDX,
37                                             double theDY,
38                                             double theDZ);
39
40   /// Creates linear edge by GeomAPI_Lin.
41   /// \param theLin line.
42   static std::shared_ptr<GeomAPI_Edge> line(const std::shared_ptr<GeomAPI_Lin> theLin);
43
44   /// Creates edge - axis of the given cylindrical face. The result axis edge is infinite
45   static std::shared_ptr<GeomAPI_Edge> cylinderAxis(
46     std::shared_ptr<GeomAPI_Shape> theCylindricalFace);
47
48   /// Creates linear edge in a form of a circle by a point and a circle radius
49   static std::shared_ptr<GeomAPI_Edge> lineCircle(std::shared_ptr<GeomAPI_Pnt> theCenter,
50                                                     std::shared_ptr<GeomAPI_Dir> theNormal,
51                                                     double theRadius);
52
53   /// Creates linear edge in a form of a circle by GeomAPI_Circle
54   static std::shared_ptr<GeomAPI_Edge> lineCircle(std::shared_ptr<GeomAPI_Circ> theCircle);
55
56   /// Creates linear edge in a form of a circle arc by a three points
57   static std::shared_ptr<GeomAPI_Edge> lineCircleArc(std::shared_ptr<GeomAPI_Pnt> theCenter,
58                                                        std::shared_ptr<GeomAPI_Pnt> theStartPoint,
59                                                        std::shared_ptr<GeomAPI_Pnt> theEndPoint,
60                                                        std::shared_ptr<GeomAPI_Dir> theNormal);
61 };
62
63 #endif