0023570: Command param in DRAW outputs non-readable symbols
[occt.git] / tests / bugs / xde / bug445
1 puts "========"
2 puts "OCC445"
3 puts "========"
4 puts ""
5
6 restore [locate_data_file OCC501.brep] a
7
8 fixshape result a 1e-7
9
10 checkshape result
11 set volume 477547
12
13 set prop "volume"
14 set mass $volume
15 regexp {Mass +: +([-0-9.+eE]+)} [vprops result] full m
16
17 if { [string compare "$mass" "empty"] != 0 } {
18    if { $m == 0 } {
19       puts "Error : The command is not valid. The $prop is 0."
20    }
21    if { $mass > 0 } {
22       puts "The expected $prop is $mass"
23    }
24    #check of change of volume is < 1%
25    if { ($mass != 0 && [expr 1.*abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } {
26       puts "Error : The $prop of result shape is $m"
27    }
28 } else {
29   if { $m != 0 } {
30      puts "Error : The command is not valid. The $prop is $m"
31   }
32 }
33
34 set 2dviewer 0
35