2 if { [isdraw result] } {
3 regexp {Mass +: +([-0-9.+eE]+)} [vprops s] full sm
4 regexp {Mass +: +([-0-9.+eE]+)} [vprops result] full m
6 #check if result is valid
7 puts [checkshape result]
8 if { $m == 0 || $sm == $m } {
9 puts "Error : The offset is not valid. The volume is $m."
12 #check of face's square value
13 foreach ResultFace [ explode result f ] {
14 regexp {Mass +: +([-0-9.+eE]+)} [sprops $ResultFace] full fmass
16 puts "Error : Square of face $ResultFace of result shape is negative."
20 if { [info exists GlobFaces] && [llength $GlobFaces] == 0 } {
21 puts [ bsection re $result $s ]
22 if { [ isdraw re ] } {
23 regexp {Mass +: +([-0-9.+eE]+)} [lprops $re] full remass
25 puts "Error: bsection of result and s is not equal zero."
31 puts "The expected volume is $volume"
33 #check of change of volume is < 1%
34 if { ($volume > 0 && [expr abs($volume - $m)/$volume] > 0.01) || ($volume == 0 && $m != 0 && $sm != $m) } {
35 puts "Error : The volume of result shape is $m"
42 xwd $imagedir/${test_image}.gif
45 puts "Error : The offset can not be build."
48 # to end a test script