0027555: Visualization, AIS_Shape - own deviation coefficient change is not considere...
[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 }
5747059b 42 checkview -display result -2d -path ${imagedir}/${test_image}.png
40093367 43} else {
94a57f1f 44 puts "Error : The mkface can not be built."
40093367 45}
46
47# to end a test script
48puts "TEST COMPLETED"