0025706: SIGSEGV after making existing BSplineCurve rational
[occt.git] / src / Geom2d / Geom2d_Conic.cdl
CommitLineData
b311480e 1-- Created on: 1993-03-24
2-- Created by: JCV
3-- Copyright (c) 1993-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17deferred class Conic from Geom2d inherits Curve from Geom2d
18
19 --- Purpose : The abstract class Conic describes the common
20 -- behavior of conic curves in 2D space and, in
21 -- particular, their general characteristics. The Geom2d
22 -- package provides four specific classes of conics:
23 -- Geom2d_Circle, Geom2d_Ellipse,
24 -- Geom2d_Hyperbola and Geom2d_Parabola.
25 -- A conic is positioned in the plane with a coordinate
26 -- system (gp_Ax22d object), where the origin is the
27 -- center of the conic (or the apex in case of a parabola).
28 -- This coordinate system is the local coordinate
29 -- system of the conic. It gives the conic an explicit
30 -- orientation, determining the direction in which the
31 -- parameter increases along the conic. The "X Axis" of
32 -- the local coordinate system also defines the origin of
33 -- the parameter of the conic.
34
35uses Ax2d from gp,
36 Ax22d from gp,
37 Pnt2d from gp,
38 Vec2d from gp,
39 Shape from GeomAbs
40
41
42raises ConstructionError from Standard,
43 DomainError from Standard
44
45
46is
47
48
49 SetAxis (me: mutable; A: Ax22d);
50
51 ---Purpose: Modifies this conic, redefining its local coordinate system
52 -- partially, by assigning P as its origin
53
54 SetXAxis (me : mutable; A : Ax2d);
55
56
57 SetYAxis (me : mutable; A : Ax2d);
58 ---Purpose: Assigns the origin and unit vector of axis A to the
59 -- origin of the local coordinate system of this conic and either:
60 -- - its "X Direction", or
61 -- - its "Y Direction".
62 -- The other unit vector of the local coordinate system
63 -- of this conic is recomputed normal to A, without
64 -- changing the orientation of the local coordinate
65 -- system (right-handed or left-handed).
66
67 SetLocation (me : mutable; P : Pnt2d);
68 --- Purpose : Modifies this conic, redefining its local coordinate
69 -- system fully, by assigning A as this coordinate system.
70
71
72 XAxis (me) returns Ax2d;
73 --- Purpose :
74 -- Returns the "XAxis" of the conic.
75 -- This axis defines the origin of parametrization of the conic.
76 -- This axis and the "Yaxis" define the local coordinate system
77 -- of the conic.
78 -- -C++: return const&
79
80
81 YAxis (me) returns Ax2d;
82 --- Purpose :
83 -- Returns the "YAxis" of the conic.
84 -- The "YAxis" is perpendicular to the "Xaxis".
85
86
87 Eccentricity (me) returns Real
88 --- Purpose :
89 -- returns the eccentricity value of the conic e.
90 -- e = 0 for a circle
91 -- 0 < e < 1 for an ellipse (e = 0 if MajorRadius = MinorRadius)
92 -- e > 1 for a hyperbola
93 -- e = 1 for a parabola
94 raises DomainError
95 is deferred;
96
97
98 Location (me) returns Pnt2d;
99 --- Purpose :
100 -- Returns the location point of the conic.
101 -- For the circle, the ellipse and the hyperbola it is the center of
102 -- the conic. For the parabola it is the vertex of the parabola.
103
104
105
106 Position (me) returns Ax22d;
107 ---Purpose :
108 -- Returns the local coordinates system of the conic.
109 ---C++: return const&
110
111
112 Reverse (me : mutable);
113 --- Purpose :
114 -- Reverses the direction of parameterization of <me>.
115 -- The local coordinate system of the conic is modified.
116
117
118 ReversedParameter(me; U : Real) returns Real
119 ---Purpose: Returns the parameter on the reversed curve for
120 -- the point of parameter U on <me>.
121 --
122 is deferred;
123
124
125 Continuity (me) returns Shape from GeomAbs;
126 --- Purpose : Returns GeomAbs_CN which is the global continuity of any conic.
127
128
129 IsCN (me; N : Integer) returns Boolean;
130 --- Purpose :
131 -- Returns True, the order of continuity of a conic is infinite.
132
133
134
135
136
137fields
138
139 pos : Ax22d is protected;
140
141end;
142