Integration part of tests of grid chl
[occt.git] / tests / bugs / moddata / bug9_2
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
25set tolerance 0.0001
26OCC9 res d b c [dval dm_val] ${tolerance}
27
28## check parametrization
29
30# puts "Path 0: [dval x] [dval y] [dval z]"
31
32# cvalue b 1 x y z
33# cvalue b 1 P1
34# puts "Path 1: [dval x] [dval y] [dval z]"
35
36# svalue res 0 0 x y z
37# svalue res 0 0 S0
38# puts "Surf 0 0: [dval x] [dval y] [dval z]"
39
40# svalue res 0 1 x y z
41# svalue res 0 1 S1
42# puts "Surf 0 1: [dval x] [dval y] [dval z]"
43
44set n 1
45set sum 0
46for {set i -470} {$i < 240} {incr i 25} {
47# cvalue d $i "P$n"
48# svalue res 0 $i "S$n"
49# puts "donly res P$n S$n"
50 incr n
51 # puts "n = $n i = $i"
52
53 ####cvalue d $i x y z
54 cvalue b $i x y z
55 svalue res 0 $i xs ys zs
56 set dist [expr sqrt (\
57 ( [dval x ] - [dval xs ] ) * ( [dval x ] - [dval xs ] )\
58 + ( [dval y ] - [dval ys ] ) * ( [dval y ] - [dval ys ] )\
59 + ( [dval z ] - [dval zs ] ) * ( [dval z ] - [dval zs ] )\
60 ) ]
61 set sum [expr $sum + $dist ]
62 puts "1-st Dist at $i : $dist"
63
64 ####cvalue d $i x y z
65 cvalue c $i x y z
66 ####svalue res 0 $i xs ys zs
67 svalue res 1 $i xs ys zs
68 set dist [expr sqrt (\
69 ( [dval x ] - [dval xs ] ) * ( [dval x ] - [dval xs ] )\
70 + ( [dval y ] - [dval ys ] ) * ( [dval y ] - [dval ys ] )\
71 + ( [dval z ] - [dval zs ] ) * ( [dval z ] - [dval zs ] )\
72 ) ]
73 set sum [expr $sum + $dist ]
74 puts "2-nd Dist at $i : $dist"
75
76}
77####puts "\n Avg dist on $n intervals: [expr $sum / $n ]"
78set Avg_dist [expr $sum / (2 * $n) ]
79puts "\n Avg dist on $n intervals: ${Avg_dist}"
80
81set check_dist ${tolerance}
82puts "\n check_dist = ${check_dist}"
83if { ${Avg_dist} > ${check_dist} } {
84 puts "\n Faulty OCC9"
85} else {
86 puts "\n OCC9: OK"
87}
88
89set 2dviewer 0