1907fb9a |
1 | puts "========" |
2 | puts "OCC27131" |
3 | puts "========" |
4 | puts "" |
5 | ############################################## |
6 | # DistShapeShape works slow on attached shapes |
7 | ############################################## |
8 | restore [locate_data_file bug27131.brep] aShape |
9 | explode aShape |
10 | |
11 | cpulimit 20 |
12 | |
13 | # Check computation time |
14 | chrono h reset; chrono h start |
15 | for { set i 1 } { $i <= 100 } { incr i } { |
16 | distmini d aShape_1 aShape_2 |
17 | } |
18 | chrono h stop; chrono h show |
19 | |
20 | regexp {CPU user time: (\d*)} [dchrono h show] dummy sec |
21 | if {$sec > 1} { |
22 | puts "Error: too long computation time $sec seconds" |
23 | } else { |
24 | puts "Computation time is OK" |
25 | } |
26 | |
27 | # Check result of distance distance |
28 | set absTol 1.0e-10 |
29 | set relTol 0.001 |
30 | set aDist_Exp 0.0029087110153708622 |
31 | set aDist [dval d_val] |
32 | checkreal "Distance value check" $aDist $aDist_Exp $absTol $relTol |