0023450: Test bugs vis CR23407_1 fails
[occt.git] / tests / mkface / end
CommitLineData
40093367 1#set MaxFTol 0
2#set MaxETol 0
3#set MaxVTol 0
4if { [isdraw result] } {
5 #check if result is valid
6 puts [checkshape result]
7 set tolerance [tolerance result]
8 puts $tolerance
9 regexp { *FACE +: +MAX=([-0-9.+eE]+)} $tolerance full maxf
10 regexp { *EDGE +: +MAX=([-0-9.+eE]+)} $tolerance full maxe
11 regexp { *VERTEX +: +MAX=([-0-9.+eE]+)} $tolerance full maxv
12
13 if { [info exists MaxFTol ] } {
49c093ae 14 if { $MaxFTol != 0 && $maxf > $MaxFTol && [expr 1.*abs($MaxFTol - $maxf)/$MaxFTol] > 0.01 } {
40093367 15 puts "Error : Result shape is WRONG. MAX tolerance of FACE should be equal $MaxFTol instead of $maxf"
16 } elseif { $MaxFTol == 0 && $maxf != 0 } {
17 puts "Error : Result shape is WRONG."
18 } else {
19 puts "MAX tolerance of FACE of result shape is equal $maxf"
20 }
21 }
22
23 if { [info exists MaxETol ] } {
49c093ae 24 if { $MaxETol != 0 && $maxe > $MaxETol && [expr 1.*abs($MaxETol - $maxe)/$MaxETol] > 0.01 } {
40093367 25 puts "Error : Result shape is WRONG. MAX tolerance of EDGE should be equal $MaxETol instead of $maxe"
26 } elseif { $MaxETol == 0 && $maxe != 0 } {
27 puts "Error : Result shape is WRONG."
28 } else {
29 puts "MAX tolerance of EDGE of result shape is equal $maxe"
30 }
31 }
32
33 if { [info exists MaxVTol ] } {
49c093ae 34 if { $MaxVTol != 0 && $maxv > $MaxVTol && [expr 1.*abs($MaxVTol - $maxv)/$MaxVTol] > 0.01 } {
40093367 35 puts "Error : Result shape is WRONG. MAX tolerance of VERTEX should be equal $MaxVTol instead of $maxv"
36 } elseif { $MaxVTol == 0 && $maxv != 0 } {
37 puts "Error : Result shape is WRONG."
38 } else {
39 puts "MAX tolerance of VERTEX of result shape is equal $maxv"
40 }
41 }
42
43 smallview
44 clear
45 donly result
46 fit
47 xwd $imagedir/${test_image}.gif
48
49} else {
50 puts "Error : The mkface can not be build."
51}
52
53# to end a test script
54puts "TEST COMPLETED"