File: bug24751_5

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 (59 lines) | stat: -rw-r--r-- 1,232 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
puts "========="
puts "OCC24751"
puts "========="
puts ""
###########################################################
# Performance improvements in the Edge/Edge intersection algorithm
###########################################################

pload QAcommands

if { [regexp {Debug mode} [dversion]] } {
  if { [regexp {Windows} [dversion]] } {
    set max_time 300
  } else {
    set max_time 500
  }
} else {
  if { [regexp {Windows} [dversion]] } {
    set max_time 100
  } else {
    set max_time 150
  }
}

if { [regexp {Mac OS X} [dversion]] } {
  set max_time 270
}

dchrono h reset
dchrono h start

restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx

###------------------####
trotate cx 0 0 0 1 1 1 90
###------------------####

bclearobjects
bcleartools

set edges [explode cx e]
set nbe [llength $edges]
for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i}
bfillds
bbuild result

dchrono h stop
set q [dchrono h show]

regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z
puts "$z"

if { $z > ${max_time} } {                                         
    puts "Elapsed time is more than ${max_time} seconds - Faulty"
} else {
    puts "Elapsed time is less than ${max_time} seconds - OK"
}

set 2dviewer 1