3bea4c16 |
1 | puts "TODO OCC11111 ALL: TEST INCOMPLETE" |
2 | |
3 | cpulimit 30 |
4 | |
5 | puts "============" |
6 | puts "OCC22759" |
7 | puts "============" |
8 | puts "" |
9 | ####################################################################### |
10 | # Crash during shape visualization |
11 | ####################################################################### |
12 | |
13 | set BugNumber OCC22759 |
14 | |
15 | catch { pload XDE } |
16 | |
17 | restore [locate_data_file OCC22759-weldt6.brep] result |
18 | checkshape result |
19 | tclean result |
20 | |
21 | set Deflection 0.001 |
22 | incmesh result ${Deflection} |
23 | |
24 | set tri_info [trinfo result] |
25 | regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri |
26 | regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod |
27 | |
28 | regexp {deflection +([-0-9.+eE]+)} $tri_info full defl |
29 | |
30 | set os "ALL" |
31 | if {[array get env os_type] != ""} { |
32 | set os $env(os_type) |
33 | } |
34 | |
35 | if { [regexp {Windows} $os ] } { |
36 | puts "OS = Windows NT" |
37 | set good_tri 248672 |
38 | set good_nod 127078 |
39 | set good_defl 0.0028424483708953232 |
40 | } else { |
41 | puts "OS = Linux" |
42 | set good_tri 248724 |
43 | set good_nod 127104 |
44 | set good_defl 0.0028424483709341111 |
45 | } |
46 | |
47 | proc GetPercent {Value GoodValue} { |
48 | set Percent 0. |
49 | if {${GoodValue} != 0.} { |
50 | set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.] |
51 | } elseif {${Value} != 0.} { |
52 | set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.] |
53 | } else { |
54 | set Percent 0. |
55 | } |
56 | return ${Percent} |
57 | } |
58 | |
59 | set percent_max 0.1 |
60 | set status 0 |
61 | |
62 | set triangle_percent [GetPercent ${tri} ${good_tri}] |
63 | puts "triangle_percent = ${triangle_percent}" |
64 | if { ${triangle_percent} > ${percent_max} } { |
65 | puts "triangle: Faulty ${BugNumber}" |
66 | set status 1 |
67 | } else { |
68 | puts "triangle: OK ${BugNumber}" |
69 | } |
70 | |
71 | set node_percent [GetPercent ${nod} ${good_nod}] |
72 | puts "node_percent = ${node_percent}" |
73 | if { ${node_percent} > ${percent_max} } { |
74 | puts "node: Faulty ${BugNumber}" |
75 | set status 1 |
76 | } else { |
77 | puts "node: OK ${BugNumber}" |
78 | } |
79 | |
80 | set deflection_percent [GetPercent ${defl} ${good_defl}] |
81 | puts "deflection_percent = ${deflection_percent}" |
82 | if { ${deflection_percent} > ${percent_max} } { |
83 | puts "deflection: Faulty ${BugNumber}" |
84 | set status 1 |
85 | } else { |
86 | puts "deflection: OK ${BugNumber}" |
87 | } |
88 | |
89 | # Resume |
90 | puts "" |
91 | if { ${status} != 0 } { |
92 | puts "Faulty ${BugNumber}" |
93 | } else { |
94 | puts "OK ${BugNumber}" |
95 | } |
96 | |
97 | vinit |
98 | vdisplay result |
99 | vfit |
100 | |
101 | vsetdispmode 1 |
102 | |
103 | set only_screen 1 |
104 | set square 0 |