7fd59977 |
1 | -- |
2 | -- File : Torus.cdl |
3 | -- Created : Sat 9 Jan 1993 |
4 | -- Author : CKY / Contract Toubro-Larsen ( SIVA ) |
5 | -- |
6 | ---Copyright : MATRA-DATAVISION 1993 |
7 | -- |
8 | |
9 | class Torus from IGESSolid inherits IGESEntity |
10 | |
11 | ---Purpose: defines Torus, Type <160> Form Number <0> |
12 | -- in package IGESSolid |
13 | -- A Torus is a solid formed by revolving a circular disc |
14 | -- about a specified coplanar axis. |
15 | |
16 | uses |
17 | |
18 | Pnt from gp, |
19 | Dir from gp, |
20 | XYZ from gp |
21 | |
22 | is |
23 | |
24 | Create returns mutable Torus; |
25 | |
26 | -- Specific Methods pertaining to the class |
27 | |
28 | Init (me : mutable; |
29 | R1 : Real; |
30 | R2 : Real; |
31 | aPoint : XYZ; |
32 | anAxisdir : XYZ); |
33 | ---Purpose : This method is used to set the fields of the class Torus |
34 | -- - R1 : distance from center of torus to center |
35 | -- of circular disc to be revolved |
36 | -- - R2 : radius of circular disc |
37 | -- - aPoint : center point coordinates (default (0,0,0)) |
38 | -- - anAxis : unit vector in axis direction (default (0,0,1)) |
39 | |
40 | MajorRadius (me) returns Real; |
41 | ---Purpose : returns the distance from the center of torus to the center of |
42 | -- the disc to be revolved |
43 | |
44 | DiscRadius (me) returns Real; |
45 | ---Purpose : returns the radius of the disc to be revolved |
46 | |
47 | AxisPoint (me) returns Pnt; |
48 | ---Purpose : returns the center of torus |
49 | |
50 | TransformedAxisPoint (me) returns Pnt; |
51 | ---Purpose : returns the center of torus after applying TransformationMatrix |
52 | |
53 | Axis (me) returns Dir; |
54 | ---Purpose : returns direction of the axis |
55 | |
56 | TransformedAxis (me) returns Dir; |
57 | ---Purpose : returns direction of the axis after applying TransformationMatrix |
58 | |
59 | fields |
60 | |
61 | -- |
62 | -- Class : IGESSolid_Torus |
63 | -- |
64 | -- Purpose : Declaration of variables specific to the definition |
65 | -- of the Class Torus. |
66 | -- |
67 | -- Reminder : A Torus instance is defined by : |
68 | -- the distance from the axis to the center of the disc(R1), |
69 | -- the radius of the disc(R2), the center of the torus(X1,Y1,Z1) |
70 | -- and the direction of the axis(I1,J1,K1) |
71 | -- |
72 | |
73 | theR1 : Real; |
74 | -- the distance from the axis to the center of the disc |
75 | |
76 | theR2 : Real; |
77 | -- the radius of the disc |
78 | |
79 | thePoint : XYZ; |
80 | -- the center of the torus |
81 | |
82 | theAxis : XYZ; |
83 | -- the direction of the axis |
84 | |
85 | end Torus; |