3bea4c16 |
1 | puts "TODO OCC11111 ALL: Faulty OCC21122" |
2 | |
3 | puts "============" |
4 | puts "OCC21122" |
5 | puts "============" |
6 | puts "" |
7 | ####################################################################### |
8 | # Incremental mesh error |
9 | ####################################################################### |
10 | |
11 | set BugNumber OCC21122 |
12 | |
13 | restore [locate_data_file OCC21122.brep] result |
14 | |
15 | tclean result |
16 | |
17 | set Deflection 0.1 |
18 | catch {incmesh result ${Deflection} } |
19 | |
20 | set tri_info [trinfo result] |
21 | regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri |
22 | regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod |
23 | regexp {Maximal deflection +([-0-9.+eE]+)} $tri_info full defl |
24 | |
25 | |
26 | if { [string compare $tcl_platform(platform) "windows"] == 0 } { |
27 | set good_tri 4322 |
28 | set good_nod 4324 |
29 | set good_defl 8.8817872205847652e-16 |
30 | puts "OS = Windows NT" |
31 | } else { |
32 | puts "OS = Linux" |
33 | set good_tri 4322 |
34 | set good_nod 4324 |
35 | set good_defl 8.8817872205847652e-16 |
36 | } |
37 | |
38 | proc GetPercent {Value GoodValue} { |
39 | set Percent 0. |
40 | if {${GoodValue} != 0.} { |
41 | set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.] |
42 | } elseif {${Value} != 0.} { |
43 | set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.] |
44 | } else { |
45 | set Percent 0. |
46 | } |
47 | return ${Percent} |
48 | } |
49 | |
50 | set percent_max 0.1 |
51 | set status 0 |
52 | |
53 | set triangle_percent [GetPercent ${tri} ${good_tri}] |
54 | puts "triangle_percent = ${triangle_percent}" |
55 | if { ${triangle_percent} > ${percent_max} } { |
56 | puts "triangle: Faulty ${BugNumber}" |
57 | set status 1 |
58 | } else { |
59 | puts "triangle: OK ${BugNumber}" |
60 | } |
61 | |
62 | set node_percent [GetPercent ${nod} ${good_nod}] |
63 | puts "node_percent = ${node_percent}" |
64 | if { ${node_percent} > ${percent_max} } { |
65 | puts "node: Faulty ${BugNumber}" |
66 | set status 1 |
67 | } else { |
68 | puts "node: OK ${BugNumber}" |
69 | } |
70 | |
71 | set deflection_percent [GetPercent ${defl} ${good_defl}] |
72 | puts "deflection_percent = ${deflection_percent}" |
73 | if { ${deflection_percent} > ${percent_max} } { |
74 | puts "deflection: Faulty ${BugNumber}" |
75 | set status 1 |
76 | } else { |
77 | puts "deflection: OK ${BugNumber}" |
78 | } |
79 | |
80 | set square 275.426 |
81 | |
a4eba920 |
82 | checknbshapes result -vertex 964 -edge 964 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 1931 |
3bea4c16 |
83 | if { ${status} != 0 } { |
84 | puts "Faulty ${BugNumber}" |
85 | } else { |
86 | puts "OK ${BugNumber}" |
87 | } |
88 | |
89 | vinit |
90 | vdisplay result |
91 | vsetdispmode 1 |
92 | vfit |
93 | |
94 | set only_screen 1 |
95 | |