0014531: Boolean Operation Algorithm fails
[occt.git] / tests / bugs / modalg_6 / bug26310_1
1 puts "========"
2 puts "OCC26310"
3 puts "========"
4 puts ""
5 #################################################
6 # Very slow boolean cut operations on cylinders
7 #################################################
8
9 if { [regexp {Debug mode} [dversion]] } {
10     set max_time 0.3
11 } else {
12     set max_time 0.15
13 }
14
15 set maxToler 1.5e-5
16
17 restore [locate_data_file OCC26310-b1.brep] b1 
18 restore [locate_data_file OCC26310-b2.brep] b2 
19
20 explode b1 f
21 explode b2 f
22
23 dchrono cr reset
24 dchrono cr start
25 set log1 [bopcurves b1_1 b2_1 -2d]
26 dchrono cr stop
27
28 regexp {Tolerance Reached=+([-0-9.+eE]+)} ${log1} full Toler
29
30 puts "TolReached = $Toler"
31
32 if { $Toler > $maxToler } {
33   puts "Error: Tolerance is too big ($Toler > $maxToler)"
34 }
35
36 set log2 [dchrono cr show]
37
38 regexp {CPU user time: ([-0-9.+eE]+) seconds} $log2 full sec
39
40 if { $sec > ${max_time} } {
41     puts "Error: CPU user time is more than ${max_time} seconds"
42 } else {
43     puts "OK: CPU user time is less than ${max_time} seconds"
44 }