714c3bfc |
1 | puts "========" |
2 | puts "OCC26980" |
3 | puts "========" |
4 | puts "" |
5 | ################################# |
6 | # Intersection part of Boolean algorithm spends much system time and system memory |
7 | ################################# |
8 | |
9 | set max_time 120 |
10 | set mem_max_wsetpeak 500000000 |
11 | |
12 | |
13 | bclearobjects; |
14 | bcleartools; |
15 | |
16 | restore [locate_data_file bug26980-cmp.brep] cmp |
17 | |
18 | puts [nbshapes cmp -t] |
19 | |
20 | eval baddobjects [explode cmp] |
21 | |
22 | dchrono cr reset |
23 | dchrono cr start |
24 | |
25 | bfillds |
26 | bbuild result |
27 | |
28 | dchrono cr stop |
29 | |
30 | set mem_wsetpeak [meminfo wsetpeak] |
31 | |
32 | if { ${mem_wsetpeak} > ${mem_max_wsetpeak}} { |
33 | puts "Error : there is memory problem (${mem_wsetpeak} MBytes has been allocated)" |
34 | } |
35 | |
36 | set chrono_info [dchrono cr show] |
37 | regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time |
38 | if { $CPU_time > ${max_time} } { |
39 | puts "CPU user time of Boolean operation is more than ${max_time} seconds - Error" |
40 | } else { |
41 | puts "CPU user time of Boolean operation is less than ${max_time} seconds - OK" |
42 | } |
43 | |
44 | set nbshapes_expected " |
45 | VERTEX : 365 |
46 | EDGE : 793 |
47 | WIRE : 531 |
48 | FACE : 531 |
49 | SHELL : 102 |
50 | SOLID : 101 |
51 | COMPSOLID : 0 |
52 | COMPOUND : 1 |
53 | SHAPE : 2424 |
54 | " |
55 | |
56 | checknbshapes result -ref ${nbshapes_expected} -t |
57 | |
58 | smallview |
59 | donly result |
60 | fit |
61 | |
62 | set 2dviewer 1 |