0024696: Lower performance of the new Edge/Edge intersection algorithm
[occt.git] / tests / caf / driver / A5
1 AddDriver D Box Cyl Sph Attach XAttach PTxyz PTALine PRLine PMirr Cut Fuse Prism FulRevol SecRevol Fillet
2
3 #1 Create Box
4 NewCommand D
5 set B2 [AddObject D];                   ## add object
6 set F2 [AddFunction D $B2 Box];         ## add function
7 BoxDX D $B2 190;                        ## set argumets of this function
8 BoxDY D $B2 290
9 BoxDZ D $B2 390
10 InitLogBook D;                          ## initialize (clean) internal maps of labels
11 ComputeFun D $F2;                       ## compute the function
12 GetShape D $F2:2 Box2;                  ## check result
13 whatis Box2
14 GetReference D $B2
15
16 #2 Create Cylinder
17 NewCommand D
18 explode Box2 F
19 explode Box2_1 E
20 set Sel1 [AttachShape D Box2_1_1 ${B2} ${B2} 1]; ## set attachment
21 ## AddDriver D Attach Cyl
22 set Cyl [AddCyl D 70 275 ${Sel1}]
23 ComputeFun D $Cyl:1
24 GetShape D $Cyl:1:2 CylS
25
26 #3 Transalte Cylinder
27 NewCommand D
28 set FTr1 [PTranslateDXYZ D $Cyl 100 0 0]
29 ComputeFun D $FTr1
30 GetShape D $Cyl:2:2 CylS
31
32 #4 Cut Box Cylinder
33 NewCommand D
34 set CS [AddCut D $B2 $Cyl]
35 ComputeFun D $CS
36 erase
37 GetShape D $CS:2 S
38 don S
39 NewCommand D
40
41 #5 test Naming
42 set SL [TestSingleSelection D $B2 0]
43 # 28 selections fail  (total 124 selections)
44 # it seems gives FilterByNeighbours gives Compound  (edges:  2*2, vertexes: 4, but duplicated -4*2 + 2*2 + 4*2 + 2*2 => 24)
45 # Naming should be corrected to process the case : to be returned Compound without failure!)
46
47 #6 Modification
48 NewCommand D
49 BoxDX D $B2 220
50
51 #7 recompute
52 NewCommand D
53 InitLogBook D
54 ComputeFun D $F2
55 ComputeFun D $Sel1:1
56 ComputeFun D $Cyl:1
57 ComputeFun D $FTr1
58 ComputeFun D $CS
59 erase
60 GetShape D $CS:2 S
61 don S
62 SolveFlatFrom D $SL
63 NewCommand D
64
65