1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
|
-- File: Sweep_LinearRegularSweep.cdl
-- Created: Wed Jan 27 10:36:41 1993
-- Author: Philippe DAUTRY
-- <fid@phylox>
-- Copyright: Matra Datavision 1993
deferred generic class LinearRegularSweep from Sweep (
TheShape as any; -- resulting topological objects.
TheGenShape as any; -- Generating topological objects.
TheDirShape as any; -- Directing topological objects.
TheBuilder as any; -- as Builder from Sweep.
TheGenShapeTool as any; -- as Tool from Sweep.
TheDirShapeTool as any; -- as Tool from Sweep.
TheShapeIterator as any; -- as Iterator from Sweep.
TheGenShapeIterator as any; -- as Iterator from Sweep.
TheDirShapeIterator as any) -- as Iterator from Sweep.
---Purpose: This a generic class is used to build Sweept
-- primitives with a generating "shape" and a
-- directing "line".
--
-- The indexation and type analysis services required
-- for the generatrix are given by <TheGenShapeTool>.
--
-- The indexation and type analysis services required
-- for the directrix are given by <TheDirShapeTool>.
--
-- The iteration services required for the generatrix
-- are given by <TheGenShapeIterator>.
--
-- The iteration services required for the directrix
-- are given by <TheDirShapeIterator>.
--
-- The topology is like a grid of shapes. Each shape
-- of the grid must be addressable without confusion
-- by one or two objects from the generating or
-- directing shapes. Here are exemples of correct
-- associations to address:
--
-- - a vertex : GenVertex - DirVertex
-- - an edge : GenVertex - DirEdge
-- - : GenEdge - DirVertex
-- - a face : GenEdge - DirEdge
-- GenFace - DirVertex
-- ...
--
-- "GenObject" is used to identify an object from the
-- Generating Shape, and "DirObject" from the
-- Directing Shape. So may they be from different
-- types.
--
-- The method Has... is given because in some special
-- cases, a vertex, an edge or a face may be
-- geometricaly nonexistant or not usefull.
uses
Orientation from TopAbs,
Array2OfBoolean from TColStd
raises
NoMoreObject from Standard,
NoSuchObject from Standard,
RangeError from Standard,
DomainError from Standard
-- Nested classes
class Array2OfShapes
instantiates Array2 from TCollection (TheShape);
class SequenceOfShapes
instantiates Sequence from TCollection (TheShape);
is
-- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Delete(me:out) is virtual ;
---C++: alias ~
Initialize(aBuilder : TheBuilder;
aGenShape : TheGenShape;
aDirWire : TheDirShape);
---Purpose: Creates a LinearRegularSweep. <aBuilder> gives
-- basic topological services.
-- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-- Deferred Methods supporting the creation of the geometric part.
-- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
MakeEmptyVertex(me : in out; aGenV: TheGenShape; aDirV: TheDirShape)
returns TheShape
---Purpose: Builds the vertex addressed by [aGenV,aDirV], with its
-- geometric part, but without subcomponents.
is deferred;
MakeEmptyDirectingEdge(me: in out; aGenV: TheGenShape; aDirE: TheDirShape)
returns TheShape
---Purpose: Builds the edge addressed by [aGenV,aDirE], with its
-- geometric part, but without subcomponents.
is deferred;
MakeEmptyGeneratingEdge(me: in out; aGenE: TheGenShape; aDirV: TheDirShape)
returns TheShape
---Purpose: Builds the edge addressed by [aGenE,aDirV], with its
-- geometric part, but without subcomponents.
is deferred;
SetParameters(me : in out;
aNewFace : TheShape;
aNewVertex : in out TheShape;
aGenF : TheGenShape;
aGenV : TheGenShape;
aDirV : TheDirShape)
---Purpose: Sets the parameters of the new vertex on the new
-- face. The new face and new vertex where generated
-- from aGenF, aGenV and aDirV .
is deferred;
SetDirectingParameter(me : in out;
aNewEdge : TheShape;
aNewVertex : in out TheShape;
aGenV : TheGenShape;
aDirE : TheDirShape;
aDirV : TheDirShape)
---Purpose: Sets the parameter of the new vertex on the new
-- edge. The new edge and new vertex where generated
-- from aGenV aDirE, and aDirV.
is deferred;
SetGeneratingParameter(me : in out;
aNewEdge : TheShape;
aNewVertex : in out TheShape;
aGenE : TheGenShape;
aGenV : TheGenShape;
aDirV : TheDirShape)
---Purpose: Sets the parameter of the new vertex on the new
-- edge. The new edge and new vertex where generated
-- from aGenE, aGenV and aDirV .
is deferred;
MakeEmptyFace(me : in out;
aGenS : TheGenShape;
aDirS : TheDirShape)
returns TheShape
---Purpose: Builds the face addressed by [aGenS,aDirS], with
-- its geometric part, but without subcomponents. The
-- couple aGenS, aDirS can be a "generating face and
-- a directing vertex" or "a generating edge and a
-- directing edge".
is deferred;
SetPCurve(me : in out;
aNewFace : TheShape;
aNewEdge : in out TheShape;
aGenF : TheGenShape;
aGenE : TheGenShape;
aDirV : TheDirShape;
orien : Orientation from TopAbs)
---Purpose: Sets the PCurve for a new edge on a new face. The
-- new edge and the new face were generated using
-- aGenF, aGenE and aDirV.
is deferred;
SetGeneratingPCurve(me : in out;
aNewFace : TheShape;
aNewEdge : in out TheShape;
aGenE : TheGenShape;
aDirE : TheDirShape;
aDirV : TheDirShape;
orien : Orientation from TopAbs)
---Purpose: Sets the PCurve for a new edge on a new face. The
-- new edge and the new face were generated using
-- aGenE, aDirE and aDirV.
is deferred;
SetDirectingPCurve(me : in out;
aNewFace : TheShape;
aNewEdge : in out TheShape;
aGenE : TheGenShape;
aGenV : TheGenShape;
aDirE : TheDirShape;
orien : Orientation from TopAbs)
---Purpose: Sets the PCurve for a new edge on a new face. The
-- new edge and the new face were generated using
-- aGenE, aDirE and aGenV.
is deferred;
DirectSolid(me : in out;
aGenS : TheGenShape;
aDirS : TheDirShape)
returns Orientation from TopAbs
---Purpose: Returns the Orientation of the shell in the solid
-- generated by the face aGenS with the edge aDirS.
-- It is REVERSED if the surface is swept in the
-- direction of the normal.
is deferred;
GGDShapeIsToAdd (me;
aNewShape : TheShape;
aNewSubShape : TheShape;
aGenS : TheGenShape;
aSubGenS : TheGenShape;
aDirS : TheDirShape)
returns Boolean from Standard
---Purpose: Returns true if aNewSubShape (addressed by
-- aSubGenS and aDirS) must be added in aNewShape
-- (addressed by aGenS and aDirS).
is deferred;
GDDShapeIsToAdd (me;
aNewShape : TheShape;
aNewSubShape : TheShape;
aGenS : TheGenShape;
aDirS : TheDirShape;
aSubDirS : TheDirShape)
returns Boolean from Standard
---Purpose: Returns true if aNewSubShape (addressed by
-- aGenS and aSubDirS) must be added in aNewShape
-- (addressed by aGenS and aDirS).
is deferred;
SeparatedWires (me;
aNewShape : TheShape;
aNewSubShape : TheShape;
aGenS : TheGenShape;
aSubGenS : TheGenShape;
aDirS : TheDirShape)
returns Boolean from Standard
---Purpose: In some particular cases the topology of a
-- generated face must be composed of independant
-- closed wires, in this case this function returns
-- true.
is deferred;
SplitShell (me; aNewShape : TheShape)
returns TheShape
---Purpose: In some particular cases the topology of a
-- generated Shell must be composed of independant
-- closed Shells, in this case this function returns
-- a Compound of independant Shells.
is virtual;
-- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-- Method coding the continuities on the edges between 2 faces
-- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
SetContinuity(me : in out; aGenS : TheGenShape; aDirS : TheDirShape)
---Purpose: Called to propagate the continuity of every vertex
-- between two edges of the generating wire aGenS on
-- the generated edge and faces.
is deferred;
-- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-- User end methods.
--
-- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-- Shapes
-- """"""
HasShape(me; aGenS : TheGenShape; aDirS : TheDirShape)
returns Boolean from Standard
---Purpose: Returns true if aDirS and aGenS addresses a
-- resulting Shape. In some specific cases the shape
-- can be geometrically inexsistant, then this
-- function returns false.
is deferred;
Shape(me: in out; aGenS : TheGenShape; aDirS : TheDirShape)
returns TheShape
---Purpose: Returns the resulting Shape indexed by aDirS and
-- aGenS.
is static;
Shape(me: in out; aGenS : TheGenShape)
returns TheShape
---Purpose: Returns the resulting Shape indexed by myDirWire
-- and aGenS.
is static;
Shape(me: in out)
returns TheShape
---Purpose: Returns the resulting Shape indexed by myDirWire
-- and myGenShape.
is static;
FirstShape(me: in out)
returns TheShape
---Purpose: Returns the resulting Shape indexed by the first
-- Vertex of myDirWire and myGenShape.
is static;
LastShape(me: in out)
returns TheShape
---Purpose: Returns the resulting Shape indexed by the last
-- Vertex of myDirWire and myGenShape.
is static;
FirstShape(me: in out; aGenS : TheGenShape)
returns TheShape
---Purpose: Returns the resulting Shape indexed by the first
-- Vertex of myDirWire and aGenS.
is static;
LastShape(me: in out; aGenS : TheGenShape)
returns TheShape
---Purpose: Returns the resulting Shape indexed by the last
-- Vertex of myDirWire and aGenS.
is static;
Closed(me) returns Boolean from Standard is static;
fields
-- Topology builder.
myBuilder : TheBuilder is protected;
-- Generating shape
myGenShape : TheGenShape is protected;
-- Directing line
myDirWire : TheDirShape is protected;
-- shape tools.
myGenShapeTool : TheGenShapeTool is protected;
myDirShapeTool : TheDirShapeTool is protected;
-- Array of built objects (NbGShapes,NbDShapes).
myShapes : Array2OfShapes is protected;
-- Array of built objects flags (NbGShapes,NbDShapes).
myBuiltShapes : Array2OfBoolean from TColStd is protected;
end LinearRegularSweep;
|