0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / BRepPrim / BRepPrim_GWedge.cdl
1 -- Created on: 1991-09-18
2 -- Created by: Christophe MARION
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class GWedge from BRepPrim
18
19
20         ---Purpose: A wedge is defined by  :
21         --          
22         --          Axes : an Axis2 (coordinate system)
23         --          
24         --          YMin, YMax the  coordinates of the  ymin and ymax
25         --          rectangular faces parallel to the ZX plane (of the
26         --          coordinate systems)
27         --          
28         --          ZMin,ZMax,XMin,XMax the rectangular
29         --          left (YMin) face parallel to the Z and X axes.
30         --          
31         --          Z2Min,Z2Max,X2Min,X2Max the rectangular
32         --          right (YMax) face parallel to the Z and X axes.
33         --          
34         --          For a box Z2Min = ZMin, Z2Max = ZMax,
35         --                    X2Min = XMin, X2Max = XMax
36         --          
37         --          The wedge can be open in the corresponding direction
38         --          of its Boolean myInfinite
39
40
41 uses
42     
43     Direction from BRepPrim,
44     
45     Ax2     from gp,
46     Pln     from gp,
47     Lin     from gp,
48     Pnt     from gp,
49     Shell   from TopoDS,
50     Face    from TopoDS,
51     Wire    from TopoDS,
52     Edge    from TopoDS,
53     Vertex  from TopoDS,
54     Builder from BRepPrim
55
56 raises
57     DomainError,
58     OutOfRange
59
60 is
61     Create(B : Builder from BRepPrim; Axes : Ax2 from gp; dx, dy, dz : Real)
62     returns GWedge from BRepPrim
63         ---Purpose: Creates a  GWedge  algorithm.   <Axes> is  the axis
64         --          system for the primitive.
65         --          
66         --          XMin, YMin, ZMin are set to 0
67         --          XMax, YMax, ZMax are set to dx, dy, dz
68         --          Z2Min = ZMin
69         --          Z2Max = ZMax
70         --          X2Min = XMin
71         --          X2Max = XMax
72         --          The result is a box
73         --          dx,dy,dz should be positive
74         raises DomainError;
75
76     Create(B : Builder from BRepPrim; Axes : Ax2 from gp; dx, dy, dz, ltx : Real)
77     returns GWedge from BRepPrim
78         ---Purpose: Creates  a GWedge  primitive. <Axes> is   the  axis
79         --          system for the primitive.
80         --          
81         --          XMin, YMin, ZMin are set to 0
82         --          XMax, YMax, ZMax are set to dx, dy, dz
83         --          Z2Min = ZMin
84         --          Z2Max = ZMax
85         --          X2Min = ltx
86         --          X2Max = ltx
87         --          The result is a STEP right angular wedge
88         --          dx,dy,dz should be positive
89         --          ltx should not be negative
90         raises DomainError;
91
92     Create(B : Builder from BRepPrim; Axes : Ax2 from gp; xmin, ymin, zmin, z2min, x2min,
93                                    xmax, ymax, zmax, z2max, x2max : Real)
94     returns GWedge from BRepPrim
95         ---Purpose: Create  a GWedge primitive.   <Axes>  is  the  axis
96         --          system for the primitive.
97         --          
98         --          all the fields are set to the corresponding value
99         --          XYZMax - XYZMin should be positive
100         --          ZX2Max - ZX2Min should not be negative 
101         raises DomainError;
102
103     Axes(me) returns Ax2 from gp
104         ---Purpose: Returns the coordinates system from <me>.
105     is static;
106
107     GetXMin(me) returns Real
108         ---Purpose: Returns Xmin value from <me>.
109     is static;
110
111     GetYMin(me) returns Real
112         ---Purpose: Returns YMin value from <me>.
113     is static;
114
115     GetZMin(me) returns Real
116         ---Purpose: Returns ZMin value from <me>.
117     is static;
118
119     GetZ2Min(me) returns Real 
120         ---Purpose: Returns Z2Min value from <me>.
121     is static;
122
123     GetX2Min(me) returns Real 
124         ---Purpose: Returns X2Min value from <me>.
125     is static;
126
127     GetXMax(me) returns Real
128         ---Purpose: Returns XMax value from <me>.
129     is static;
130
131     GetYMax(me) returns Real
132         ---Purpose: Returns YMax value from <me>.
133     is static;
134
135     GetZMax(me) returns Real
136         ---Purpose: Returns ZMax value from <me>.
137     is static;
138
139     GetZ2Max(me) returns Real 
140         ---Purpose: Returns Z2Max value from <me>.
141     is static;
142
143     GetX2Max(me) returns Real 
144         ---Purpose: Returns X2Max value from <me>.
145     is static;
146
147     Open(me : in out; d1 : Direction from BRepPrim)
148         ---Purpose: Opens <me> in <d1> direction. A face and its edges
149         --          or vertices are said nonexistant.
150     raises DomainError
151     is static;
152
153     Close(me : in out; d1 : Direction from BRepPrim)
154         ---Purpose: Closes   <me>  in <d1>  direction.  A face and its
155         --          edges or vertices are said existant.
156     raises DomainError
157     is static;
158
159     IsInfinite(me; d1 : Direction from BRepPrim)
160         ---Purpose: Returns True if <me> is open in <d1> direction.
161     returns Boolean;
162     
163     Shell(me : in out) returns Shell from TopoDS
164         ---Purpose: Returns the Shell containing the Faces of <me>.
165         --          
166         ---C++: return const &
167     is static;
168
169     HasFace(me; d1 : Direction from BRepPrim)
170         ---Purpose: Returns True if <me> has a Face in <d1> direction.
171     returns Boolean;
172
173     Face(me : in out; d1 : Direction from BRepPrim) returns Face from TopoDS
174         ---Purpose: Returns the Face of <me> located in <d1> direction.
175         --          
176         ---C++: return const &
177     raises DomainError
178     is static;
179     
180     Plane(me : in out; d1 : Direction from BRepPrim) returns Pln from  gp
181         ---Purpose: Returns the plane  of the Face  of <me> located in
182         --          <d1> direction.
183     raises DomainError
184     is static;
185     
186     HasWire(me; d1 : Direction from BRepPrim)
187         ---Purpose: Returns True if <me> has a Wire in <d1> direction.
188     returns Boolean;
189
190     Wire(me : in out; d1 : Direction from BRepPrim) returns Wire from TopoDS
191         ---Purpose: Returns the Wire of <me> located in <d1> direction.
192         --          
193         ---C++: return const &
194     raises DomainError
195     is static;
196
197     HasEdge(me; d1, d2 : Direction from BRepPrim)
198         ---Purpose: Returns True if <me> has an Edge in <d1><d2> direction.
199     returns Boolean;
200
201     Edge(me : in out; d1, d2 : Direction from BRepPrim) returns Edge from TopoDS
202         ---Purpose: Returns the Edge of <me> located in <d1><d2> direction.
203         --          
204         ---C++: return const &
205     raises DomainError
206     is static;
207
208     Line(me : in out; d1, d2 : Direction from BRepPrim) returns Lin from gp
209         ---Purpose: Returns the line of  the Edge of <me>  located  in
210         --          <d1><d2> direction.
211     raises DomainError
212     is static;
213
214     HasVertex(me; d1, d2, d3 : Direction from BRepPrim)
215         ---Purpose: Returns True if <me> has a  Vertex in <d1><d2><d3>
216         --          direction.
217     returns Boolean;
218
219     Vertex(me : in out; d1, d2, d3 : Direction from BRepPrim)
220     returns Vertex from TopoDS
221         ---Purpose: Returns the Vertex of <me> located in <d1><d2><d3>
222         --          direction.
223         --          
224         ---C++: return const &
225     raises DomainError
226     is static;
227     
228     Point(me : in out; d1, d2, d3 : Direction from BRepPrim)
229     returns Pnt from gp
230         ---Purpose: Returns the point of the Vertex of <me> located in
231         --          <d1><d2><d3> direction.
232     raises DomainError
233     is static;
234     
235 fields
236     myBuilder : Builder from BRepPrim;
237
238     myAxes : Ax2 from gp;
239     XMin : Real;
240     XMax : Real;
241     YMin : Real;
242     YMax : Real;
243     ZMin : Real;
244     ZMax : Real;
245     Z2Min : Real;
246     Z2Max : Real;
247     X2Min : Real;
248     X2Max : Real;
249     
250     -- the Topology
251
252     myShell : Shell from TopoDS;
253     ShellBuilt : Boolean;
254     
255     myVertices : Vertex from TopoDS [8];
256     -- 0 : xmin ymin zmin
257     -- 1 : xmax ymin zmin
258     -- 2 : xmin ymax zmin
259     -- 3 : xmax ymax zmin
260     -- 4 : xmin ymin zmax
261     -- 5 : xmax ymin zmax
262     -- 6 : xmin ymax zmax
263     -- 7 : xmax ymax zmax
264     VerticesBuilt : Boolean [8];
265     
266     myEdges : Edge from TopoDS [12];
267     -- 0  : xmin ymin
268     -- 1  : xmax ymin
269     -- 2  : xmin ymax
270     -- 3  : xmax ymax
271     -- 4  : ymin zmin
272     -- 5  : ymax zmin
273     -- 6  : ymin zmax
274     -- 7  : ymax zmax
275     -- 8  : zmin xmin
276     -- 9  : zmax xmin
277     -- 10 : zmin xmax
278     -- 11 : zmax xmax
279     EdgesBuilt : Boolean [12];
280     
281     myWires : Wire from TopoDS [6];
282     -- 0 : xmin
283     -- 1 : xmax
284     -- 2 : ymin
285     -- 3 : ymax
286     -- 4 : zmin
287     -- 5 : zmax
288     WiresBuilt : Boolean [6];
289     
290     myFaces : Face from TopoDS [6];
291     -- 0 : xmin
292     -- 1 : xmax
293     -- 2 : ymin
294     -- 3 : ymax
295     -- 4 : zmin
296     -- 5 : zmax
297     FacesBuilt : Boolean [6];
298
299     myInfinite : Boolean[6];
300     -- 0 : xmin
301     -- 1 : xmax
302     -- 2 : ymin
303     -- 3 : ymax
304     -- 4 : zmin
305     -- 5 : zmax
306
307 end GWedge;