0027120: Documentation for check commands
[occt.git] / tests / bugs / moddata_1 / bug15519
CommitLineData
3bea4c16 1puts "TODO OCC12345 ALL: triangle: Faulty OCC15519"
2puts "TODO OCC12345 ALL: node: Faulty OCC15519"
3puts "TODO OCC12345 ALL: deflection: Faulty OCC15519"
4puts "TODO OCC12345 ALL: Faulty OCC15519"
5puts "============"
6puts "OCC15519"
7puts "============"
8puts ""
9#######################################################################
10# Exception while meshing shape
11#######################################################################
12
13set BugNumber OCC15519
14
15proc GetPercent {Value GoodValue} {
16 set Percent 0.
17 if {${GoodValue} != 0.} {
18 set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
19 } elseif {${Value} != 0.} {
20 set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
21 } else {
22 set Percent 0.
23 }
24 return ${Percent}
25}
26
27restore [locate_data_file OCC15519.brep] result
28tclean result
29
30set Deflection 1.
31catch {incmesh result ${Deflection} }
32
33set InfoList [trinfo result]
34regexp { +([-0-9.+eE]+) +triangles} $InfoList full tri
35regexp { +([-0-9.+eE]+) +nodes} $InfoList full nod
36regexp {Maximal deflection +([-0-9.+eE]+)} $InfoList full defl
37
38if { [string compare $tcl_platform(platform) "windows"] == 0 } {
39 set good_tri 96265
40 set good_nod 71339
41 set good_defl 27.956052399907215
42} else {
43 set good_tri 95582
44 set good_nod 70796
45 set good_defl 0.99827404224216676
46}
47
48set percent_max 0.1
49set status 0
50
51set triangle_percent [GetPercent ${tri} ${good_tri}]
52puts "triangle_percent = ${triangle_percent}"
53if { ${triangle_percent} > ${percent_max} } {
54 puts "triangle: Faulty ${BugNumber}"
55 set status 1
56} else {
57 puts "triangle: OK ${BugNumber}"
58}
59
60set node_percent [GetPercent ${nod} ${good_nod}]
61puts "node_percent = ${node_percent}"
62if { ${node_percent} > ${percent_max} } {
63 puts "node: Faulty ${BugNumber}"
64 set status 1
65} else {
66 puts "node: OK ${BugNumber}"
67}
68
69set deflection_percent [GetPercent ${defl} ${good_defl}]
70puts "deflection_percent = ${deflection_percent}"
71if { ${deflection_percent} > ${percent_max} } {
72 puts "deflection: Faulty ${BugNumber}"
73 set status 1
74} else {
75 puts "deflection: OK ${BugNumber}"
76}
77
78# Resume
79puts ""
80if { ${status} != 0 } {
81 puts "Faulty ${BugNumber}"
82} else {
83 puts "OK ${BugNumber}"
84}
85
5747059b 86checkview -display result -2d -path ${imagedir}/${test_image}.png