0026106: BRepMesh - revision of data model
[occt.git] / tests / bugs / vis / bug26199
CommitLineData
385c43e7 1puts "=========="
2puts "OCC26199"
3puts "=========="
4puts ""
5############################################################
6# Visualization - use NCollection_IndexedMap instead of NCollection_Sequence in OpenGl_BVHClipPrimitiveSet to improve performance
7############################################################
8
9psphere s 0.5
10tclean s
11incmesh s 0.1
12trinfo s
13
14vinit View1
15vclear
16vaxo
17vsetdispmode 1
18
19vdefaults -defl 1.0 -autoTriang off
20# Warning, unknown argument '-DEFL'
21
22vdisplay s
23
24set aNb1 100
25
26# display 100x100 connected instances of single presentation
27puts "Creating [expr $aNb1*$aNb1] instances..."
28set t1 [time {for {set i 0} {$i < $aNb1} {incr i} {for {set j 0} {$j < $aNb1} {incr j} {vconnectto s_${i}_${j} ${i} ${j} 0 s -noupdate}}}]
29
30# the following command is slow
31set t2 [time {vclear}]
32
33set d1 [lindex $t1 0]
34puts "vconnectto done in $d1 microseconds!\n"
35
36set d2 [lindex $t2 0]
37puts "vclear done in $d2 microseconds!\n"
38
39set t1_sec [expr $d1 * 1.e-6]
40set t2_sec [expr $d2 * 1.e-6]
41
42if { [regexp {Debug mode} [dversion]] } {
43 if { [regexp {Windows} [dversion]] } {
44 set max_time_vconnectto 5
45 set max_time_vclear 5
46 } else {
47 set max_time_vconnectto 5
48 set max_time_vclear 5
49 }
50} else {
51 if { [regexp {Windows} [dversion]] } {
52 set max_time_vconnectto 1
53 set max_time_vclear 1
54 } else {
55 set max_time_vconnectto 1
56 set max_time_vclear 1
57 }
58}
59
60if { ${t1_sec} > ${max_time_vconnectto} } {
61 puts "Elapsed time of vconnectto is more than ${max_time_vconnectto} seconds - Error"
62} else {
63 puts "Elapsed time of vconnectto is less than ${max_time_vconnectto} seconds - OK"
64}
65
66if { ${t2_sec} > ${max_time_vclear} } {
67 puts "Elapsed time of vclear is more than ${max_time_vclear} seconds - Error"
68} else {
69 puts "Elapsed time of vclear is less than ${max_time_vclear} seconds - OK"
70}