SHAPER 9.16.0
GeomAPI_Ellipse.h
1// Copyright (C) 2017-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20// File: GeomAPI_Ellipse.h
21// Created: 25 April 2017
22// Author: Vitaly Smetannikov
23
24#ifndef GeomAPI_Ellipse_H_
25#define GeomAPI_Ellipse_H_
26
27#include <GeomAPI_Interface.h>
28#include <memory>
29
30class GeomAPI_Ax2;
31class GeomAPI_Curve;
32class GeomAPI_Dir;
33class GeomAPI_Pnt;
34
35
41{
42public:
43
45 GEOMAPI_EXPORT GeomAPI_Ellipse() : GeomAPI_Interface() {}
46
54 GEOMAPI_EXPORT GeomAPI_Ellipse(const std::shared_ptr<GeomAPI_Ax2>& theAx2,
55 double theMajorRadius, double theMinorRadius);
56
57 GEOMAPI_EXPORT GeomAPI_Ellipse(std::shared_ptr<GeomAPI_Curve> theCurve);
58
60 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> center() const;
61
63 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> firstFocus() const;
64
66 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> secondFocus() const;
67
69 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> normal() const;
70
72 GEOMAPI_EXPORT double minorRadius() const;
73
75 GEOMAPI_EXPORT double majorRadius() const;
76
78 GEOMAPI_EXPORT const std::shared_ptr<GeomAPI_Pnt> project(
79 const std::shared_ptr<GeomAPI_Pnt>& thePoint) const;
80
90 GEOMAPI_EXPORT const bool parameter(const std::shared_ptr<GeomAPI_Pnt> thePoint,
91 const double theTolerance,
92 double& theParameter) const;
93};
94
96typedef std::shared_ptr<GeomAPI_Ellipse> GeomEllipsePtr;
97
98#endif
The class represents an axis in 3D space.
Definition: GeomAPI_Ax2.h:31
Interface to the generic curve object.
Definition: GeomAPI_Curve.h:34
3D direction defined by three normalized coordinates
Definition: GeomAPI_Dir.h:34
Ellipse in 3D.
Definition: GeomAPI_Ellipse.h:41
GEOMAPI_EXPORT double minorRadius() const
Returns minor radius of the ellipse.
Definition: GeomAPI_Ellipse.cpp:77
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_Pnt > project(const std::shared_ptr< GeomAPI_Pnt > &thePoint) const
Project point on ellipse.
Definition: GeomAPI_Ellipse.cpp:87
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt > firstFocus() const
Returns first focus of the ellipse.
Definition: GeomAPI_Ellipse.cpp:58
GEOMAPI_EXPORT double majorRadius() const
Returns major radius of the ellipse.
Definition: GeomAPI_Ellipse.cpp:82
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Dir > normal() const
Return orthogonal direction to the ellipse's plane.
Definition: GeomAPI_Ellipse.cpp:70
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt > secondFocus() const
Returns second focus of the ellipse.
Definition: GeomAPI_Ellipse.cpp:64
GEOMAPI_EXPORT GeomAPI_Ellipse()
Constructs an empty ellipse.
Definition: GeomAPI_Ellipse.h:45
GEOMAPI_EXPORT const bool parameter(const std::shared_ptr< GeomAPI_Pnt > thePoint, const double theTolerance, double &theParameter) const
Computes the parameter of a given point on an ellipse.
Definition: GeomAPI_Ellipse.cpp:107
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt > center() const
Returns center of the ellipse.
Definition: GeomAPI_Ellipse.cpp:52
General base class for all interfaces in this package.
Definition: GeomAPI_Interface.h:38
3D point defined by three coordinates
Definition: GeomAPI_Pnt.h:38