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
|
-- File: BiTgte_Blend.cdl
-- Created: Mon Dec 16 10:25:05 1996
-- Author: Bruno DUMORTIER
-- <dub@brunox.paris1.matra-dtv.fr>
---Copyright: Matra Datavision 1996
class Blend from BiTgte
---Purpose:
uses
Shape from TopoDS,
Face from TopoDS,
Edge from TopoDS,
MapOfShape from TopTools,
ListOfShape from TopTools,
Curve from Geom2d,
Curve from Geom,
Surface from Geom,
Analyse from BRepOffset,
Inter3d from BRepOffset,
Offset from BRepOffset,
Image from BRepAlgo,
AsDes from BRepAlgo,
DataMapOfShapeOffset from BRepOffset,
DataMapOfShapeBox from BiTgte,
ContactType from BiTgte,
DataMapOfShapeListOfShape from TopTools,
IndexedMapOfShape from TopTools,
IndexedDataMapOfShapeListOfShape from TopTools,
DataMapOfShapeDataMapOfShapeListOfShape from BRepFill,
HArray1OfInteger from TColStd
raises
NotDone from StdFail,
OutOfRange from Standard
is
---
--- Initilisations
---
Create
returns Blend from BiTgte;
Create (S : Shape from TopoDS;
Radius : Real from Standard;
Tol : Real from Standard;
NUBS : Boolean from Standard)
---Purpose: <S>: Shape to be rounded
-- <Radius>: radius of the fillet
-- <Tol>: Tol3d used in approximations
-- <NUBS>: if true, generate only NUBS surfaces,
-- if false, generate analytical surfaces if possible
--
returns Blend from BiTgte;
Init (me : in out;
S : Shape from TopoDS;
Radius : Real from Standard;
Tol : Real from Standard;
NUBS : Boolean from Standard)
is static;
Clear (me : in out)
---Purpose: Clear all the Fields.
is static;
SetFaces(me : in out;
F1, F2 : Face from TopoDS)
---Purpose: Set two faces of <myShape> on which the Sphere
-- must roll.
is static;
SetEdge(me : in out;
Edge : Edge from TopoDS)
---Purpose: Set an edge of <myShape> to be rounded.
is static;
SetStoppingFace (me : in out;
Face : Face from TopoDS)
---Purpose: Set a face on which the fillet must stop.
is static;
---
--- Computation
---
Perform (me : in out;
BuildShape : Boolean from Standard = Standard_True)
---Purpose: Compute the generated surfaces.
-- If <BuildShape> is true, compute the resulting Shape.
-- If false, only the blending surfaces are computed.
is static;
---
--- Quering
---
IsDone(me)
returns Boolean from Standard
---Purpose:
is static;
Shape(me)
---Purpose: returns the result
returns Shape from TopoDS
---C++: return const &
is static;
NbSurfaces(me)
---Purpose: returns the Number of generated surfaces.
returns Integer from Standard
raises
NotDone from StdFail
is static;
Surface(me; Index : Integer from Standard)
returns Surface from Geom
---Purpose: returns the surface of range Index
raises
NotDone from StdFail,
OutOfRange from Standard
is static;
Face(me; Index : Integer from Standard)
returns Face from TopoDS
---Purpose: returns the surface of range Index
---C++: return const &
raises
NotDone from StdFail,
OutOfRange from Standard
is static;
CenterLines(me;
LC : in out ListOfShape from TopTools )
---Purpose: set in <LC> all the center lines
is static;
Surface(me; CenterLine : Shape from TopoDS)
returns Surface from Geom
---Purpose: returns the surface generated by the centerline.
-- <CenterLine> may be
-- - an edge : generate a pipe.
-- - a vertex : generate a sphere.
-- Warning: returns a Null Handle if <CenterLine> generates
-- no surface.
raises
NotDone from StdFail
is static;
Face(me; CenterLine : Shape from TopoDS)
returns Face from TopoDS
---Purpose: returns the face generated by the centerline.
-- <CenterLine> may be
-- - an edge : generate a pipe.
-- - a vertex : generate a sphere.
-- Warning: returns a Null Shape if <CenterLine> generates
-- no surface.
---C++: return const &
raises
NotDone from StdFail
is static;
---
--- Information about FilletGeometry:
---
ContactType(me; Index: Integer from Standard)
---Purpose: returns the type of contact
returns ContactType from BiTgte
is static;
---
--- SupportShape: may be a Face, an Edge or a Vertex
---
SupportShape1 (me; Index: Integer from Standard)
returns Shape from TopoDS
---Purpose: gives the first support shape relative to
-- SurfaceFillet(Index);
---C++: return const &
raises
NotDone from StdFail,
OutOfRange from Standard
is static;
SupportShape2 (me; Index : Integer from Standard)
returns Shape from TopoDS
---Purpose: gives the second support shape relative to
-- SurfaceFillet(Index);
---C++:return const &
raises NotDone from StdFail,
OutOfRange from Standard
is static;
---
--- 3d Curves: the guide - lines
---
CurveOnShape1 (me; Index : Integer from Standard)
returns Curve from Geom
---Purpose: gives the 3d curve of SurfaceFillet(Index)
-- on SupportShape1(Index)
raises NotDone from StdFail,
OutOfRange from Standard
is static;
CurveOnShape2 (me; Index : Integer from Standard)
returns Curve from Geom
---Purpose: gives the 3d curve of SurfaceFillet(Index)
-- on SupportShape2(Index)
raises NotDone from StdFail,
OutOfRange from Standard
is static;
---
--- 2d curves:
---
PCurveOnFace1 (me; Index : Integer from Standard)
returns Curve from Geom2d
---Purpose: gives the PCurve associated to CurvOnShape1(Index)
-- on the support face
-- Warning: returns a Null Handle if SupportShape1 is not a Face
raises NotDone from StdFail,
OutOfRange from Standard
is static;
PCurve1OnFillet (me; Index : Integer from Standard)
returns Curve from Geom2d
---Purpose: gives the PCurve associated to CurveOnShape1(Index)
-- on the Fillet
raises NotDone from StdFail,
OutOfRange from Standard
is static;
PCurveOnFace2 (me; Index : Integer from Standard)
returns Curve from Geom2d
---Purpose: gives the PCurve associated to CurveOnShape2(Index)
-- on the support face
-- Warning: returns a Null Handle if SupportShape2 is not a Face
raises NotDone from StdFail,
OutOfRange from Standard
is static;
PCurve2OnFillet (me; Index : Integer from Standard)
returns Curve from Geom2d
---Purpose: gives the PCurve associated to CurveOnShape2(Index)
-- on the fillet
raises NotDone from StdFail,
OutOfRange from Standard
is static;
---
--- Branches Solutions
---
NbBranches(me : in out)
returns Integer from Standard
raises
NotDone from StdFail
is static;
IndicesOfBranche(me;
Index : Integer from Standard;
From, To : in out Integer from Standard)
---Purpose: Set in <From>,<To> the indices of the faces of
-- the branche <Index>.
--
-- i.e: Branche<Index> = Face(From) + Face(From+1) + ..+ Face(To)
is static;
---
--- Internal methods:
---
ComputeCenters (me : in out)
---Purpose: Computes the center lines
is static;
ComputeSurfaces( me : in out)
---Purpose: Perform the generated surfaces.
is static private;
ComputeShape(me : in out)
---Purpose: Build the resulting shape
-- All the faces must be computed
is static private;
Intersect(me : in out;
Init : Shape from TopoDS;
Face : Face from TopoDS;
MapSBox : DataMapOfShapeBox from BiTgte;
OF1 : Offset from BRepOffset;
Inter : in out Inter3d from BRepOffset)
returns Boolean from Standard
---Purpose: Computes the intersections with <Face> and all the
-- OffsetFaces stored in <myMapSF>. Returns <True>
-- if an intersections ends on a boundary of a Face.
is static private;
fields
myRadius : Real from Standard;
myTol : Real from Standard;
myNubs : Boolean from Standard;
myShape : Shape from TopoDS; -- Shape Initial
myResult : Shape from TopoDS; -- Shape Resultat
myBuildShape : Boolean from Standard;
myAncestors : IndexedDataMapOfShapeListOfShape from TopTools;
myCreated : DataMapOfShapeDataMapOfShapeListOfShape from BRepFill;
myCutEdges : DataMapOfShapeListOfShape from TopTools;
myFaces : MapOfShape from TopTools;
myEdges : MapOfShape from TopTools;
myStopFaces : MapOfShape from TopTools;
myAnalyse : Analyse from BRepOffset;
myCenters : IndexedMapOfShape from TopTools;
myMapSF : DataMapOfShapeOffset from BRepOffset;
myInitOffsetFace : Image from BRepAlgo;
myImage : Image from BRepAlgo;
myImageOffset : Image from BRepAlgo;
myAsDes : AsDes from BRepAlgo;
myNbBranches : Integer from Standard;
myIndices : HArray1OfInteger from TColStd;
myDone : Boolean from Standard;
end Blend;
|