afb27815 |
1 | puts "============" |
2 | puts "OCC26929" |
3 | puts "============" |
4 | puts "" |
5 | ############################################################################################# |
6 | ## Extrema_ECC hang/crash in ShapeSplitter |
7 | ############################################################################################# |
8 | cpulimit 100 |
9 | |
10 | restore [locate_data_file OCC26629-face.brep] aF |
11 | restore [locate_data_file OCC26629-edge.brep] aE |
12 | |
13 | pload MODELING |
14 | |
15 | # Hang check. |
16 | dchrono cr reset |
17 | dchrono cr start |
18 | |
19 | set ss "" |
20 | foreach s [explode aE e] {set ss "$ss aF $s"} |
21 | eval splitshape result aF $ss |
22 | |
23 | dchrono cr stop |
24 | |
25 | set max_time 20.0 |
26 | set log [dchrono cr show] |
27 | regexp {CPU user time: ([-0-9.+eE]+) seconds} $log full z |
28 | |
29 | |
30 | if { $z > ${max_time} } { |
31 | puts "Elapsed time of BRepFeat_SplitShape is more than ${max_time} seconds - Error" |
32 | } else { |
33 | puts "Elapsed time of BRepFeat_SplitShape is less than ${max_time} seconds - OK" |
34 | } |
35 | |
36 | # Check result validity. |
37 | checkshape result |
38 | |
39 | # Visual check. |
40 | set 2dviewer 1 |