1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_EdgeBuilder.h
4 // Created: 23 Apr 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef GeomAlgoAPI_EdgeBuilder_H_
8 #define GeomAlgoAPI_EdgeBuilder_H_
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>
18 /**\class GeomAlgoAPI_EdgeBuilder
20 * \brief Allows to create face-shapes by different parameters
23 class GEOMALGOAPI_EXPORT GeomAlgoAPI_EdgeBuilder
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);
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,
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);
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);
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,
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);
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);
62 /// Creates elliptic edge
63 static std::shared_ptr<GeomAPI_Edge> ellipse(const std::shared_ptr<GeomAPI_Pnt>& theCenter,
64 const std::shared_ptr<GeomAPI_Dir>& theNormal,
65 const std::shared_ptr<GeomAPI_Dir>& theMajorAxis,
66 const double theMajorRadius,
67 const double theMinorRadius);