X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Ellipse.cpp;h=23247f8435186e8050a71134b4c1464d8250edfd;hb=dc1f458b1518baeab0479275e47fd60d50bc18b7;hp=2d47a5a6f7a9612d68505f303b05821b8a69bdb3;hpb=a299eecbf62594492e777394588e4cf2e6ba11c3;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Ellipse.cpp b/src/GeomAPI/GeomAPI_Ellipse.cpp index 2d47a5a6f..23247f843 100644 --- a/src/GeomAPI/GeomAPI_Ellipse.cpp +++ b/src/GeomAPI/GeomAPI_Ellipse.cpp @@ -1,4 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D +// Copyright (C) 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 +// // File: GeomAPI_Ellipse.cpp // Created: 25 April 2017 @@ -36,6 +54,13 @@ GeomPointPtr GeomAPI_Ellipse::secondFocus() const return std::shared_ptr(new GeomAPI_Pnt(aSecond.X(), aSecond.Y(), aSecond.Z())); } +std::shared_ptr GeomAPI_Ellipse::normal() const +{ + const gp_Ax1& anAxis = MY_ELIPS->Axis(); + const gp_Dir& aDir = anAxis.Direction(); + return std::shared_ptr(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z())); +} + double GeomAPI_Ellipse::minorRadius() const { return MY_ELIPS->MinorRadius();