0028324: Configuration, genproj.tcl - compilation error while targeting OS X 10.8...
[occt.git] / tests / bugs / fclasses / bug27371
1 puts "========"
2 puts "OCC27371"
3 puts "========"
4 puts ""
5 ##############################################
6 # Regression: BRepExtrema works too much slower in 691 (from 670) 
7 ##############################################
8 restore [locate_data_file bug27371.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   distmini d aShape_2 aShape_1
18 }
19 chrono h stop; chrono h show
20
21 regexp {CPU user time: (\d*)} [dchrono h show] dummy sec
22 if {$sec > 1} {
23   puts "Error: too long computation time $sec seconds"
24 } else {
25   puts "Computation time is OK"
26 }
27
28 # Check result of distance distance
29 set absTol 1.0e-10
30 set relTol 0.001
31 set aDist_Exp 0.2
32 set aDist [dval d_val]
33 checkreal "Distance value check" $aDist $aDist_Exp $absTol $relTol