1 -- Created on: 1995-04-25
2 -- Created by: Modelistation
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class FilBuilder from ChFi3d inherits Builder from ChFi3d
19 ---Purpose: Tool of construction of fillets 3d on edges.
27 Orientation from TopAbs,
29 HCurve from Adaptor3d,
30 TopolTool from Adaptor3d,
31 HCurve2d from BRepAdaptor,
32 HSurface from BRepAdaptor,
35 SequenceOfSurfData from ChFiDS,
37 ListOfStripe from ChFiDS,
40 SecHArray1 from ChFiDS,
41 FilletShape from ChFi3d,
42 SectionShape from BlendFunc,
48 Create(S : Shape from TopoDS;
49 FShape: FilletShape from ChFi3d = ChFi3d_Rational;
50 Ta : Real from Standard = 1.0e-2)
52 returns FilBuilder from ChFi3d;
54 SetFilletShape(me: in out; FShape: FilletShape from ChFi3d)
55 ---Purpose: Sets the type of fillet surface.
60 ---Purpose: Returns the type of fillet surface.
61 returns FilletShape from ChFi3d
64 ------------------------------------------------
65 --- Ajout d un contour sans indication de rayon.
66 ------------------------------------------------
68 Add(me : in out; E : Edge from TopoDS)
69 ---Purpose: initialisation of a contour with the first edge
70 -- (the following are found by propagation).
71 -- Attention, you need to start with SetRadius.
75 ------------------------------------------------------------------
76 --- Ajout ou update d un contour avec un rayon defini pour la
77 -- totalite du contour.
78 ------------------------------------------------------------------
80 Add(me : in out; Radius : Real; E : Edge from TopoDS)
81 ---Purpose: initialisation of the constant vector the corresponding 1st edge.
85 --Add(me : in out; C: Function from Law; E : Edge from TopoDS)
86 -- ---Purpose: initialisation of the vector (the vector is defined by
87 -- -- a curve - this is an evolutive vector).
90 --SetRadius(me : in out; Radius : Real; IC : Integer from Standard)
91 -- ---Purpose: Set the radius of the contour of index IC.
94 SetRadius(me : in out;
95 C : Function from Law;
96 IC : Integer from Standard;
97 IinC : Integer from Standard)
98 ---Purpose: Set the radius of the contour of index IC.
101 IsConstant(me : in out;
102 IC : Integer from Standard)
103 returns Boolean from Standard
104 ---Purpose: Returns true the contour is flaged as edge constant.
109 IC : Integer from Standard)
110 returns Real from Standard
111 ---Purpose: Returns the vector if the contour is flagged as edge
116 ResetContour(me : in out;
117 IC : Integer from Standard)
118 ---Purpose: Reset all vectors of contour IC.
122 ------------------------------------------------------------------
123 --- Update selectif d un contour avec un rayon constant applique
124 -- a la portion de contour correspondant a un edge.
125 ------------------------------------------------------------------
127 SetRadius(me : in out;
129 IC : Integer from Standard;
130 E : Edge from TopoDS)
131 ---Purpose: Set a constant on edge E of the contour of
132 -- index IC. Since then E is flagged as constant.
136 IC : Integer from Standard;
137 E : Edge from TopoDS)
138 ---Purpose: Extracts the flag constant and the vector of edge E.
141 ------------------------------------------------------------------
142 --- Update selectif d un contour avec une valeur de rayon
143 -- appliquee a un vertex du contour.
144 ------------------------------------------------------------------
146 SetRadius(me : in out;
148 IC : Integer from Standard;
149 V : Vertex from TopoDS)
150 ---Purpose: Set a vector on vertex V of the contour of index IC.
154 IC : Integer from Standard;
155 V : Vertex from TopoDS)
156 ---Purpose: Extracts the vector of the vertex V.
159 ------------------------------------------------------------------
160 --- Update selectif d un contour avec une valeur de rayon
161 -- appliquee a un parametre du contour.
162 ------------------------------------------------------------------
164 SetRadius(me : in out;
166 IC : Integer from Standard;
167 IinC : Integer from Standard)
168 ---Purpose: Set a vertex on the point of parametre U in the edge IinC
169 -- of the contour of index IC
172 ------------------------------------------------------------------
173 --- Methode pour recuperer et editer la portion de contour a rayon
174 -- variable ou constant encadrant un edge donne.
175 ------------------------------------------------------------------
177 IsConstant(me : in out;
178 IC : Integer from Standard;
179 E : Edge from TopoDS)
180 returns Boolean from Standard
181 ---Purpose: Returns true E is flagged as edge constant.
186 IC : Integer from Standard;
187 E : Edge from TopoDS)
188 returns Real from Standard
189 ---Purpose: Returns the vector if E is flagged as edge constant.
193 GetBounds(me : in out;
194 IC : Integer from Standard;
195 E : Edge from TopoDS;
196 First,Last : out Real from Standard)
197 returns Boolean from Standard
198 ---Purpose: Returns in First and Last les extremities of the
199 -- part of variable vector framing E, returns
200 -- False if E is flagged as edge constant.
204 IC : Integer from Standard;
205 E : Edge from TopoDS)
206 returns Function from Law
207 ---Purpose: Returns the rule of elementary evolution of the
208 -- part to variable vector framing E, returns a
209 -- rule zero if E is flagged as edge constant.
213 IC : Integer from Standard;
214 E : Edge from TopoDS;
215 L : Function from Law)
216 ---Purpose: Sets the rule of elementary evolution of the
217 -- part to variable vector framing E.
221 ---Methods for quick simulation
222 -------------------------------
224 Simulate(me : in out;
225 IC : Integer from Standard);
227 NbSurf(me; IC : Integer from Standard)
228 returns Integer from Standard;
230 Sect(me; IC, IS : Integer from Standard)
231 returns SecHArray1 from ChFiDS;
233 SimulKPart(me; SD : SurfData from ChFiDS)
236 SimulSurf(me : in out;
237 Data : out SurfData from ChFiDS;
238 Guide : HElSpine from ChFiDS;
239 Spine : Spine from ChFiDS;
240 Choix : Integer from Standard;
241 S1 : HSurface from BRepAdaptor;
242 I1 : TopolTool from Adaptor3d;
243 S2 : HSurface from BRepAdaptor;
244 I2 : TopolTool from Adaptor3d;
245 TolGuide : Real from Standard;
246 First,Last : in out Real from Standard;
247 Inside,Appro : Boolean from Standard;
248 Forward : Boolean from Standard;
249 RecOnS1,RecOnS2 : Boolean from Standard;
250 Soldep : Vector from math;
251 Intf,Intl : in out Boolean from Standard)
252 returns Boolean is protected;
254 SimulSurf(me : in out;
255 Data : out SurfData from ChFiDS;
256 Guide : HElSpine from ChFiDS;
257 Spine : Spine from ChFiDS;
258 Choix : Integer from Standard;
259 S1 : HSurface from BRepAdaptor;
260 I1 : TopolTool from Adaptor3d;
261 PC1 : HCurve2d from BRepAdaptor;
262 Sref1 : HSurface from BRepAdaptor;
263 PCref1 : HCurve2d from BRepAdaptor;
264 Decroch1 : out Boolean from Standard;
265 S2 : HSurface from BRepAdaptor;
266 I2 : TopolTool from Adaptor3d;
267 Or2 : Orientation from TopAbs;
268 Fleche : Real from Standard;
269 TolGuide : Real from Standard;
270 First,Last : in out Real from Standard;
271 Inside,Appro,Forward : Boolean from Standard;
272 RecP,RecS,RecRst : Boolean from Standard;
273 Soldep : Vector from math)
274 is redefined protected;
276 SimulSurf(me : in out;
277 Data : out SurfData from ChFiDS;
278 Guide : HElSpine from ChFiDS;
279 Spine : Spine from ChFiDS;
280 Choix : Integer from Standard;
281 S1 : HSurface from BRepAdaptor;
282 I1 : TopolTool from Adaptor3d;
283 Or1 : Orientation from TopAbs;
284 S2 : HSurface from BRepAdaptor;
285 I2 : TopolTool from Adaptor3d;
286 PC2 : HCurve2d from BRepAdaptor;
287 Sref2 : HSurface from BRepAdaptor;
288 PCref2 : HCurve2d from BRepAdaptor;
289 Decroch2 : out Boolean from Standard;
290 Fleche : Real from Standard;
291 TolGuide : Real from Standard;
292 First,Last : in out Real from Standard;
293 Inside,Appro,Forward : Boolean from Standard;
294 RecP,RecS,RecRst : Boolean from Standard;
295 Soldep : Vector from math)
296 is redefined protected;
298 SimulSurf(me : in out;
299 Data : out SurfData from ChFiDS;
300 Guide : HElSpine from ChFiDS;
301 Spine : Spine from ChFiDS;
302 Choix : Integer from Standard;
303 S1 : HSurface from BRepAdaptor;
304 I1 : TopolTool from Adaptor3d;
305 PC1 : HCurve2d from BRepAdaptor;
306 Sref1 : HSurface from BRepAdaptor;
307 PCref1 : HCurve2d from BRepAdaptor;
308 Decroch1 : out Boolean from Standard;
309 Or1 : Orientation from TopAbs;
310 S2 : HSurface from BRepAdaptor;
311 I2 : TopolTool from Adaptor3d;
312 PC2 : HCurve2d from BRepAdaptor;
313 Sref2 : HSurface from BRepAdaptor;
314 PCref2 : HCurve2d from BRepAdaptor;
315 Decroch2 : out Boolean from Standard;
316 Or2 : Orientation from TopAbs;
317 Fleche : Real from Standard;
318 TolGuide : Real from Standard;
319 First,Last : in out Real from Standard;
320 Inside,Appro,Forward : Boolean from Standard;
321 RecP1,RecRst1 : Boolean from Standard;
322 RecP2,RecRst2 : Boolean from Standard;
323 Soldep : Vector from math)
324 is redefined protected;
326 ---Methods for computation
327 --------------------------
329 PerformFirstSection(me ;
330 S : Spine from ChFiDS;
331 HGuide : HElSpine from ChFiDS;
332 Choix : Integer from Standard;
333 S1,S2 : in out HSurface from BRepAdaptor;
334 I1,I2 : TopolTool from Adaptor3d;
335 Par : Real from Standard;
336 SolDep : in out Vector from math;
337 Pos1,Pos2 : out State from TopAbs)
338 returns Boolean from Standard
341 PerformSurf(me : in out;
342 SeqData : out SequenceOfSurfData from ChFiDS;
343 Guide : HElSpine from ChFiDS;
344 Spine : Spine from ChFiDS;
345 Choix : Integer from Standard;
346 S1 : HSurface from BRepAdaptor;
347 I1 : TopolTool from Adaptor3d;
348 S2 : HSurface from BRepAdaptor;
349 I2 : TopolTool from Adaptor3d;
350 MaxStep : Real from Standard;
351 Fleche : Real from Standard;
352 TolGuide : Real from Standard;
353 First,Last : in out Real from Standard;
354 Inside,Appro : Boolean from Standard;
355 Forward : Boolean from Standard;
356 RecOnS1,RecOnS2 : Boolean from Standard;
357 Soldep : Vector from math;
358 Intf,Intl : in out Boolean from Standard)
361 ---Purpose: Method calculates the elements of construction of the
362 -- fillet (constant or evolutive).
364 PerformSurf(me : in out;
365 SeqData : out SequenceOfSurfData from ChFiDS;
366 Guide : HElSpine from ChFiDS;
367 Spine : Spine from ChFiDS;
368 Choix : Integer from Standard;
369 S1 : HSurface from BRepAdaptor;
370 I1 : TopolTool from Adaptor3d;
371 PC1 : HCurve2d from BRepAdaptor;
372 Sref1 : HSurface from BRepAdaptor;
373 PCref1 : HCurve2d from BRepAdaptor;
374 Decroch1 : out Boolean from Standard;
375 S2 : HSurface from BRepAdaptor;
376 I2 : TopolTool from Adaptor3d;
377 Or2 : Orientation from TopAbs;
378 MaxStep : Real from Standard;
379 Fleche : Real from Standard;
380 TolGuide : Real from Standard;
381 First,Last : in out Real from Standard;
382 Inside,Appro,Forward : Boolean from Standard;
383 RecP,RecS,RecRst : Boolean from Standard;
384 Soldep : Vector from math)
385 is redefined protected;
387 PerformSurf(me : in out;
388 SeqData : out SequenceOfSurfData from ChFiDS;
389 Guide : HElSpine from ChFiDS;
390 Spine : Spine from ChFiDS;
391 Choix : Integer from Standard;
392 S1 : HSurface from BRepAdaptor;
393 I1 : TopolTool from Adaptor3d;
394 Or1 : Orientation from TopAbs;
395 S2 : HSurface from BRepAdaptor;
396 I2 : TopolTool from Adaptor3d;
397 PC2 : HCurve2d from BRepAdaptor;
398 Sref2 : HSurface from BRepAdaptor;
399 PCref2 : HCurve2d from BRepAdaptor;
400 Decroch2 : out Boolean from Standard;
401 MaxStep : Real from Standard;
402 Fleche : Real from Standard;
403 TolGuide : Real from Standard;
404 First,Last : in out Real from Standard;
405 Inside,Appro,Forward : Boolean from Standard;
406 RecP,RecS,RecRst : Boolean from Standard;
407 Soldep : Vector from math)
408 is redefined protected;
410 PerformSurf(me : in out;
411 Data : out SequenceOfSurfData from ChFiDS;
412 Guide : HElSpine from ChFiDS;
413 Spine : Spine from ChFiDS;
414 Choix : Integer from Standard;
415 S1 : HSurface from BRepAdaptor;
416 I1 : TopolTool from Adaptor3d;
417 PC1 : HCurve2d from BRepAdaptor;
418 Sref1 : HSurface from BRepAdaptor;
419 PCref1 : HCurve2d from BRepAdaptor;
420 Decroch1 : out Boolean from Standard;
421 Or1 : Orientation from TopAbs;
422 S2 : HSurface from BRepAdaptor;
423 I2 : TopolTool from Adaptor3d;
424 PC2 : HCurve2d from BRepAdaptor;
425 Sref2 : HSurface from BRepAdaptor;
426 PCref2 : HCurve2d from BRepAdaptor;
427 Decroch2 : out Boolean from Standard;
428 Or2 : Orientation from TopAbs;
429 MaxStep : Real from Standard;
430 Fleche : Real from Standard;
431 TolGuide : Real from Standard;
432 First,Last : in out Real from Standard;
433 Inside,Appro,Forward : Boolean from Standard;
434 RecP1,RecRst1 : Boolean from Standard;
435 RecP2,RecRst2 : Boolean from Standard;
436 Soldep : Vector from math)
437 is redefined protected;
439 SplitSurf(me : in out;
440 SeqData : in out SequenceOfSurfData from ChFiDS;
441 line : Line from BRepBlend)
443 ---Purpose: Method to split an singular SurfData in several non
444 -- singular SurfData..
446 PerformTwoCorner(me : in out ;
447 Index : Integer from Standard)
450 PerformThreeCorner(me : in out ;
451 Index : Integer from Standard)
454 ExtentOneCorner(me : in out;
455 V : Vertex from TopoDS;
456 S : Stripe from ChFiDS)
459 ExtentTwoCorner(me : in out;
460 V : Vertex from TopoDS;
461 LS : ListOfStripe from ChFiDS)
464 ExtentThreeCorner(me : in out;
465 V : Vertex from TopoDS;
466 LS : ListOfStripe from ChFiDS)
469 SetRegul(me : in out) is protected;
473 myShape : SectionShape from BlendFunc;