5364d515ec8c4f88a6443e9f1ab60c813b577668
[occt.git] / tests / bugs / modalg_1 / bug10160_12
1 puts "============"
2 puts "OCC10160"
3 puts "============"
4 puts ""
5 #######################################################################
6 # BOP perfomance improvemen
7 #######################################################################
8
9 set BugNumber OCC10160
10
11 restore [locate_data_file OCC10160-2.brep] b1 
12 restore [locate_data_file OCC10160-3.brep] b2 
13
14 set NbTests 3
15
16 puts "Prepare boolean operation ..."
17 dchrono h0 reset; dchrono h0 start
18 bop b1 b2
19 dchrono h0 stop; set CPU_time0_List [dchrono h0 show]
20 regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
21 puts "CPU_user_time0=${CPU_user_time0}"
22
23 puts "Start boolean operation ..."
24 dchrono h reset; dchrono h start
25 #
26 # BOOLEAN OPERATION ----- START
27 #
28 for {set i 1} {$i <= ${NbTests}} {incr i} {
29    boptuc result
30 }
31 #
32 # BOOLEAN OPERATION ----- FINISH
33 #
34 dchrono h stop; set CPU_time_List [dchrono h show]
35 regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
36 puts "Finish boolean operation ..."
37 puts "CPU_user_time=${CPU_user_time}"
38 set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
39 puts "CPU_user_time=${CPU_user_time}"
40
41 checkprops result -s 6.38359e+06 
42 checkshape result
43
44 # Analysis of "nbshapes res"
45 checknbshapes result -vertex 108 -edge 161 -wire 61 -face 60 -shell 3 -solid 3 -compsolid 0 -compound 1 -shape 397
46 checkview -display result -2d -path ${imagedir}/${test_image}.png