93e650b891245d808668580b40cad76d44fe2081
[occt.git] / tests / pipe / end
1 if { [isdraw result] } {
2    regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m
3
4    #check if result is valid
5    puts [checkshape result]
6    if { $m == 0 } {
7       puts "Error: The pipe is invalid. The square is 0."
8    }
9
10    if { $square > 0 } {
11       puts "The expected square is $square"
12    }
13    #check of change of square is < 1%
14    if { ($square != 0 && [expr abs($square - $m)/$square] > 0.01) || ($square == 0 && $m != 0) } {
15       puts "Error : The square of result shape is $m"
16    }
17    if { $m > 0 } {
18       clear
19       smallview
20       donly result
21       fit
22       xwd $imagedir/${test_image}.gif
23    } 
24 } else {
25    puts "Error : The pipe can not be build."
26 }
27
28 # to end a test script
29 puts "TEST COMPLETED"