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