004e8466 |
1 | puts "==========" |
2 | puts "OCC24899" |
3 | puts "==========" |
4 | puts "" |
5 | ################################################################################################## |
6 | # Time of computation of intersection points with help of class BRepIntCurveSurface_Inter is big |
7 | ################################################################################################## |
8 | |
9 | polyline l -10 1 1 80 1 1 |
10 | explode l e |
11 | |
12 | restore [locate_data_file bug24899_TheHull.brep] h1 |
13 | mkcurve c1 l_1 |
14 | BRepIntCS c1 h1 r |
15 | distmini dd l_1 h1 |
16 | |
17 | dchrono t1 reset |
18 | dchrono t1 start |
19 | |
20 | for { set i 0} { $i <= 100 } {incr i} { |
21 | BRepIntCS c1 h1 r |
22 | } |
23 | |
24 | dchrono t1 stop |
25 | set time1 [dchrono t1 show] |
26 | regexp {CPU user time: ([-0-9.+eE]+) seconds} $time1 full timeint |
27 | puts "Time performing BRepIntCurveSurface = $timeint" |
28 | |
29 | dchrono t2 reset |
30 | dchrono t2 start |
31 | for { set j 0} { $j <= 100 } {incr j} { |
32 | distmini dd l_1 h1 |
33 | } |
34 | |
35 | dchrono t2 stop |
36 | set time2 [dchrono t2 show] |
37 | regexp {CPU user time: ([-0-9.+eE]+) seconds} $time2 full timeextr |
38 | puts "Time performing BRepExtrema_DistShapeShape = $timeextr" |
39 | |
40 | if { $timeint > 2 * $timeextr } { |
41 | puts "Error : Time of intersection of curve with shell is more than two time from BRepExtrema" |
42 | } else { |
43 | puts "OK: Time is good" |
44 | } |