File: bug26199

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (70 lines) | stat: -rw-r--r-- 1,918 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
puts "=========="
puts "OCC26199"
puts "=========="
puts ""
############################################################
# Visualization - use NCollection_IndexedMap instead of NCollection_Sequence in OpenGl_BVHClipPrimitiveSet to improve performance
############################################################

psphere s 0.5
tclean  s
incmesh s 0.1
trinfo  s

vinit View1
vclear
vaxo
vsetdispmode 1

vdefaults -defl 1.0 -autoTriang off
# Warning, unknown argument '-DEFL'

vdisplay s

set aNb1 100

# display 100x100 connected instances of single presentation
puts "Creating [expr $aNb1*$aNb1] instances..."
set 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}}}]

# the following command is slow
set t2 [time {vclear}]

set d1 [lindex $t1 0]
puts "vconnectto done in $d1 microseconds!\n"

set d2 [lindex $t2 0]
puts "vclear done in $d2 microseconds!\n"

set t1_sec [expr $d1 * 1.e-6]
set t2_sec [expr $d2 * 1.e-6]

if { [regexp {Debug mode} [dversion]] } {
  if { [regexp {Windows} [dversion]] } {
    set max_time_vconnectto 5
    set max_time_vclear 5
  } else {
    set max_time_vconnectto 5
    set max_time_vclear 5
  }
} else {
  if { [regexp {Windows} [dversion]] } {
    set max_time_vconnectto 1
    set max_time_vclear 1
  } else {
    set max_time_vconnectto 1
    set max_time_vclear 1
  }
}

if { ${t1_sec} > ${max_time_vconnectto} } {                                         
    puts "Elapsed time of vconnectto is more than ${max_time_vconnectto} seconds - Error"
} else {
    puts "Elapsed time of vconnectto is less than ${max_time_vconnectto} seconds - OK"
}

if { ${t2_sec} > ${max_time_vclear} } {                                         
    puts "Elapsed time of vclear is more than ${max_time_vclear} seconds - Error"
} else {
    puts "Elapsed time of vclear is less than ${max_time_vclear} seconds - OK"
}