KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ellipse.h
Go to the documentation of this file.
1
/*
2
* This program source code file is part of KiCad, a free EDA CAD application.
3
*
4
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5
*
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License as published by the
8
* Free Software Foundation, either version 3 of the License, or (at your
9
* option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License along
17
* with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef KICAD_ELLIPSE_H
21
#define KICAD_ELLIPSE_H
22
23
#include <
math/vector2d.h
>
24
#include <
geometry/eda_angle.h
>
25
31
32
template
<
typename
NumericType>
33
class
ELLIPSE
34
{
35
public
:
36
ELLIPSE
() =
default
;
37
49
ELLIPSE
(
const
VECTOR2<NumericType>
& aCenter, NumericType aMajorRadius,
50
NumericType aMinorRadius,
EDA_ANGLE
aRotation,
EDA_ANGLE
aStartAngle =
ANGLE_0
,
51
EDA_ANGLE
aEndAngle =
FULL_CIRCLE
);
52
64
ELLIPSE
(
const
VECTOR2<NumericType>
& aCenter,
const
VECTOR2<NumericType>
& aMajor,
double
aRatio,
65
EDA_ANGLE
aStartAngle =
ANGLE_0
,
EDA_ANGLE
aEndAngle =
FULL_CIRCLE
);
66
67
VECTOR2<NumericType>
Center
;
68
NumericType
MajorRadius
;
69
NumericType
MinorRadius
;
70
EDA_ANGLE
Rotation
;
71
EDA_ANGLE
StartAngle
;
72
EDA_ANGLE
EndAngle
;
73
74
};
75
76
#endif
//KICAD_ELLIPSE_H
EDA_ANGLE
Definition
eda_angle.h:37
ELLIPSE::MinorRadius
NumericType MinorRadius
Definition
ellipse.h:69
ELLIPSE::Rotation
EDA_ANGLE Rotation
Definition
ellipse.h:70
ELLIPSE::StartAngle
EDA_ANGLE StartAngle
Definition
ellipse.h:71
ELLIPSE::MajorRadius
NumericType MajorRadius
Definition
ellipse.h:68
ELLIPSE::ELLIPSE
ELLIPSE()=default
ELLIPSE::EndAngle
EDA_ANGLE EndAngle
Definition
ellipse.h:72
ELLIPSE::Center
VECTOR2< NumericType > Center
Definition
ellipse.h:67
VECTOR2
Define a general 2D-vector/point.
Definition
vector2d.h:71
eda_angle.h
ANGLE_0
static constexpr EDA_ANGLE ANGLE_0
Definition
eda_angle.h:411
FULL_CIRCLE
static constexpr EDA_ANGLE FULL_CIRCLE
Definition
eda_angle.h:409
vector2d.h
src
libs
kimath
include
geometry
ellipse.h
Generated on Sun Sep 21 2025 01:05:26 for KiCad PCB EDA Suite by
1.13.2