40093367 |
1 | if { [isdraw result] } { |
2 | regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m |
3 | |
4 | #check if result is valid |
5 | set ch [checkshape result] |
6 | puts $ch |
7 | if { $m == 0 } { |
8 | puts "Error : The depouille is not valid. The square is 0." |
9 | } |
10 | |
11 | if { $square > 0 } { |
12 | puts "The expected square is $square" |
13 | } |
14 | #check of change of square is < 1% |
49c093ae |
15 | if { ($square != 0 && [expr 1.*abs($square - $m)/$square] > 0.01) || ($square == 0 && $m != 0) } { |
16 | puts "Error : The square of result shape is $m" |
40093367 |
17 | } |
18 | if { [string compare $ch "This shape seems to be valid"] == 0 } { |
19 | #check if tolerance is less 1. |
20 | set tol 10. |
21 | if { [regexp {Face +:.+Max +([-0-9.+eE]+)} [maxtolerance result] full tol] == 0 } { |
22 | #Avoiding maxtolerance bug on Windows |
23 | if { [array get Draw_Groups "Shape Healing"] == "" } { |
24 | pload XSDRAW |
25 | } |
26 | regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance result] full tol |
27 | } |
28 | if { $tol > 1. } { |
29 | puts "Error: The tolerance of result shape is too big ($tol)." |
30 | } |
31 | } |
32 | |
33 | if { $m > 0 } { |
34 | clear |
35 | smallview |
36 | donly result |
37 | fit |
88f8fc81 |
38 | xwd $imagedir/${test_image}.png |
40093367 |
39 | } |
40 | } else { |
41 | puts "Error : The depouille can not be build." |
42 | } |
43 | |
44 | # to end a test script |
45 | puts "TEST COMPLETED" |