Restoring test cases removed by last commit.
[occt.git] / tests / bugs / moddata / bug9_1
CommitLineData
0e94a94e 1puts "TODO OCC12345 ALL: Faulty OCC9"
2
3puts "================"
4puts "OCC9"
5puts "================"
6puts ""
7
8pload QAcommands
9restore [locate_data_file OCC9-path.draw] d
10############### checkshape d # is not a topological shape
11restore [locate_data_file OCC9-cur1.draw] b
12############### checkshape b # is not a topological shape
13restore [locate_data_file OCC9-cur2.draw] c
14############### checkshape c # is not a topological shape
15
16## compute radius
17cvalue b 0 x y z
18cvalue b 0 P0
19vertex V [dval x] [dval y] [dval z]
20
21mkedge E d
22distmini dm V E
23
24## make pipe
25OCC9 res d b c [dval dm_val]
26
27## check parametrization
28
29# puts "Path 0: [dval x] [dval y] [dval z]"
30
31# cvalue b 1 x y z
32# cvalue b 1 P1
33# puts "Path 1: [dval x] [dval y] [dval z]"
34
35# svalue res 0 0 x y z
36# svalue res 0 0 S0
37# puts "Surf 0 0: [dval x] [dval y] [dval z]"
38
39# svalue res 0 1 x y z
40# svalue res 0 1 S1
41# puts "Surf 0 1: [dval x] [dval y] [dval z]"
42
43set n 1
44set sum 0
45for {set i -470} {$i < 240} {incr i 25} {
46# cvalue d $i "P$n"
47# svalue res 0 $i "S$n"
48# puts "donly res P$n S$n"
49 incr n
50 # puts "n = $n i = $i"
51
52 ####cvalue d $i x y z
53 cvalue b $i x y z
54 svalue res 0 $i xs ys zs
55 set dist [expr sqrt (\
56 ( [dval x ] - [dval xs ] ) * ( [dval x ] - [dval xs ] )\
57 + ( [dval y ] - [dval ys ] ) * ( [dval y ] - [dval ys ] )\
58 + ( [dval z ] - [dval zs ] ) * ( [dval z ] - [dval zs ] )\
59 ) ]
60 set sum [expr $sum + $dist ]
61 puts "1-st Dist at $i : $dist"
62
63 ####cvalue d $i x y z
64 cvalue c $i x y z
65 ####svalue res 0 $i xs ys zs
66 svalue res 1 $i xs ys zs
67 set dist [expr sqrt (\
68 ( [dval x ] - [dval xs ] ) * ( [dval x ] - [dval xs ] )\
69 + ( [dval y ] - [dval ys ] ) * ( [dval y ] - [dval ys ] )\
70 + ( [dval z ] - [dval zs ] ) * ( [dval z ] - [dval zs ] )\
71 ) ]
72 set sum [expr $sum + $dist ]
73 puts "2-nd Dist at $i : $dist"
74
75}
76####puts "\n Avg dist on $n intervals: [expr $sum / $n ]"
77set Avg_dist [expr $sum / (2 * $n) ]
78puts "\n Avg dist on $n intervals: ${Avg_dist}"
79
80set check_dist [dval dm_val]
81puts "\n check_dist = ${check_dist}"
82if { ${Avg_dist} > ${check_dist} } {
83 puts "\n Faulty OCC9"
84} else {
85 puts "\n OCC9: OK"
86}
87
88set 2dviewer 0