0032652: Visualization - Select3D_SensitiveCylinder returns wrong 3D point on transfo...
[occt.git] / tests / vselect / sphere / check_depth
1 puts "================================="
2 puts "0032182: Visualization - add Select3D_SensitiveSphere"
3 puts "Tests depth value returned by Select3D_SenstiveSphere"
4 puts "================================="
5
6 pload MODELING VISUALIZATION
7 vinit View1 -height 400 -width 600
8
9 psphere s 1
10 vdisplay -dispMode 1 s
11 vfit
12 vtop
13 set top [vmoveto 300 200]
14 if { ![string match "*Select3D_SensitiveSphere*" [vstate -entities]] } { puts "Error: sphere should be detected" }
15 checkpoint top_p $top {0.0013453695513163666 -0.0090115971854718303 0.99995849333074871} 0.0001
16 vbottom
17 set bottom [vmoveto 300 200]
18 if { ![string match "*Select3D_SensitiveSphere*" [vstate -entities]] } { puts "Error: sphere should be detected" }
19 checkpoint bottom_p $bottom {0.0013453695513163666 0.0090115971854718303 -0.99995849333074871} 0.0001
20 vright
21 set right [vmoveto 300 200]
22 if { ![string match "*Select3D_SensitiveSphere*" [vstate -entities]] } { puts "Error: sphere should be detected" }
23 checkpoint right_p $right {0.99995849333074871 0.0013453695513163666 -0.0090115971854718268} 0.0001
24 vfront
25 set front [vmoveto 300 200]
26 if { ![string match "*Select3D_SensitiveSphere*" [vstate -entities]] } { puts "Error: sphere should be detected" }
27 checkpoint front_p $front {0.0013453695513163666 -0.99995832904743187 -0.0090115971854718285} 0.01
28 vleft
29 set left [vmoveto 300 200]
30 if { ![string match "*Select3D_SensitiveSphere*" [vstate -entities]] } { puts "Error: sphere should be detected" }
31 checkpoint left_p $left {-0.99995817565020639 -0.0013453695513163666 -0.0090115971854718268} 0.0001