0025624: Visualization - selection is incorrect in perspective mode in a specific...
[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 } {
94a57f1f 15 puts "Error : The resulting shape is WRONG. MAX tolerance of a FACE should be equal to $MaxFTol instead of $maxf"
40093367 16 } elseif { $MaxFTol == 0 && $maxf != 0 } {
94a57f1f 17 puts "Error : The resulting shape is WRONG."
40093367 18 } else {
94a57f1f 19 puts "MAX tolerance of a FACE of the resulting shape is equal to $maxf"
40093367 20 }
21 }
22
23 if { [info exists MaxETol ] } {
49c093ae 24 if { $MaxETol != 0 && $maxe > $MaxETol && [expr 1.*abs($MaxETol - $maxe)/$MaxETol] > 0.01 } {
94a57f1f 25 puts "Error : The resulting shape is WRONG. MAX tolerance of an EDGE should be equal to $MaxETol instead of $maxe"
40093367 26 } elseif { $MaxETol == 0 && $maxe != 0 } {
94a57f1f 27 puts "Error : The resulting shape is WRONG."
40093367 28 } else {
94a57f1f 29 puts "MAX tolerance of an EDGE of the resulting shape is equal to $maxe"
40093367 30 }
31 }
32
33 if { [info exists MaxVTol ] } {
49c093ae 34 if { $MaxVTol != 0 && $maxv > $MaxVTol && [expr 1.*abs($MaxVTol - $maxv)/$MaxVTol] > 0.01 } {
94a57f1f 35 puts "Error : The resulting shape is WRONG. MAX tolerance of VERTEX should be equal to $MaxVTol instead of $maxv"
40093367 36 } elseif { $MaxVTol == 0 && $maxv != 0 } {
94a57f1f 37 puts "Error : The resulting shape is WRONG."
40093367 38 } else {
94a57f1f 39 puts "MAX tolerance of a VERTEX of the resulting shape is equal to $maxv"
40093367 40 }
41 }
42
43 smallview
44 clear
45 donly result
46 fit
88f8fc81 47 xwd $imagedir/${test_image}.png
40093367 48
49} else {
94a57f1f 50 puts "Error : The mkface can not be built."
40093367 51}
52
53# to end a test script
54puts "TEST COMPLETED"