0027146: Create command checkplatform
[occt.git] / tests / bugs / modalg_6 / bug26447
... / ...
CommitLineData
1puts "============"
2puts "OCC26447"
3puts "============"
4puts ""
5##############################################################
6# Performance degradation intersecting cylindrical surfaces
7#############################################################
8
9cylinder c1 0 0 0 1 0 0 0 -1 0 100
10cylinder c2 0 0 0 0 1 0 1 0 0 100
11mkface f1 c1
12mkface f2 c2
13
14dchrono cr reset
15dchrono cr start
16
17for {set i 1} {$i <= 1000} {incr i} {
18 bopcurves f1 f2
19}
20
21dchrono cr stop
22if { [checkplatform -windows] } {
23 set max_time 7.5
24} else {
25 set max_time 4.5
26}
27set TimeList [dchrono cr show]
28regexp {Elapsed time: [-0-9.+eE]+ Hours [-0-9.+eE]+ Minutes ([-0-9.+eE]+) Seconds} $TimeList full ElapsedTime_sec
29
30if { ${ElapsedTime_sec} > ${max_time} } {
31 puts "Error: Elapsed time of intersecting is more than ${max_time} seconds"
32} else {
33 puts "OK: Elapsed time of intersecting is less than ${max_time} seconds"
34}