File: bug22759

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 (100 lines) | stat: -rw-r--r-- 2,316 bytes parent folder | download | duplicates (3)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
puts "TODO ?OCC26339 ALL: TEST INCOMPLETE"

puts "============"
puts "OCC22759"
puts "============"
puts ""
#######################################################################
# Crash during shape visualization
#######################################################################

set BugNumber OCC22759

catch { pload XDE }

cpulimit 400

restore [locate_data_file OCC22759-weldt6.brep] result
checkshape result
tclean result

set Deflection 0.001
incmesh result ${Deflection}

set tri_info [trinfo result]
regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod

regexp {deflection +([-0-9.+eE]+)} $tri_info full defl

set env(os_type) $tcl_platform(platform)
if { [string compare $env(os_type) "windows"] != 0 } {
   puts "OS = Linux"
   set good_tri  520414
   set good_nod  263938
   set good_defl 0.0026800432954056617
} else {
   puts "OS = Windows NT"
   set good_tri  520414
   set good_nod  263938
   set good_defl 0.0026800432954056617
}

proc GetPercent {Value GoodValue} {
    set Percent 0.
    if {${GoodValue} != 0.} {
        set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
    } elseif {${Value} != 0.} {
	set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
    } else {
	set Percent 0.
    }
    return ${Percent}
}

set percent_max 0.1
set status 0

set triangle_percent [GetPercent ${tri} ${good_tri}]
puts "triangle_percent = ${triangle_percent}"
if { ${triangle_percent} > ${percent_max} } {
   puts "triangle: Faulty ${BugNumber}"
   set status 1
} else {
   puts "triangle: OK ${BugNumber}"
}

set node_percent [GetPercent ${nod} ${good_nod}]
puts "node_percent = ${node_percent}"
if { ${node_percent} > ${percent_max} } {
   puts "node: Faulty ${BugNumber}"
   set status 1
} else {
   puts "node: OK ${BugNumber}"
}

set deflection_percent [GetPercent ${defl} ${good_defl}]
puts "deflection_percent = ${deflection_percent}"
if { ${deflection_percent} > ${percent_max} } {
   puts "deflection: Faulty ${BugNumber}"
   set status 1
} else {
   puts "deflection: OK ${BugNumber}"
}

# Resume
puts ""
if { ${status} != 0 } {
   puts "Faulty ${BugNumber}"
} else {
   puts "OK ${BugNumber}"
}

vinit
vdisplay result
vfit

vsetdispmode 1

set only_screen 1
set square 9951.34