b311480e |
1 | -- Copyright (c) 1991-1999 Matra Datavision |
973c2be1 |
2 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
3 | -- |
973c2be1 |
4 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
5 | -- |
d5f74e42 |
6 | -- This library is free software; you can redistribute it and/or modify it under |
7 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
8 | -- by the Free Software Foundation, with special exception defined in the file |
9 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
10 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
11 | -- |
973c2be1 |
12 | -- Alternatively, this file may be used under the terms of Open CASCADE |
13 | -- commercial license or contractual agreement. |
7fd59977 |
14 | |
087da3bd |
15 | class Cone from gp |
7fd59977 |
16 | |
17 | |
18 | |
19 | --- Purpose : |
20 | -- Defines an infinite conical surface. |
21 | -- A cone is defined by its half-angle at the apex and |
22 | -- positioned in space with a coordinate system (a gp_Ax3 |
23 | -- object) and a "reference radius" where: |
24 | -- - the "main Axis" of the coordinate system is the axis of revolution of the cone, |
25 | -- - the plane defined by the origin, the "X Direction" and |
26 | -- the "Y Direction" of the coordinate system is the |
27 | -- reference plane of the cone; the intersection of the |
28 | -- cone with this reference plane is a circle of radius |
29 | -- equal to the reference radius, |
30 | -- if the half-angle is positive, the apex of the cone is on |
31 | -- the negative side of the "main Axis" of the coordinate |
32 | -- system. If the half-angle is negative, the apex is on the positive side. |
33 | -- This coordinate system is the "local coordinate system" of the cone. |
34 | -- Note: when a gp_Cone cone is converted into a |
35 | -- Geom_ConicalSurface cone, some implicit properties of |
36 | -- its local coordinate system are used explicitly: |
37 | -- - its origin, "X Direction", "Y Direction" and "main |
38 | -- Direction" are used directly to define the parametric |
39 | -- directions on the cone and the origin of the parameters, |
40 | -- - its implicit orientation (right-handed or left-handed) |
41 | -- gives the orientation (direct or indirect) of the |
42 | -- Geom_ConicalSurface cone. |
43 | -- See Also |
44 | -- gce_MakeCone which provides functions for more |
45 | -- complex cone constructions |
46 | -- Geom_ConicalSurface which provides additional |
47 | -- functions for constructing cones and works, in particular, |
48 | -- with the parametric equations of cones gp_Ax3 |
49 | |
50 | |
51 | uses Ax1 from gp, |
52 | Ax2 from gp, |
53 | Ax3 from gp, |
54 | Dir from gp, |
55 | Pnt from gp, |
56 | Trsf from gp, |
57 | Vec from gp |
58 | |
59 | raises ConstructionError from Standard |
60 | |
61 | is |
62 | |
63 | Create returns Cone; |
64 | ---C++:inline |
65 | --- Purpose : Creates an indefinite Cone. |
66 | |
67 | Create (A3 : Ax3; Ang : Real; Radius : Real) returns Cone |
68 | ---C++:inline |
69 | --- Purpose : |
70 | -- Creates an infinite conical surface. A3 locates the cone |
71 | -- in the space and defines the reference plane of the surface. |
72 | -- Ang is the conical surface semi-angle between 0 and PI/2 radians. |
73 | -- Radius is the radius of the circle in the reference plane of |
74 | -- the cone. |
75 | --- Raises ConstructionError |
76 | -- . if Radius is lower than 0.0 |
77 | -- . Ang < Resolution from gp or Ang >= (PI/2) - Resolution. |
78 | raises ConstructionError; |
79 | |
80 | SetAxis (me : in out; A1 : Ax1) |
81 | ---C++:inline |
82 | --- Purpose : Changes the symmetry axis of the cone. Raises ConstructionError |
83 | -- the direction of A1 is parallel to the "XDirection" |
84 | -- of the coordinate system of the cone. |
85 | raises ConstructionError |
86 | |
87 | is static; |
88 | |
89 | SetLocation (me : in out; Loc : Pnt) is static; |
90 | ---C++:inline |
91 | --- Purpose : Changes the location of the cone. |
92 | |
93 | SetPosition (me : in out; A3 : Ax3) is static; |
94 | ---C++:inline |
95 | --- Purpose : |
96 | -- Changes the local coordinate system of the cone. |
97 | -- This coordinate system defines the reference plane of the cone. |
98 | |
99 | SetRadius (me : in out; R : Real) |
100 | ---C++:inline |
101 | --- Purpose : |
102 | -- Changes the radius of the cone in the reference plane of |
103 | -- the cone. |
104 | raises ConstructionError |
105 | --- Purpose : Raised if R < 0.0 |
106 | is static; |
107 | |
108 | SetSemiAngle (me : in out; Ang : Real) |
109 | ---C++:inline |
110 | --- Purpose : |
111 | -- Changes the semi-angle of the cone. |
112 | -- Ang is the conical surface semi-angle ]0,PI/2[. |
113 | -- Raises ConstructionError if Ang < Resolution from gp or Ang >= PI/2 - Resolution |
114 | raises ConstructionError |
115 | |
116 | is static; |
117 | |
118 | Apex (me) returns Pnt is static; |
119 | ---C++:inline |
120 | --- Purpose : |
121 | -- Computes the cone's top. The Apex of the cone is on the |
122 | -- negative side of the symmetry axis of the cone. |
123 | |
124 | UReverse (me : in out) |
125 | ---C++:inline |
126 | ---Purpose: Reverses the U parametrization of the cone |
127 | -- reversing the YAxis. |
128 | is static; |
129 | |
130 | VReverse (me : in out) |
131 | ---C++:inline |
132 | ---Purpose: Reverses the V parametrization of the cone reversing the ZAxis. |
133 | is static; |
134 | |
135 | Direct (me) returns Boolean from Standard |
136 | ---C++:inline |
137 | ---Purpose: Returns true if the local coordinate system of this cone is right-handed. |
138 | is static; |
139 | |
140 | Axis (me) returns Ax1 is static; |
141 | ---C++:inline |
142 | --- Purpose : returns the symmetry axis of the cone. |
143 | ---C++: return const& |
144 | |
145 | Coefficients (me; A1, A2, A3, B1, B2, B3, C1, C2, C3, D : out Real) |
146 | is static; |
147 | --- Purpose : |
148 | -- Computes the coefficients of the implicit equation of the quadric |
149 | -- in the absolute cartesian coordinates system : |
150 | -- A1.X**2 + A2.Y**2 + A3.Z**2 + 2.(B1.X.Y + B2.X.Z + B3.Y.Z) + |
151 | -- 2.(C1.X + C2.Y + C3.Z) + D = 0.0 |
152 | |
153 | Location (me) returns Pnt is static; |
154 | ---C++:inline |
155 | --- Purpose : returns the "Location" point of the cone. |
156 | ---C++: return const& |
157 | |
158 | Position (me) returns Ax3 is static; |
159 | --- Purpose : |
160 | -- Returns the local coordinates system of the cone. |
161 | ---C++: inline |
162 | ---C++: return const& |
163 | |
164 | RefRadius (me) returns Real is static; |
165 | ---C++: inline |
166 | --- Purpose : |
167 | -- Returns the radius of the cone in the reference plane. |
168 | |
169 | SemiAngle (me) returns Real is static; |
170 | ---C++: inline |
171 | ---Purpose: Returns the half-angle at the apex of this cone. |
172 | |
173 | XAxis (me) returns Ax1 is static; |
174 | ---C++:inline |
175 | --- Purpose : Returns the XAxis of the reference plane. |
176 | |
177 | YAxis (me) returns Ax1 is static; |
178 | ---C++:inline |
179 | --- Purpose : Returns the YAxis of the reference plane. |
180 | |
181 | Mirror (me : in out; P : Pnt) is static; |
182 | |
183 | Mirrored (me; P : Pnt) returns Cone is static; |
184 | |
185 | --- Purpose : |
186 | -- Performs the symmetrical transformation of a cone |
187 | -- with respect to the point P which is the center of the |
188 | -- symmetry. |
189 | |
190 | |
191 | |
192 | Mirror (me : in out; A1 : Ax1) is static; |
193 | |
194 | Mirrored (me; A1 : Ax1) returns Cone is static; |
195 | |
196 | --- Purpose : |
197 | -- Performs the symmetrical transformation of a cone with |
198 | -- respect to an axis placement which is the axis of the |
199 | -- symmetry. |
200 | |
201 | |
202 | |
203 | |
204 | Mirror (me : in out; A2 : Ax2) is static; |
205 | |
206 | Mirrored (me; A2 : Ax2) returns Cone is static; |
207 | |
208 | --- Purpose : |
209 | -- Performs the symmetrical transformation of a cone with respect |
210 | -- to a plane. The axis placement A2 locates the plane of the |
211 | -- of the symmetry : (Location, XDirection, YDirection). |
212 | |
213 | Rotate (me : in out; A1 : Ax1; Ang : Real) is static; |
214 | ---C++: inline |
215 | |
216 | Rotated (me; A1 : Ax1; Ang : Real) returns Cone is static; |
217 | ---C++: inline |
218 | --- Purpose : |
219 | -- Rotates a cone. A1 is the axis of the rotation. |
220 | -- Ang is the angular value of the rotation in radians. |
221 | |
222 | Scale (me : in out; P : Pnt; S : Real) is static; |
223 | ---C++: inline |
224 | |
225 | Scaled (me; P : Pnt; S : Real) returns Cone is static; |
226 | ---C++: inline |
227 | --- Purpose : |
228 | -- Scales a cone. S is the scaling value. |
229 | -- The absolute value of S is used to scale the cone |
230 | |
231 | |
232 | Transform (me : in out; T : Trsf) is static; |
233 | ---C++: inline |
234 | |
235 | Transformed (me; T : Trsf) returns Cone is static; |
236 | ---C++: inline |
237 | --- Purpose : |
238 | -- Transforms a cone with the transformation T from class Trsf. |
239 | |
240 | |
241 | Translate (me : in out; V : Vec) is static; |
242 | ---C++: inline |
243 | |
244 | Translated (me; V : Vec) returns Cone is static; |
245 | ---C++: inline |
246 | --- Purpose : |
247 | -- Translates a cone in the direction of the vector V. |
248 | -- The magnitude of the translation is the vector's magnitude. |
249 | |
250 | |
251 | |
252 | Translate (me : in out; P1, P2 : Pnt) is static; |
253 | ---C++: inline |
254 | Translated (me; P1, P2 : Pnt) returns Cone is static; |
255 | ---C++: inline |
256 | --- Purpose : |
257 | -- Translates a cone from the point P1 to the point P2. |
258 | |
259 | |
260 | |
261 | |
262 | fields |
263 | |
264 | pos : Ax3; |
265 | radius : Real; |
266 | semiAngle : Real; |
267 | |
268 | end; |