7fd59977 |
1 | -- File: ChFi3d_Builder.cdl |
2 | -- Created: Tue Nov 9 17:40:22 1993 |
3 | -- Author: Laurent BOURESCHE |
4 | -- <lbo@zerox> |
5 | ---Copyright: Matra Datavision 1993 |
6 | |
7 | |
8 | |
9 | deferred class Builder from ChFi3d |
10 | |
11 | ---Purpose: Root class for calculation of surfaces (fillets, |
12 | -- chamfers) destined to smooth edges of |
13 | -- a gap on a Shape and the reconstruction of the Shape. |
14 | |
15 | uses |
16 | Spine from ChFiDS, |
17 | ListOfStripe from ChFiDS, |
18 | SequenceOfSurfData from ChFiDS, |
19 | SurfData from ChFiDS, |
20 | Stripe from ChFiDS, |
21 | StripeMap from ChFiDS, |
22 | Map from ChFiDS, |
23 | CommonPoint from ChFiDS, |
24 | Regularities from ChFiDS, |
25 | HElSpine from ChFiDS, |
26 | ErrorStatus from ChFiDS, |
27 | HDataStructure from TopOpeBRepDS, |
28 | HBuilder from TopOpeBRepBuild, |
29 | AppFunction from Blend, |
30 | Function from Blend, |
31 | CSFunction from Blend, |
32 | FuncInv from Blend, |
33 | SurfRstFunction from Blend, |
34 | RstRstFunction from Blend, |
35 | SurfPointFuncInv from Blend, |
36 | SurfCurvFuncInv from Blend, |
37 | CurvPointFuncInv from Blend, |
38 | Approx from AppBlend, |
39 | Line from BRepBlend, |
40 | DataMapOfShapeListOfInteger from TopTools, |
41 | ListOfShape from TopTools, |
42 | Shape from TopoDS, |
43 | Face from TopoDS, |
44 | Edge from TopoDS, |
45 | Vertex from TopoDS, |
46 | State from TopAbs, |
47 | Orientation from TopAbs, |
48 | HCurve from Adaptor3d, |
49 | HCurve2d from Adaptor2d, |
50 | HSurface from Adaptor3d, |
51 | HCurve2d from BRepAdaptor, |
52 | Surface from BRepAdaptor, |
53 | HSurface from BRepAdaptor, |
54 | TopolTool from Adaptor3d, |
55 | TopolTool from BRepTopAdaptor, |
56 | Vector from math, |
57 | Shape from GeomAbs, |
58 | Surface from Geom, |
59 | Curve from Geom2d, |
60 | Pnt2d from gp |
61 | |
62 | raises |
63 | OutOfRange from Standard, |
64 | NoSuchObject from Standard, |
65 | ConstructionError from Standard |
66 | |
67 | is |
68 | |
81bba717 |
69 | -- Construction and general data. |
7fd59977 |
70 | ------------------------------------- |
71 | |
72 | Delete(me:out) is virtual; |
73 | ---C++: alias "Standard_EXPORT virtual ~ChFi3d_Builder(){Delete() ; }" |
74 | |
75 | Initialize(S : Shape from TopoDS; Ta : Real from Standard); |
76 | |
77 | |
78 | SetParams(me : in out; |
79 | Tang, Tesp, T2d, TApp3d, TolApp2d, Fleche: Real from Standard); |
80 | |
81 | |
82 | SetContinuity(me : in out; |
83 | InternalContinuity : Shape from GeomAbs; |
84 | AngularTolerance : Real); |
85 | |
86 | |
81bba717 |
87 | -- Acquisition and questioning on trajectories. |
7fd59977 |
88 | ------------------------------------------------------- |
89 | |
90 | Remove(me : in out; E : Edge from TopoDS) |
91 | ---Purpose: extracts from the list the contour containing edge E. |
92 | -- |
93 | is static; |
94 | |
95 | Contains(me;E : Edge from TopoDS) |
96 | ---Purpose: gives the number of the contour containing E or 0 |
97 | -- if E does not belong to any contour. |
98 | returns Integer from Standard |
99 | is static; |
100 | |
101 | Contains(me;E : Edge from TopoDS; IndexInSpine : out Integer from Standard) |
102 | ---Purpose: gives the number of the contour containing E or 0 |
103 | -- if E does not belong to any contour. |
104 | -- Sets in IndexInSpine the index of E in the contour if it's found |
105 | returns Integer from Standard |
106 | is static; |
107 | |
108 | NbElements(me) returns Integer is static; |
109 | ---Purpose: gives the number of disjoint contours on which |
110 | -- the fillets are calculated |
111 | |
112 | Value(me; I : Integer) returns Spine from ChFiDS |
113 | ---Purpose: gives the n'th set of edges (contour) |
114 | raises OutOfRange from Standard |
115 | ---Purpose: if I >NbElements() |
116 | is static; |
117 | |
118 | |
119 | Length(me; IC : Integer from Standard) returns Real from Standard |
120 | ---Purpose: returns the length of the contour of index IC. |
121 | is static; |
122 | |
123 | |
124 | FirstVertex(me;IC : Integer from Standard) |
125 | returns Vertex from TopoDS |
126 | ---Purpose: returns the First vertex V of |
127 | -- the contour of index IC. |
128 | is static; |
129 | |
130 | |
131 | LastVertex(me;IC : Integer from Standard) |
132 | returns Vertex from TopoDS |
133 | ---Purpose: returns the Last vertex V of |
134 | -- the contour of index IC. |
135 | is static; |
136 | |
137 | |
138 | Abscissa(me; |
139 | IC : Integer from Standard; |
140 | V : Vertex from TopoDS) |
141 | returns Real from Standard |
142 | ---Purpose: returns the abscissa of the vertex V on |
143 | -- the contour of index IC. |
144 | is static; |
145 | |
146 | |
147 | RelativeAbscissa(me; |
148 | IC : Integer from Standard; |
149 | V : Vertex from TopoDS) |
150 | returns Real from Standard |
151 | ---Purpose: returns the relative abscissa([0.,1.]) of the |
152 | -- vertex V on the contour of index IC. |
153 | is static; |
154 | |
155 | |
156 | ClosedAndTangent(me; IC : Integer from Standard) |
157 | returns Boolean from Standard |
158 | ---Purpose: returns true if the contour of index IC is closed |
159 | -- an tangent. |
160 | is static; |
161 | |
162 | |
163 | Closed(me; IC : Integer from Standard) |
164 | returns Boolean from Standard |
165 | ---Purpose: returns true if the contour of index IC is closed |
166 | is static; |
167 | |
168 | |
81bba717 |
169 | -- Calculation and the restoration of results. |
7fd59977 |
170 | ---------------------------------------------- |
171 | |
172 | Compute(me : in out) |
81bba717 |
173 | ---Purpose: general calculation of geometry on all edges, |
174 | -- topologic reconstruction. |
7fd59977 |
175 | is static; |
176 | |
177 | IsDone(me) returns Boolean from Standard is static; |
178 | ---Purpose: returns True if the computation is success |
179 | |
180 | Shape(me) returns Shape from TopoDS |
81bba717 |
181 | ---Purpose: if (Isdone()) makes the result. |
7fd59977 |
182 | raises NoSuchObject from Standard |
183 | ---Purpose: if (!Isdone()) |
184 | is static; |
185 | |
186 | Generated(me : in out; EouV : Shape from TopoDS) |
187 | ---Purpose: Advanced function for the history |
188 | returns ListOfShape from TopTools |
189 | ---C++: return const & |
190 | is static; |
191 | |
192 | NbFaultyContours(me) |
193 | ---Purpose: Returns the number of contours on which the calculation |
194 | -- has failed. |
195 | returns Integer from Standard is static; |
196 | |
197 | FaultyContour(me; I : Integer from Standard) |
198 | ---Purpose: Returns the number of I'th contour on which the calculation |
199 | -- has failed. |
200 | returns Integer from Standard is static; |
201 | |
202 | NbComputedSurfaces(me; IC : Integer from Standard) |
203 | ---Purpose: Returns the number of surfaces calculated on the contour IC. |
204 | returns Integer from Standard is static; |
205 | |
206 | ComputedSurface(me; IC, IS : Integer from Standard) |
207 | ---Purpose: Returns the IS'th surface calculated on the contour IC. |
208 | returns Surface from Geom is static; |
209 | |
210 | NbFaultyVertices(me) |
211 | ---Purpose: Returns the number of vertices on which the calculation |
212 | -- has failed. |
213 | returns Integer from Standard is static; |
214 | |
215 | FaultyVertex(me; IV : Integer from Standard) |
216 | ---Purpose: Returns the IV'th vertex on which the calculation has failed. |
217 | returns Vertex from TopoDS is static; |
218 | |
219 | HasResult(me) returns Boolean from Standard is static; |
220 | ---Purpose: returns True if a partial result has been calculated |
221 | |
222 | BadShape(me) returns Shape from TopoDS |
223 | ---Purpose: if (HasResult()) returns partial result |
224 | raises NoSuchObject from Standard |
225 | ---Purpose: if (!HasResult()) |
226 | is static; |
227 | |
228 | StripeStatus(me;IC:Integer from Standard) returns ErrorStatus from ChFiDS |
229 | ---Purpose: for the stripe IC ,indication on the cause |
230 | -- of failure WalkingFailure,TwistedSurface,Error, Ok |
231 | is static; |
232 | |
233 | Reset(me : in out) |
234 | ---Purpose: Reset all results of compute and returns the algorythm |
235 | -- in the state of the last acquisition to |
236 | -- enable modification of contours or areas. |
237 | is static; |
238 | |
239 | Builder(me) returns HBuilder from TopOpeBRepBuild |
240 | ---Purpose: Returns the Builder of topologic operations. |
241 | is static; |
242 | |
243 | |
244 | ---pour implementation |
245 | ---------------------- |
246 | |
247 | --- Simulation |
248 | |
249 | SimulKPart(me; SD : mutable SurfData from ChFiDS) |
250 | is deferred protected; |
251 | |
252 | SimulSurf(me : in out; |
253 | Data : out SurfData from ChFiDS; |
254 | Guide : HElSpine from ChFiDS; |
255 | Spine : Spine from ChFiDS; |
256 | Choix : Integer from Standard; |
257 | S1 : HSurface from BRepAdaptor; |
258 | I1 : TopolTool from Adaptor3d; |
259 | S2 : HSurface from BRepAdaptor; |
260 | I2 : TopolTool from Adaptor3d; |
261 | TolGuide : Real from Standard; |
262 | First,Last : in out Real from Standard; |
263 | Inside,Appro : Boolean from Standard; |
264 | Forward : Boolean from Standard; |
265 | RecOnS1,RecOnS2 : Boolean from Standard; |
266 | Soldep : Vector from math; |
267 | Intf,Intl : in out Boolean from Standard) |
268 | returns Boolean |
269 | is deferred protected; |
270 | |
271 | SimulSurf(me : in out; |
272 | Data : out SurfData from ChFiDS; |
273 | Guide : HElSpine from ChFiDS; |
274 | Spine : Spine from ChFiDS; |
275 | Choix : Integer from Standard; |
276 | S1 : HSurface from BRepAdaptor; |
277 | I1 : TopolTool from Adaptor3d; |
278 | PC1 : HCurve2d from BRepAdaptor; |
279 | Sref1 : HSurface from BRepAdaptor; |
280 | PCref1 : HCurve2d from BRepAdaptor; |
281 | Decroch1 : out Boolean from Standard; |
282 | S2 : HSurface from BRepAdaptor; |
283 | I2 : TopolTool from Adaptor3d; |
284 | Or2 : Orientation from TopAbs; |
285 | Fleche : Real from Standard; |
286 | TolGuide : Real from Standard; |
287 | First,Last : in out Real from Standard; |
288 | Inside,Appro,Forward : Boolean from Standard; |
289 | RecP,RecS,RecRst : Boolean from Standard; |
290 | Soldep : Vector from math) |
291 | is virtual protected; |
292 | |
293 | SimulSurf(me : in out; |
294 | Data : out SurfData from ChFiDS; |
295 | Guide : HElSpine from ChFiDS; |
296 | Spine : Spine from ChFiDS; |
297 | Choix : Integer from Standard; |
298 | S1 : HSurface from BRepAdaptor; |
299 | I1 : TopolTool from Adaptor3d; |
300 | Or1 : Orientation from TopAbs; |
301 | S2 : HSurface from BRepAdaptor; |
302 | I2 : TopolTool from Adaptor3d; |
303 | PC2 : HCurve2d from BRepAdaptor; |
304 | Sref2 : HSurface from BRepAdaptor; |
305 | PCref2 : HCurve2d from BRepAdaptor; |
306 | Decroch2 : out Boolean from Standard; |
307 | Fleche : Real from Standard; |
308 | TolGuide : Real from Standard; |
309 | First,Last : in out Real from Standard; |
310 | Inside,Appro,Forward : Boolean from Standard; |
311 | RecP,RecS,RecRst : Boolean from Standard; |
312 | Soldep : Vector from math) |
313 | |
314 | is virtual protected; |
315 | |
316 | SimulSurf(me : in out; |
317 | Data : out SurfData from ChFiDS; |
318 | Guide : HElSpine from ChFiDS; |
319 | Spine : Spine from ChFiDS; |
320 | Choix : Integer from Standard; |
321 | S1 : HSurface from BRepAdaptor; |
322 | I1 : TopolTool from Adaptor3d; |
323 | PC1 : HCurve2d from BRepAdaptor; |
324 | Sref1 : HSurface from BRepAdaptor; |
325 | PCref1 : HCurve2d from BRepAdaptor; |
326 | Decroch1 : out Boolean from Standard; |
327 | Or1 : Orientation from TopAbs; |
328 | S2 : HSurface from BRepAdaptor; |
329 | I2 : TopolTool from Adaptor3d; |
330 | PC2 : HCurve2d from BRepAdaptor; |
331 | Sref2 : HSurface from BRepAdaptor; |
332 | PCref2 : HCurve2d from BRepAdaptor; |
333 | Decroch2 : out Boolean from Standard; |
334 | Or2 : Orientation from TopAbs; |
335 | Fleche : Real from Standard; |
336 | TolGuide : Real from Standard; |
337 | First,Last : in out Real from Standard; |
338 | Inside,Appro,Forward : Boolean from Standard; |
339 | RecP1,RecRst1 : Boolean from Standard; |
340 | RecP2,RecRst2 : Boolean from Standard; |
341 | Soldep : Vector from math) |
342 | |
343 | is virtual protected; |
344 | |
345 | SimulData(me : in out; |
346 | Data : out SurfData from ChFiDS; |
347 | Guide : HElSpine from ChFiDS; |
348 | Lin : out Line from BRepBlend; |
349 | S1 : HSurface from Adaptor3d; |
350 | I1 : TopolTool from Adaptor3d; |
351 | S2 : HSurface from Adaptor3d; |
352 | I2 : TopolTool from Adaptor3d; |
353 | Func : in out Function from Blend; |
354 | FInv : in out FuncInv from Blend; |
355 | PFirst : Real from Standard; |
356 | MaxStep : Real from Standard; |
357 | Fleche : Real from Standard; |
358 | TolGuide : Real from Standard; |
359 | First,Last : in out Real from Standard; |
360 | Inside,Appro,Forward : Boolean from Standard; |
361 | Soldep : Vector from math; |
362 | NbSecMin : Integer from Standard; |
363 | RecOnS1 : Boolean from Standard = Standard_False; |
364 | RecOnS2 : Boolean from Standard = Standard_False) |
365 | returns Boolean from Standard is static protected; |
366 | |
367 | SimulData(me : in out; |
368 | Data : in out SurfData from ChFiDS; |
369 | HGuide : HElSpine from ChFiDS; |
370 | Lin : in out Line from BRepBlend; |
371 | S1 : HSurface from Adaptor3d; |
372 | I1 : TopolTool from Adaptor3d; |
373 | S2 : HSurface from Adaptor3d; |
374 | PC2 : HCurve2d from Adaptor2d; |
375 | I2 : TopolTool from Adaptor3d; |
376 | Decroch : out Boolean from Standard; |
377 | Func : in out SurfRstFunction from Blend; |
378 | FInv : in out FuncInv from Blend; |
379 | FInvP : in out SurfPointFuncInv from Blend; |
380 | FInvC : in out SurfCurvFuncInv from Blend; |
381 | PFirst : Real from Standard; |
382 | MaxStep : Real from Standard; |
383 | Fleche : Real from Standard; |
384 | TolGuide : Real from Standard; |
385 | First : in out Real from Standard; |
386 | Last : in out Real from Standard; |
387 | Soldep : Vector from math; |
388 | NbSecMin : Integer from Standard; |
389 | Inside : Boolean from Standard; |
390 | Appro : Boolean from Standard; |
391 | Forward : Boolean from Standard; |
392 | RecP,RecS,RecRst : Boolean from Standard) |
393 | returns Boolean from Standard is static protected; |
394 | |
395 | |
396 | SimulData(me : in out; |
397 | Data : in out SurfData from ChFiDS; |
398 | HGuide : HElSpine from ChFiDS; |
399 | Lin : in out Line from BRepBlend; |
400 | S1 : HSurface from Adaptor3d; |
401 | PC1 : HCurve2d from Adaptor2d; |
402 | I1 : TopolTool from Adaptor3d; |
403 | Decroch1 : out Boolean from Standard; |
404 | S2 : HSurface from Adaptor3d; |
405 | PC2 : HCurve2d from Adaptor2d; |
406 | I2 : TopolTool from Adaptor3d; |
407 | Decroch2 : out Boolean from Standard; |
408 | Func : in out RstRstFunction from Blend; |
409 | FInv1 : in out SurfCurvFuncInv from Blend; |
410 | FInvP1 : in out CurvPointFuncInv from Blend; |
411 | FInv2 : in out SurfCurvFuncInv from Blend; |
412 | FInvP2 : in out CurvPointFuncInv from Blend; |
413 | PFirst : Real from Standard; |
414 | MaxStep : Real from Standard; |
415 | Fleche : Real from Standard; |
416 | TolGuide : Real from Standard; |
417 | First : in out Real from Standard; |
418 | Last : in out Real from Standard; |
419 | Soldep : Vector from math; |
420 | NbSecMin : Integer from Standard; |
421 | Inside : Boolean from Standard; |
422 | Appro : Boolean from Standard; |
423 | Forward : Boolean from Standard; |
424 | RecP1, RecRst1 : Boolean from Standard; |
425 | RecP2, RecRst2 : Boolean from Standard) |
426 | returns Boolean from Standard is static protected; |
427 | |
428 | --- Calcul veritable |
429 | |
430 | SetRegul(me : in out) is deferred protected; |
431 | |
432 | FaceTangency(me ;E0,E1 : Edge from TopoDS; V : Vertex from TopoDS) |
433 | returns Boolean |
434 | is static private; |
435 | |
436 | PerformElement(me : in out ;CElement : Spine) |
437 | returns Boolean from Standard |
438 | is static protected; |
439 | |
440 | PerformExtremity(me : in out ;CElement : Spine) |
441 | is static protected; |
442 | |
443 | PerformSetOfSurf(me : in out; |
444 | S : in out Stripe from ChFiDS; |
445 | Simul : Boolean from Standard = Standard_False) |
446 | is static protected; |
447 | |
448 | PerformSetOfKPart(me : in out; |
449 | S : in out Stripe from ChFiDS; |
450 | Simul : Boolean from Standard = Standard_False) |
451 | is static protected; |
452 | |
453 | PerformSetOfKGen(me : in out; |
454 | S : in out Stripe from ChFiDS; |
455 | Simul : Boolean from Standard = Standard_False) |
456 | is static protected; |
457 | |
458 | PerformSetOfSurfOnElSpine |
459 | (me : in out; |
460 | ES : HElSpine from ChFiDS; |
461 | St : in out Stripe from ChFiDS; |
462 | It1,It2 : in out TopolTool from BRepTopAdaptor; |
463 | Simul : Boolean from Standard = Standard_False) |
464 | is static private; |
465 | |
466 | Trunc(me : in out; |
467 | SD : SurfData from ChFiDS; |
468 | Spine : Spine from ChFiDS; |
469 | S1 : HSurface from Adaptor3d; |
470 | S2 : HSurface from Adaptor3d; |
471 | iedge : Integer from Standard; |
472 | isfirst : Boolean from Standard; |
473 | cntlFiOnS : Integer from Standard) -- eap, occ354 |
474 | is static protected; |
475 | |
476 | SplitKPart(me : in out; |
477 | Data : SurfData from ChFiDS; |
478 | SetData : out SequenceOfSurfData from ChFiDS; |
479 | Spine : Spine from ChFiDS; |
480 | Iedge : Integer from Standard; |
481 | S1 : HSurface from Adaptor3d; |
482 | I1 : TopolTool from Adaptor3d; |
483 | S2 : HSurface from Adaptor3d; |
484 | I2 : TopolTool from Adaptor3d; |
485 | Intf,Intl : in out Boolean from Standard) |
486 | |
487 | returns Boolean from Standard is static; |
81bba717 |
488 | ---Purpose: Method, implemented in the inheritants, calculates |
489 | -- the elements of construction of the surface (fillet or |
490 | -- chamfer). |
7fd59977 |
491 | |
492 | CallPerformSurf(me : in out; |
493 | Stripe : in out Stripe from ChFiDS; |
494 | Simul : Boolean from Standard; |
495 | SeqSD : in out SequenceOfSurfData from ChFiDS; |
496 | SD : in out SurfData from ChFiDS; |
497 | Guide : HElSpine from ChFiDS; |
498 | Spine : Spine from ChFiDS; |
499 | HS1, HS3 : HSurface from BRepAdaptor; |
500 | P1, P3 : Pnt2d from gp; |
501 | I1 : in out TopolTool from Adaptor3d; |
502 | HS2, HS4 : HSurface from BRepAdaptor; |
503 | P2, P4 : Pnt2d from gp; |
504 | I2 : in out TopolTool from Adaptor3d; |
505 | MaxStep : Real from Standard; |
506 | Fleche : Real from Standard; |
507 | TolGuide : Real from Standard; |
508 | First,Last : in out Real from Standard; |
509 | Inside,Appro : Boolean from Standard; |
510 | Forward : Boolean from Standard; |
511 | RecOnS1,RecOnS2 : Boolean from Standard; |
512 | Soldep : in out Vector from math; |
513 | Intf,Intl : in out Boolean from Standard; |
514 | Surf1,Surf2 : in out HSurface from BRepAdaptor) |
515 | is protected; |
516 | |
517 | PerformSurf(me : in out; |
518 | Data : out SequenceOfSurfData from ChFiDS; |
519 | Guide : HElSpine from ChFiDS; |
520 | Spine : Spine from ChFiDS; |
521 | Choix : Integer from Standard; |
522 | S1 : HSurface from BRepAdaptor; |
523 | I1 : TopolTool from Adaptor3d; |
524 | S2 : HSurface from BRepAdaptor; |
525 | I2 : TopolTool from Adaptor3d; |
526 | MaxStep : Real from Standard; |
527 | Fleche : Real from Standard; |
528 | TolGuide : Real from Standard; |
529 | First,Last : in out Real from Standard; |
530 | Inside,Appro : Boolean from Standard; |
531 | Forward : Boolean from Standard; |
532 | RecOnS1,RecOnS2 : Boolean from Standard; |
533 | Soldep : Vector from math; |
534 | Intf,Intl : in out Boolean from Standard) |
535 | returns Boolean |
536 | is deferred protected; |
81bba717 |
537 | ---Purpose: Method, implemented in the inheritants, calculating |
538 | -- elements of construction of the surface (fillet or |
539 | -- chamfer). |
7fd59977 |
540 | |
541 | PerformSurf(me : in out; |
542 | Data : out SequenceOfSurfData from ChFiDS; |
543 | Guide : HElSpine from ChFiDS; |
544 | Spine : Spine from ChFiDS; |
545 | Choix : Integer from Standard; |
546 | S1 : HSurface from BRepAdaptor; |
547 | I1 : TopolTool from Adaptor3d; |
548 | PC1 : HCurve2d from BRepAdaptor; |
549 | Sref1 : HSurface from BRepAdaptor; |
550 | PCref1 : HCurve2d from BRepAdaptor; |
551 | Decroch1 : out Boolean from Standard; |
552 | S2 : HSurface from BRepAdaptor; |
553 | I2 : TopolTool from Adaptor3d; |
554 | Or2 : Orientation from TopAbs; |
555 | MaxStep : Real from Standard; |
556 | Fleche : Real from Standard; |
557 | TolGuide : Real from Standard; |
558 | First,Last : in out Real from Standard; |
559 | Inside,Appro,Forward : Boolean from Standard; |
560 | RecP,RecS,RecRst : Boolean from Standard; |
561 | Soldep : Vector from math) |
562 | |
563 | is virtual protected; |
564 | ---Purpose: Method, implemented in inheritants, calculates |
565 | -- the elements of construction of the surface (fillet |
566 | -- or chamfer) contact edge/face. |
567 | |
568 | PerformSurf(me : in out; |
569 | Data : out SequenceOfSurfData from ChFiDS; |
570 | Guide : HElSpine from ChFiDS; |
571 | Spine : Spine from ChFiDS; |
572 | Choix : Integer from Standard; |
573 | S1 : HSurface from BRepAdaptor; |
574 | I1 : TopolTool from Adaptor3d; |
575 | Or1 : Orientation from TopAbs; |
576 | S2 : HSurface from BRepAdaptor; |
577 | I2 : TopolTool from Adaptor3d; |
578 | PC2 : HCurve2d from BRepAdaptor; |
579 | Sref2 : HSurface from BRepAdaptor; |
580 | PCref2 : HCurve2d from BRepAdaptor; |
581 | Decroch2 : out Boolean from Standard; |
582 | MaxStep : Real from Standard; |
583 | Fleche : Real from Standard; |
584 | TolGuide : Real from Standard; |
585 | First,Last : in out Real from Standard; |
586 | Inside,Appro,Forward : Boolean from Standard; |
587 | RecP,RecS,RecRst : Boolean from Standard; |
588 | Soldep : Vector from math) |
589 | |
590 | is virtual protected; |
591 | ---Purpose: Method, implemented in inheritants, calculates |
592 | -- the elements of construction of the surface (fillet |
593 | -- or chamfer) contact edge/face. |
594 | |
595 | PerformSurf(me : in out; |
596 | Data : out SequenceOfSurfData from ChFiDS; |
597 | Guide : HElSpine from ChFiDS; |
598 | Spine : Spine from ChFiDS; |
599 | Choix : Integer from Standard; |
600 | S1 : HSurface from BRepAdaptor; |
601 | I1 : TopolTool from Adaptor3d; |
602 | PC1 : HCurve2d from BRepAdaptor; |
603 | Sref1 : HSurface from BRepAdaptor; |
604 | PCref1 : HCurve2d from BRepAdaptor; |
605 | Decroch1 : out Boolean from Standard; |
606 | Or1 : Orientation from TopAbs; |
607 | S2 : HSurface from BRepAdaptor; |
608 | I2 : TopolTool from Adaptor3d; |
609 | PC2 : HCurve2d from BRepAdaptor; |
610 | Sref2 : HSurface from BRepAdaptor; |
611 | PCref2 : HCurve2d from BRepAdaptor; |
612 | Decroch2 : out Boolean from Standard; |
613 | Or2 : Orientation from TopAbs; |
614 | MaxStep : Real from Standard; |
615 | Fleche : Real from Standard; |
616 | TolGuide : Real from Standard; |
617 | First,Last : in out Real from Standard; |
618 | Inside,Appro,Forward : Boolean from Standard; |
619 | RecP1,RecRst1 : Boolean from Standard; |
620 | RecP2,RecRst2 : Boolean from Standard; |
621 | Soldep : Vector from math) |
622 | |
623 | is virtual protected; |
624 | ---Purpose: Method, implemented in inheritants, calculates |
625 | -- the elements of construction of the surface (fillet |
626 | -- or chamfer) contact edge/edge. |
627 | |
628 | PerformFilletOnVertex(me : in out; |
629 | Index: Integer from Standard) |
630 | is static private; |
631 | |
632 | PerformSingularCorner(me : in out ; |
633 | Index : Integer from Standard) |
634 | is static private; |
635 | |
636 | PerformOneCorner(me : in out ; |
637 | Index : Integer from Standard; |
638 | PrepareOnSame : Boolean from Standard = Standard_False) |
639 | is static private; |
640 | |
641 | IntersectMoreCorner(me : in out ; |
642 | Index : Integer from Standard) |
643 | is static private; |
644 | |
645 | PerformMoreSurfdata(me : in out ; |
646 | Index : Integer from Standard) |
647 | is static private; |
648 | |
649 | PerformTwoCornerbyInter(me : in out ; |
650 | Index : Integer from Standard) |
651 | returns Integer |
652 | is static; |
653 | |
654 | PerformTwoCorner(me : in out ; |
655 | Index : Integer from Standard) |
656 | is deferred protected; |
657 | |
658 | |
659 | PerformThreeCorner(me : in out ; |
660 | Index : Integer from Standard) |
661 | is deferred protected; |
662 | |
663 | PerformMoreThreeCorner(me : in out ; |
664 | Index : Integer from Standard; |
665 | nbcourb : Integer from Standard) |
666 | is static protected; |
667 | |
668 | PerformIntersectionAtEnd (me : in out ; |
669 | Index : Integer from Standard) |
670 | is static private; |
671 | |
672 | ExtentAnalyse(me : in out) |
673 | is static private; |
674 | |
675 | ExtentOneCorner(me : in out; |
676 | V : Vertex from TopoDS; |
677 | S : Stripe from ChFiDS) |
678 | is deferred protected; |
679 | |
680 | ExtentTwoCorner(me : in out; |
681 | V : Vertex from TopoDS; |
682 | LS : ListOfStripe from ChFiDS) |
683 | is deferred protected; |
684 | |
685 | ExtentThreeCorner(me : in out; |
686 | V : Vertex from TopoDS; |
687 | LS : ListOfStripe from ChFiDS) |
688 | is deferred protected; |
689 | |
690 | FindFace(me; |
691 | V : Vertex from TopoDS; |
692 | P1,P2 : CommonPoint from ChFiDS; |
693 | Fv : out Face from TopoDS) |
694 | returns Boolean from Standard |
695 | is static private; |
696 | |
697 | FindFace(me; |
698 | V : Vertex from TopoDS; |
699 | P1,P2 : CommonPoint from ChFiDS; |
700 | Fv : out Face from TopoDS; |
701 | Favoid: Face from TopoDS) |
702 | returns Boolean from Standard |
703 | is static private; |
704 | |
705 | MoreSurfdata(me; |
706 | Index : Integer from Standard ) |
707 | returns Boolean from Standard |
708 | is static private; |
709 | |
710 | StartSol(me; |
711 | Spine : Spine from ChFiDS; |
712 | HS : in out HSurface from BRepAdaptor; |
713 | P : in out Pnt2d from gp; |
714 | HC : in out HCurve2d from BRepAdaptor; |
715 | W : in out Real from Standard; |
716 | SD : SurfData from ChFiDS; |
717 | isFirst : Boolean from Standard; |
718 | OnS : Integer from Standard; |
719 | HSref : in out HSurface from BRepAdaptor; |
720 | HCref : in out HCurve2d from BRepAdaptor; |
721 | RecP : out Boolean from Standard; |
722 | RecS : out Boolean from Standard; |
723 | RecRst : out Boolean from Standard; |
724 | C1Obst : out Boolean from Standard; |
725 | HSbis : in out HSurface from BRepAdaptor; |
726 | Pbis : in out Pnt2d from gp; |
727 | Decroch : Boolean from Standard; |
728 | Vref : Vertex from TopoDS) |
729 | returns Boolean from Standard |
730 | is static private; |
731 | |
732 | StartSol(me; |
733 | S : Stripe from ChFiDS; |
734 | HGuide : HElSpine from ChFiDS; |
735 | HS1,HS2 : in out HSurface from BRepAdaptor; |
736 | I1,I2 : in out TopolTool from BRepTopAdaptor; |
737 | P1,P2 : in out Pnt2d from gp; |
738 | First : in out Real from Standard) |
739 | is static private; |
740 | |
741 | PerformFirstSection(me ; |
742 | S : Spine from ChFiDS; |
743 | HGuide : HElSpine from ChFiDS; |
744 | Choix : Integer from Standard; |
745 | S1,S2 : in out HSurface from BRepAdaptor; |
746 | I1,I2 : TopolTool from Adaptor3d; |
747 | Par : Real from Standard; |
748 | SolDep : in out Vector from math; |
749 | Pos1,Pos2 : out State from TopAbs) |
750 | returns Boolean from Standard |
751 | is deferred protected; |
752 | |
753 | SearchFace(me; |
754 | Sp : Spine from ChFiDS; |
755 | Pc : CommonPoint from ChFiDS; |
756 | FRef : Face from TopoDS; |
757 | FVoi : out Face from TopoDS) |
758 | returns Boolean from Standard |
759 | is static protected; |
760 | |
761 | ConexFaces(me; |
762 | Sp : Spine from ChFiDS; |
763 | IEdge : Integer from Standard; |
764 | RefChoix : Integer from Standard; |
765 | HS1,HS2 : out HSurface from BRepAdaptor) |
766 | is static private; |
767 | |
768 | StripeOrientations(me; |
769 | Sp : Spine from ChFiDS; |
770 | Or1,Or2 : out Orientation from TopAbs; |
771 | ChoixConge : out Integer from Standard) |
772 | returns Boolean from Standard is static protected; |
773 | |
774 | ComputeData(me : in out; |
775 | Data : out SurfData from ChFiDS; |
776 | Guide : HElSpine from ChFiDS; |
777 | Spine : Spine from ChFiDS; |
778 | Lin : out Line from BRepBlend; |
779 | S1 : HSurface from Adaptor3d; |
780 | I1 : TopolTool from Adaptor3d; |
781 | S2 : HSurface from Adaptor3d; |
782 | I2 : TopolTool from Adaptor3d; |
783 | Func : in out Function from Blend; |
784 | FInv : in out FuncInv from Blend; |
785 | PFirst : Real from Standard; |
786 | MaxStep : Real from Standard; |
787 | Fleche : Real from Standard; |
788 | TolGuide : Real from Standard; |
789 | First,Last : in out Real from Standard; |
790 | Inside,Appro : Boolean from Standard; |
791 | Forward : Boolean from Standard; |
792 | Soldep : Vector from math; |
793 | Intf,Intl : in out Boolean from Standard; |
794 | Gd1,Gd2,Gf1,Gf2 : out Boolean from Standard; |
795 | RecOnS1 : Boolean from Standard = Standard_False; |
796 | RecOnS2 : Boolean from Standard = Standard_False) |
797 | ---Purpose: Calculates a Line of contact face/face. |
798 | returns Boolean from Standard is static protected; |
799 | |
800 | ComputeData(me : in out; |
801 | Data : in out SurfData from ChFiDS; |
802 | HGuide : HElSpine from ChFiDS; |
803 | Lin : in out Line from BRepBlend; |
804 | S1 : HSurface from Adaptor3d; |
805 | I1 : TopolTool from Adaptor3d; |
806 | S2 : HSurface from Adaptor3d; |
807 | PC2 : HCurve2d from Adaptor2d; |
808 | I2 : TopolTool from Adaptor3d; |
809 | Decroch : out Boolean from Standard; |
810 | Func : in out SurfRstFunction from Blend; |
811 | FInv : in out FuncInv from Blend; |
812 | FInvP : in out SurfPointFuncInv from Blend; |
813 | FInvC : in out SurfCurvFuncInv from Blend; |
814 | PFirst : Real from Standard; |
815 | MaxStep : Real from Standard; |
816 | Fleche : Real from Standard; |
817 | TolGuide : Real from Standard; |
818 | First : in out Real from Standard; |
819 | Last : in out Real from Standard; |
820 | Soldep : Vector from math; |
821 | Inside : Boolean from Standard; |
822 | Appro : Boolean from Standard; |
823 | Forward : Boolean from Standard; |
824 | RecP,RecS,RecRst : Boolean from Standard) |
825 | ---Purpose: Calculates a Line of contact edge/face. |
826 | returns Boolean from Standard is static protected; |
827 | |
828 | |
829 | ComputeData(me : in out; |
830 | Data : in out SurfData from ChFiDS; |
831 | HGuide : HElSpine from ChFiDS; |
832 | Lin : in out Line from BRepBlend; |
833 | S1 : HSurface from Adaptor3d; |
834 | PC1 : HCurve2d from Adaptor2d; |
835 | I1 : TopolTool from Adaptor3d; |
836 | Decroch1 : out Boolean from Standard; |
837 | S2 : HSurface from Adaptor3d; |
838 | PC2 : HCurve2d from Adaptor2d; |
839 | I2 : TopolTool from Adaptor3d; |
840 | Decroch2 : out Boolean from Standard; |
841 | Func : in out RstRstFunction from Blend; |
842 | FInv1 : in out SurfCurvFuncInv from Blend; |
843 | FInvP1 : in out CurvPointFuncInv from Blend; |
844 | FInv2 : in out SurfCurvFuncInv from Blend; |
845 | FInvP2 : in out CurvPointFuncInv from Blend; |
846 | PFirst : Real from Standard; |
847 | MaxStep : Real from Standard; |
848 | Fleche : Real from Standard; |
849 | TolGuide : Real from Standard; |
850 | First : in out Real from Standard; |
851 | Last : in out Real from Standard; |
852 | Soldep : Vector from math; |
853 | Inside : Boolean from Standard; |
854 | Appro : Boolean from Standard; |
855 | Forward : Boolean from Standard; |
856 | RecP1, RecRst1 : Boolean from Standard; |
857 | RecP2, RecRst2 : Boolean from Standard) |
81bba717 |
858 | ---Purpose: Calculates a Line of contact edge/edge. |
7fd59977 |
859 | returns Boolean from Standard is static protected; |
860 | |
861 | |
862 | CompleteData(me : in out; |
863 | Data : in out SurfData from ChFiDS; |
864 | Func : in out Function from Blend; |
865 | Lin : in out Line from BRepBlend; |
866 | S1 : HSurface from Adaptor3d; |
867 | S2 : HSurface from Adaptor3d; |
868 | Or1 : Orientation from TopAbs; |
869 | Gd1,Gd2,Gf1,Gf2 : Boolean from Standard; |
870 | Reversed : Boolean from Standard = Standard_False) |
871 | returns Boolean from Standard is static protected; |
872 | |
873 | CompleteData(me : in out; |
874 | Data : in out SurfData from ChFiDS; |
875 | Func : in out SurfRstFunction from Blend; |
876 | Lin : in out Line from BRepBlend; |
877 | S1 : HSurface from Adaptor3d; |
878 | S2 : HSurface from Adaptor3d; |
879 | Or : Orientation from TopAbs; |
880 | Reversed : Boolean from Standard) |
881 | returns Boolean from Standard is static protected; |
882 | |
883 | CompleteData(me : in out; |
884 | Data : in out SurfData from ChFiDS; |
885 | Func : in out RstRstFunction from Blend; |
886 | Lin : in out Line from BRepBlend; |
887 | S1 : HSurface from Adaptor3d; |
888 | S2 : HSurface from Adaptor3d; |
889 | Or : Orientation from TopAbs) |
890 | returns Boolean from Standard is static protected; |
891 | |
892 | |
893 | |
894 | StoreData(me : in out; |
895 | Data : in out SurfData from ChFiDS; |
896 | Approx : Approx from AppBlend; |
897 | Lin : Line from BRepBlend; |
898 | S1 : HSurface from Adaptor3d; |
899 | S2 : HSurface from Adaptor3d; |
900 | Or1 : Orientation from TopAbs; |
901 | Gd1,Gd2,Gf1,Gf2 : Boolean from Standard; |
902 | Reversed : Boolean from Standard = Standard_False) |
903 | returns Boolean from Standard is static protected; |
904 | |
905 | CompleteData(me : in out; |
906 | Data : in out SurfData from ChFiDS; |
907 | Surfcoin : Surface from Geom; |
908 | S1 : HSurface from Adaptor3d; |
909 | PC1 : Curve from Geom2d; |
910 | S2 : HSurface from Adaptor3d; |
911 | PC2 : Curve from Geom2d; |
912 | Or : Orientation from TopAbs; |
913 | On1 : Boolean from Standard; |
914 | Gd1,Gd2,Gf1,Gf2 : Boolean from Standard) |
915 | returns Boolean from Standard is static protected; |
916 | |
917 | fields |
918 | |
81bba717 |
919 | -- Input part |
7fd59977 |
920 | myShape : Shape from TopoDS; |
921 | |
81bba717 |
922 | -- Numeric data (tolerances) NOTE : suspend tol2d!!! |
923 | angular : Real from Standard; -- tangency of edges |
924 | tolappangle : Real from Standard is protected; -- angular approximation |
7fd59977 |
925 | tolesp : Real from Standard is protected; -- confusion 3d : def 1.e-4 |
926 | tol2d : Real from Standard is protected; -- confusion 2d : def 1.e-5 |
927 | tolapp3d : Real from Standard is protected; -- approx 3d : def 1.e-4 |
928 | tolapp2d : Real from Standard is protected; -- approx 2d : def 1.e-5 |
81bba717 |
929 | fleche : Real from Standard is protected; -- vector of walking : def 1.e-6 |
7fd59977 |
930 | |
81bba717 |
931 | -- Continuity for the approximated geometry |
7fd59977 |
932 | myConti : Shape from GeomAbs is protected; |
933 | |
81bba717 |
934 | -- Maps of back-pointers to work |
7fd59977 |
935 | myEFMap : Map from ChFiDS is protected; |
936 | myESoMap : Map from ChFiDS is protected; |
937 | myEShMap : Map from ChFiDS is protected; |
938 | myVFMap : Map from ChFiDS is protected; |
939 | myVEMap : Map from ChFiDS is protected; |
940 | |
81bba717 |
941 | -- Tools of storage and reconstruction |
7fd59977 |
942 | myDS : HDataStructure from TopOpeBRepDS is protected; |
943 | myCoup : HBuilder from TopOpeBRepBuild is protected; |
944 | |
81bba717 |
945 | -- Tools of internal storage |
7fd59977 |
946 | myListStripe : ListOfStripe from ChFiDS is protected; |
947 | myVDataMap : StripeMap from ChFiDS is protected; |
948 | myRegul : Regularities from ChFiDS is protected; |
949 | |
81bba717 |
950 | -- Stripes the calculation which of hangs |
7fd59977 |
951 | badstripes : ListOfStripe from ChFiDS is protected; |
952 | |
81bba717 |
953 | -- Vertexes in the neighborhood which of the finition hangs |
7fd59977 |
954 | badvertices : ListOfShape from TopTools is protected; |
955 | |
81bba717 |
956 | -- Data calculated during the computation for the history |
7fd59977 |
957 | myGenerated : ListOfShape from TopTools; |
958 | myEVIMap : DataMapOfShapeListOfInteger from TopTools is protected; |
959 | |
81bba717 |
960 | -- flag if all has passed well |
7fd59977 |
961 | done : Boolean from Standard is protected; |
962 | |
81bba717 |
963 | -- result |
7fd59977 |
964 | myShapeResult : Shape from TopoDS; |
965 | |
81bba717 |
966 | -- flag there is partial result (badshape) |
7fd59977 |
967 | hasresult : Boolean from Standard is protected; |
968 | |
81bba717 |
969 | -- eventual partial result |
7fd59977 |
970 | badShape : Shape from TopoDS; |
971 | |
972 | |
973 | end Builder; |