b311480e |
1 | -- Created on: 2009-04-06 |
2 | -- Created by: Sergey ZARITCHNY |
973c2be1 |
3 | -- Copyright (c) 2009-2014 OPEN CASCADE SAS |
b311480e |
4 | -- |
973c2be1 |
5 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
6 | -- |
d5f74e42 |
7 | -- This library is free software; you can redistribute it and/or modify it under |
8 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | -- by the Free Software Foundation, with special exception defined in the file |
10 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
12 | -- |
973c2be1 |
13 | -- Alternatively, this file may be used under the terms of Open CASCADE |
14 | -- commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | class Geometry from TDataXtd inherits Attribute from TDF |
17 | |
18 | ---Purpose: This class is used to model construction geometry. |
19 | -- The specific geometric construction of the |
20 | -- attribute is defined by an element of the |
21 | -- enumeration TDataXtd_GeometryEnum. |
22 | -- This attribute may also be used to qualify underlying |
23 | -- geometry of the associated NamedShape. for |
24 | -- Constructuion element by example. |
25 | |
26 | uses Attribute from TDF, |
27 | Label from TDF, |
28 | GUID from Standard, |
29 | GeometryEnum from TDataXtd, |
30 | DataSet from TDF, |
31 | RelocationTable from TDF, |
32 | NamedShape from TNaming, |
33 | Pnt from gp, |
34 | Ax1 from gp, |
35 | Lin from gp, |
36 | Circ from gp, |
37 | Elips from gp, |
38 | Pln from gp, |
39 | Cylinder from gp |
40 | |
41 | |
42 | |
43 | |
44 | is |
45 | |
46 | ---Purpose: API class methods |
47 | -- ================= |
48 | |
49 | Set (myclass ; label : Label from TDF) |
50 | ---Purpose: Finds, or creates, a Geometry attribute defined by the label label. |
51 | -- The default type of geometry is the value |
52 | -- ANY_GEOM of the enumeration TDataXtd_GeometryEnum. |
53 | -- To specify another value of this enumeration, use |
54 | -- the function SetType. |
55 | |
56 | returns Geometry from TDataXtd; |
57 | |
58 | Type (myclass; L : Label from TDF) |
59 | returns GeometryEnum from TDataXtd; |
60 | ---Purpose: |
61 | -- Returns the label L used to define the type of |
62 | -- geometric construction for the geometry attribute. |
63 | Type (myclass; S : NamedShape from TNaming) |
64 | returns GeometryEnum from TDataXtd; |
65 | ---Purpose: Returns the topological attribute S used to define |
66 | -- the type of geometric construction for the geometry attribute. |
67 | Point (myclass; L : Label from TDF; G : in out Pnt from gp) |
68 | returns Boolean from Standard; |
69 | ---Purpose: |
70 | -- Returns the point attribute defined by the label L and the point G. |
71 | Point (myclass; S : NamedShape from TNaming; G : in out Pnt from gp) |
72 | ---Purpose: |
73 | -- Returns the point attribute defined by the topological attribute S and the point G. |
74 | returns Boolean from Standard; |
75 | |
76 | |
77 | Axis (myclass; L : Label from TDF; G : in out Ax1 from gp) |
78 | returns Boolean from Standard; |
79 | ---Purpose: |
80 | -- Returns the axis attribute defined by the label L and the axis G. |
81 | Axis (myclass; S : NamedShape from TNaming; G : in out Ax1 from gp) |
82 | ---Purpose: |
83 | -- Returns the axis attribute defined by the topological attribute S and the axis G. |
84 | returns Boolean from Standard; |
85 | |
86 | |
87 | Line (myclass; L : Label from TDF; G : in out Lin from gp) |
88 | returns Boolean from Standard; |
89 | ---Purpose: |
90 | -- Returns the line attribute defined by the label L and the line G. |
91 | |
92 | Line (myclass; S : NamedShape from TNaming; G : in out Lin from gp) |
93 | returns Boolean from Standard; |
94 | ---Purpose: |
95 | -- Returns the line attribute defined by the topological attribute S and the line G. |
96 | |
97 | Circle (myclass; L : Label from TDF; G : in out Circ from gp) |
98 | returns Boolean from Standard; |
99 | ---Purpose: |
100 | -- Returns the circle attribute defined by the label L and the circle G. |
101 | Circle (myclass; S : NamedShape from TNaming; G : in out Circ from gp) |
102 | returns Boolean from Standard; |
103 | ---Purpose: |
104 | -- Returns the circle attribute defined by the topological attribute S and the circle G. |
105 | |
106 | Ellipse (myclass; L : Label from TDF; G : in out Elips from gp) |
107 | returns Boolean from Standard; |
108 | ---Purpose: |
109 | -- Returns the ellipse attribute defined by the label L and the ellipse G. |
110 | Ellipse (myclass; S : NamedShape from TNaming; G : in out Elips from gp) |
111 | returns Boolean from Standard; |
112 | ---Purpose: |
113 | -- Returns the ellipse attribute defined by the |
114 | -- topological attribute S and the ellipse G. |
115 | |
116 | Plane (myclass; L : Label from TDF; G : in out Pln from gp) |
117 | returns Boolean from Standard; |
118 | ---Purpose: |
119 | -- Returns the plane attribute defined by the label L and the plane G. |
120 | Plane (myclass; S : NamedShape from TNaming; G : in out Pln from gp) |
121 | returns Boolean from Standard; |
122 | ---Purpose: |
123 | -- Returns the plane attribute defined by the |
124 | -- topological attribute S and the plane G. |
125 | |
126 | Cylinder (myclass; L : Label from TDF; G : in out Cylinder from gp) |
127 | ---Purpose: |
128 | -- Returns the cylinder attribute defined by the label L and the cylinder G. |
129 | returns Boolean from Standard; |
130 | |
131 | Cylinder (myclass; S : NamedShape from TNaming; G : in out Cylinder from gp) |
132 | ---Purpose: |
133 | -- Returns the cylinder attribute defined by the |
134 | -- topological attribute S and the cylinder G. |
135 | returns Boolean from Standard; |
136 | |
137 | GetID(myclass) |
138 | ---C++: return const & |
139 | ---Purpose: Returns the GUID for geometry attributes. |
140 | returns GUID from Standard; |
141 | |
142 | |
143 | |
144 | Create |
145 | returns mutable Geometry from TDataXtd; |
146 | ---Purpose: This and the next methods are used to retrieve underlying geometry of the |
147 | -- NamedShape, even if noone Geometry Attribute is |
148 | -- associated . if not found or not compliant geometry return False. |
149 | |
150 | |
151 | SetType (me : mutable; T : GeometryEnum from TDataXtd); |
152 | ---Purpose: Returns the type of geometric construction T of this attribute. |
153 | -- T will be a value of the enumeration TDataXtd_GeometryEnum. |
154 | |
155 | GetType (me) |
156 | returns GeometryEnum from TDataXtd; |
157 | ---Purpose: Returns the type of geometric construction. |
158 | |
159 | ---Category: TDF_Attribute methods |
160 | -- ===================== |
161 | |
162 | ID(me) |
163 | ---C++: return const & |
164 | returns GUID from Standard; |
165 | |
166 | Restore(me: mutable; with : Attribute from TDF); |
167 | |
168 | NewEmpty(me) |
169 | returns mutable Attribute from TDF; |
170 | |
171 | Paste (me; into : mutable Attribute from TDF; |
172 | RT : mutable RelocationTable from TDF); |
173 | |
174 | Dump(me; anOS : in out OStream from Standard) |
175 | returns OStream from Standard |
176 | is redefined; |
177 | ---C++: return & |
178 | |
179 | fields |
180 | |
181 | myType : GeometryEnum from TDataXtd; |
182 | |
183 | end Geometry; |
184 | |
185 | |
186 | |