4031c2f6d644ebb2a353ce11b06fa4afdcbe4498
[occt.git] / tests / bugs / modalg_6 / bug28030
1 puts "========"
2 puts "OCC28030"
3 puts "========"
4 puts ""
5 ########################################################################################################
6 # Algorith GeomLib_CheckCurveOnSurface takes too much time for Bspline curves with big number of knots
7 ########################################################################################################
8
9 beziercurve c 4 0 0 0 1 1 0 2 1 0 3 0 0
10
11 convert c1 c
12 set i 1
13 repeat 98 {insertknot c1 0.01*$i 1; incr i 1}
14 mkedge e1 c1
15 prism p1 e1 0 0 1
16 explode p1 e
17 dchrono cpu reset
18 dchrono cpu start
19 xdistef p1_3 p1
20 dchrono cpu stop
21 puts [dchrono cpu show]
22 set q1 [dchrono cpu show]
23 regexp {CPU user time: ([-0-9.+eE]+) seconds} ${q1} full t1
24
25 convert c2 c
26 set i 1
27 repeat 1000 {insertknot c2 0.00098*$i 1; incr i 1}
28 mkedge e2 c2
29 prism p2 e2 0 0 1
30 explode p2 e
31 dchrono cpu reset
32 dchrono cpu start
33 xdistef p2_3 p2
34 dchrono cpu stop
35 puts [dchrono cpu show]
36 set q2 [dchrono cpu show]
37 regexp {CPU user time: ([-0-9.+eE]+) seconds} ${q2} full t2
38
39 set max_ratio 5
40 if { ${t2} > ${max_ratio}*${t1} } {
41   puts "Elapsed time is too much - Faulty"
42 } else {
43   puts "Elapsed time is OK"
44 }