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