Salome HOME
Merge branch 'Pre_2.8.0_development'
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_EdgeBuilder.h
index ef0f82df49d04931d80d748a35c2667dcc4232e6..22c248d97bfd412b237fe6ee8416c7a55ca7fad4 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        GeomAlgoAPI_EdgeBuilder.h
-// Created:     23 Apr 2014
-// Author:      Mikhail PONIKAROV
+// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
 
 #ifndef GeomAlgoAPI_EdgeBuilder_H_
 #define GeomAlgoAPI_EdgeBuilder_H_
@@ -11,6 +25,8 @@
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Pnt.h>
 #include <GeomAPI_Dir.h>
+#include <GeomAPI_Lin.h>
+#include <GeomAPI_Circ.h>
 #include <memory>
 
 /**\class GeomAlgoAPI_EdgeBuilder
 class GEOMALGOAPI_EXPORT GeomAlgoAPI_EdgeBuilder
 {
  public:
-  /// Creates linear edge by two points
+  /// Creates linear edge by two points.
+  /// \param theStart a first point of an edge
+  /// \param theEnd an end point of an edge
   static std::shared_ptr<GeomAPI_Edge> line(std::shared_ptr<GeomAPI_Pnt> theStart,
-                                              std::shared_ptr<GeomAPI_Pnt> theEnd);
+                                            std::shared_ptr<GeomAPI_Pnt> theEnd);
+
+  /// Creates linear edge by three dimensions.
+  /// \param theX the X dimension
+  /// \param theY the Y dimension
+  /// \param theZ the Z dimension
+  static std::shared_ptr<GeomAPI_Edge> line(double theDX,
+                                            double theDY,
+                                            double theDZ);
+
+  /// Creates linear edge by GeomAPI_Lin.
+  /// \param theLin line.
+  static std::shared_ptr<GeomAPI_Edge> line(const std::shared_ptr<GeomAPI_Lin> theLin);
+
+  /// Creates edge - axis of the given cylindrical face. The result axis edge is infinite
+  static std::shared_ptr<GeomAPI_Edge> cylinderAxis(
+    std::shared_ptr<GeomAPI_Shape> theCylindricalFace);
 
   /// Creates linear edge in a form of a circle by a point and a circle radius
   static std::shared_ptr<GeomAPI_Edge> lineCircle(std::shared_ptr<GeomAPI_Pnt> theCenter,
                                                     std::shared_ptr<GeomAPI_Dir> theNormal,
                                                     double theRadius);
 
+  /// Creates linear edge in a form of a circle by GeomAPI_Circle
+  static std::shared_ptr<GeomAPI_Edge> lineCircle(std::shared_ptr<GeomAPI_Circ> theCircle);
+
   /// Creates linear edge in a form of a circle arc by a three points
   static std::shared_ptr<GeomAPI_Edge> lineCircleArc(std::shared_ptr<GeomAPI_Pnt> theCenter,
                                                        std::shared_ptr<GeomAPI_Pnt> theStartPoint,
                                                        std::shared_ptr<GeomAPI_Pnt> theEndPoint,
                                                        std::shared_ptr<GeomAPI_Dir> theNormal);
+
+  /// Creates elliptic edge
+  static std::shared_ptr<GeomAPI_Edge> ellipse(const std::shared_ptr<GeomAPI_Pnt>& theCenter,
+                                               const std::shared_ptr<GeomAPI_Dir>& theNormal,
+                                               const std::shared_ptr<GeomAPI_Dir>& theMajorAxis,
+                                               const double                        theMajorRadius,
+                                               const double                        theMinorRadius);
 };
 
 #endif