b311480e |
1 | -- Created on: 1993-01-09 |
2 | -- Created by: CKY / Contract Toubro-Larsen ( SIVA ) |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
7fd59977 |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
7fd59977 |
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. |
7fd59977 |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class Ellipsoid from IGESSolid inherits IGESEntity |
18 | |
19 | ---Purpose: defines Ellipsoid, Type <168> Form Number <0> |
20 | -- in package IGESSolid |
21 | -- The ellipsoid is a solid bounded by the surface defined |
22 | -- by: |
23 | -- X^2 Y^2 Z^2 |
24 | -- ----- + ----- + ----- = 1 |
25 | -- LX^2 LY^2 LZ^2 |
26 | |
27 | uses |
28 | |
29 | Pnt from gp, |
30 | Dir from gp, |
31 | XYZ from gp |
32 | |
33 | is |
34 | |
6e33d3ce |
35 | Create returns Ellipsoid; |
7fd59977 |
36 | |
37 | -- Specific Methods pertaining to the class |
38 | |
39 | Init (me : mutable; |
40 | aSize : XYZ; |
41 | aCenter : XYZ; |
42 | anXAxis : XYZ; |
43 | anZAxis : XYZ); |
44 | ---Purpose : This method is used to set the fields of the class |
45 | -- Ellipsoid |
46 | -- - aSize : Lengths in the local X,Y,Z directions |
47 | -- - aCenter : Center point of ellipsoid (default (0,0,0)) |
48 | -- - anXAxis : Unit vector defining local X-axis |
49 | -- default (1,0,0) |
50 | -- - anZAxis : Unit vector defining local Z-axis |
51 | -- default (0,0,1) |
52 | |
53 | Size (me) returns XYZ; |
54 | ---Purpose : returns the size |
55 | |
56 | XLength (me) returns Real; |
57 | ---Purpose : returns the length in the local X-direction |
58 | |
59 | YLength (me) returns Real; |
60 | ---Purpose : returns the length in the local Y-direction |
61 | |
62 | ZLength (me) returns Real; |
63 | ---Purpose : returns the length in the local Z-direction |
64 | |
65 | Center (me) returns Pnt; |
66 | ---Purpose : returns the center of the ellipsoid |
67 | |
68 | TransformedCenter (me) returns Pnt; |
69 | ---Purpose : returns the center of the ellipsoid after applying |
70 | -- TransformationMatrix |
71 | |
72 | XAxis (me) returns Dir; |
73 | ---Purpose : returns the vector corresponding to the local X-direction |
74 | |
75 | TransformedXAxis (me) returns Dir; |
76 | ---Purpose : returns the vector corresponding to the local X-direction |
77 | -- after applying TransformationMatrix |
78 | |
79 | YAxis (me) returns Dir; |
80 | ---Purpose : returns the vector corresponding to the local Y-direction |
81 | -- which is got by taking cross product of ZAxis and XAxis |
82 | |
83 | TransformedYAxis (me) returns Dir; |
84 | ---Purpose : returns the vector corresponding to the local Y-direction |
85 | -- (which is got by taking cross product of ZAxis and XAxis) |
86 | -- after applying TransformationMatrix |
87 | |
88 | ZAxis (me) returns Dir; |
89 | ---Purpose : returns the vector corresponding to the local Z-direction |
90 | |
91 | TransformedZAxis (me) returns Dir; |
92 | ---Purpose : returns the vector corresponding to the local Z-direction |
93 | -- after applying TransformationMatrix |
94 | |
95 | fields |
96 | |
97 | -- |
98 | |
99 | -- Class : IGESSolid_Ellipsoid |
100 | -- |
101 | -- Purpose : Declaration of variables specific to the definition |
102 | -- of the Class Ellipsoid. |
103 | -- |
104 | -- Reminder : A Ellipsoid instance is defined by : |
105 | -- its center at (Center), the local X & Z axes (XAxis) |
106 | -- and (ZAxis) and the lengths along the local X, Y and Z |
107 | -- axes. The local Y axis is got by taking the cross product |
108 | -- of the local Z & X axes. |
109 | |
110 | theSize : XYZ; |
111 | -- lengths along the local X, Y, & Z directions |
112 | |
113 | theCenter : XYZ; |
114 | -- coordinates of point of center of ellipsoid |
115 | |
116 | theXAxis : XYZ; |
117 | -- vector defining local X-axis |
118 | |
119 | theZAxis : XYZ; |
120 | -- vector defining local Z-axis |
121 | |
122 | end Ellipsoid; |