0026622: Tests - Avoid using dlog and decho commands in test scripts
[occt.git] / tests / bugs / demo / bug23130
1 puts "============"
2 puts "OCC23130"
3 puts "============"
4 puts ""
5 ###########################################################################
6 # command "maxtolerance" doesn't work on Windows
7 ###########################################################################
8
9 box b 100 100 100
10
11 set info [maxtolerance b]
12
13 regexp {nbFaces:+([-0-9.+eE]+)} $info full nbF
14 regexp {nbEdges:+([-0-9.+eE]+)} $info full nbE
15 regexp {nbVtx:+([-0-9.+eE]+)} $info full nbV
16
17 regexp {Face +: +Min +([-0-9.+eE]+) +Max +([-0-9.+eE]+) } $info full minF maxF 
18 regexp {Edge +: +Min +([-0-9.+eE]+) +Max +([-0-9.+eE]+) } $info full minE maxE 
19 regexp {Vertex +: +Min +([-0-9.+eE]+) +Max +([-0-9.+eE]+) } $info full minV maxV 
20
21 puts "nbF=${nbF}"
22 puts "nbE=${nbE}"
23 puts "nbV=${nbV}"
24
25 puts "minF=${minF}"
26 puts "maxF=${maxF}"
27
28 puts "minE=${minE}"
29 puts "maxE=${maxE}"
30
31 puts "minV=${minV}"
32 puts "maxV=${maxV}"
33
34 if { ${nbF} != 6} {
35   puts "Error: bad value of nbFaces"
36 }
37 #
38 if { ${nbE} != 12} {
39   puts "Error: bad value of nbEdges"
40 }
41 #
42 if { ${nbV} != 8} {
43   puts "Error: bad value of nbVtx"
44 }
45
46 set goodTol 1.00000e-07
47 set tol 1.00000e-07
48
49 if { [expr (abs (${minF} - ${goodTol}) )] > ${tol} } {
50   puts "Error: bad value of minF"
51 }
52 if { [expr (abs (${maxF} - ${goodTol}) )] > ${tol} } {
53   puts "Error: bad value of maxF"
54 }
55 if { [expr (abs (${minE} - ${goodTol}) )] > ${tol} } {
56   puts "Error: bad value of minE"
57 }
58 if { [expr (abs (${maxE} - ${goodTol}) )] > ${tol} } {
59   puts "Error: bad value of maxE"
60 }
61 if { [expr (abs (${minV} - ${goodTol}) )] > ${tol} } {
62   puts "Error: bad value of minV"
63 }
64 if { [expr (abs (${maxV} - ${goodTol}) )] > ${tol} } {
65   puts "Error: bad value of maxV"
66 }