0024830: Remove redundant keyword 'mutable' in CDL declarations
[occt.git] / src / Geom / Geom_Circle.cdl
CommitLineData
b311480e 1-- Created on: 1993-03-10
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
17class Circle from Geom inherits Conic from Geom
18
19 ---Purpose : Describes a circle in 3D space.
20 -- A circle is defined by its radius and, as with any conic
21 -- curve, is positioned in space with a right-handed
22 -- coordinate system (gp_Ax2 object) where:
23 -- - the origin is the center of the circle, and
24 -- - the origin, "X Direction" and "Y Direction" define the
25 -- plane of the circle.
26 -- This coordinate system is the local coordinate
27 -- system of the circle.
28 -- The "main Direction" of this coordinate system is the
29 -- vector normal to the plane of the circle. The axis, of
30 -- which the origin and unit vector are respectively the
31 -- origin and "main Direction" of the local coordinate
32 -- system, is termed the "Axis" or "main Axis" of the circle.
33 -- The "main Direction" of the local coordinate system
34 -- gives an explicit orientation to the circle (definition of
35 -- the trigonometric sense), determining the direction in
36 -- which the parameter increases along the circle.
37 -- The Geom_Circle circle is parameterized by an angle:
38 -- P(U) = O + R*Cos(U)*XDir + R*Sin(U)*YDir, where:
39 -- - P is the point of parameter U,
40 -- - O, XDir and YDir are respectively the origin, "X
41 -- Direction" and "Y Direction" of its local coordinate system,
42 -- - R is the radius of the circle.
43 -- The "X Axis" of the local coordinate system therefore
44 -- defines the origin of the parameter of the circle. The
45 -- parameter is the angle with this "X Direction".
46 -- A circle is a closed and periodic curve. The period is
47 -- 2.*Pi and the parameter range is [ 0, 2.*Pi [.
48
49
50uses Ax2 from gp,
51 Circ from gp,
52 Pnt from gp,
53 Trsf from gp,
54 Vec from gp,
55 Geometry from Geom
56
57
58raises ConstructionError from Standard,
59 RangeError from Standard
60
61
62is
63
64
65
6e33d3ce 66 Create (C : Circ) returns Circle;
7fd59977 67 ---Purpose : Constructs a circle by conversion of the gp_Circ circle C.
68
69
6e33d3ce 70 Create (A2 : Ax2; Radius : Real) returns Circle
7fd59977 71 ---Purpose : Constructs a circle of radius Radius, where A2 locates the circle and
72 -- defines its orientation in 3D space such that:
73 -- - the center of the circle is the origin of A2,
74 -- - the origin, "X Direction" and "Y Direction" of A2
75 -- define the plane of the circle,
76 -- - A2 is the local coordinate system of the circle.
77 -- Note: It is possible to create a circle where Radius is equal to 0.0.
78 raises ConstructionError;
79 ---Purpose : raised if Radius < 0.
80
81
82 SetCirc (me : mutable; C : Circ)
83 ---Purpose :
84 -- Set <me> so that <me> has the same geometric properties as C.
85 is static;
86
87
88 SetRadius (me : mutable; R : Real)
89 ---Purpose: Assigns the value R to the radius of this circle.
90 -- Note: it is possible to have a circle with a radius equal to 0.0.
91 -- Exceptions - Standard_ConstructionError if R is negative.
92 raises ConstructionError
93 is static;
94
95
96 Circ (me) returns Circ
97 ---Purpose :
98 -- returns the non transient circle from gp with the same
99 -- geometric properties as <me>.
100 is static;
101
102 Radius(me) returns Real
103 is static;
104 ---Purpose: Returns the radius of this circle.
105
106 ReversedParameter(me; U : Real) returns Real is redefined static;
107 ---Purpose: Computes the parameter on the reversed circle for
108 -- the point of parameter U on this circle.
109 -- For a circle, the returned value is: 2.*Pi - U.
110
111
112 Eccentricity (me) returns Real is redefined static;
113 ---Purpose : Returns the eccentricity e = 0 for a circle.
114
115
116 FirstParameter (me) returns Real is redefined static;
117 ---Purpose : Returns the value of the first parameter of this
118 -- circle. This is 0.0, which gives the start point of this circle, or
119 -- The start point and end point of a circle are coincident.
120
121
122 LastParameter (me) returns Real is redefined static;
123 ---Purpose : Returns the value of the last parameter of this
124 -- circle. This is 2.*Pi, which gives the end point of this circle.
125 -- The start point and end point of a circle are coincident.
126
127
128 IsClosed (me) returns Boolean is redefined static;
129 ---Purpose : returns True.
130
131
132 IsPeriodic (me) returns Boolean is redefined static;
133 ---Purpose : returns True.
134
135
136 D0(me; U : Real; P : out Pnt) is redefined static;
137 ---Purpose: Returns in P the point of parameter U.
138 -- P = C + R * Cos (U) * XDir + R * Sin (U) * YDir
139 -- where C is the center of the circle , XDir the XDirection and
140 -- YDir the YDirection of the circle's local coordinate system.
141
142
143 D1 (me; U : Real; P : out Pnt; V1 : out Vec) is redefined static;
144 ---Purpose :
145 -- Returns the point P of parameter U and the first derivative V1.
146
147
148 D2 (me; U : Real; P : out Pnt; V1, V2 : out Vec) is redefined static;
149 ---Purpose :
150 -- Returns the point P of parameter U, the first and second
151 -- derivatives V1 and V2.
152
153
154 D3 (me; U : Real; P : out Pnt; V1, V2, V3 : out Vec) is redefined static;
155 ---Purpose :
156 -- Returns the point P of parameter u, the first second and third
157 -- derivatives V1 V2 and V3.
158
159
160 DN (me; U : Real; N : Integer) returns Vec
161 ---Purpose :
162 -- The returned vector gives the value of the derivative for the
163 -- order of derivation N.
164 raises RangeError
165 is redefined static;
166 ---Purpose : Raised if N < 1.
167
168
169 Transform (me : mutable; T : Trsf) is redefined static;
170 ---Purpose: Applies the transformation T to this circle.
171
172
6e33d3ce 173 Copy (me) returns like me
7fd59977 174 is redefined static;
175 ---Purpose: Creates a new object which is a copy of this circle.
176
177fields
178
179 radius : Real;
180
181end;
182