0032390: Visualization, SelectMgr_FrustumBuilder - use camera instead of duplicated...
[occt.git] / tests / vselect / axis / A1
1 puts "========"
2 puts "0032338: Visualization - provide straightforward interface for ray-picking"
3 puts "========"
4 puts ""
5
6 pload MODELING VISUALIZATION
7 psphere s 2
8 box b -min -1 -1 2 -max 1 1 4
9 vclear
10 vinit View1
11 vdisplay -dispMode 1 s
12 vsettransparency s 0.5
13 vdisplay -dispMode 1 b
14 vsettransparency b 0.5
15 vaxis a 1 -2 2 1 2 2
16 vpoint p 0 0 5
17 vdisplay p
18 vaspects p -markerType O
19 vaxo
20 vfit
21 if { [vselaxis -4 0 6 0 0 -1 -display sel_a0] != "There are no any intersections with this axis." } { puts "Error: there should be no any intersections" }
22
23 set pointlist1 [vselaxis 0 0 6 0 0 -1 -display sel_a1 -onlytop 0]
24 regexp {([-0-9.+eE]+ [-0-9.+eE]+ [-0-9.+eE]+)\s([-0-9.+eE]+ [-0-9.+eE]+ [-0-9.+eE]+)\s([-0-9.+eE]+ [-0-9.+eE]+ [-0-9.+eE]+)} ${pointlist1} full p1 p2 p3
25 checkpoint "point1" $p1 {0 0 5} 0.001
26 checkpoint "point2" $p2 {0 0 4} 0.001
27 checkpoint "point3" $p3 {0 0 2} 0.001
28
29 set pointlist2 [vselaxis 1 0 6 0 0 -1 -display sel_a2 -onlytop 0 -shownormal]
30 regexp {([-0-9.+eE]+ [-0-9.+eE]+ [-0-9.+eE]+)\s([-0-9.+eE]+ [-0-9.+eE]+ [-0-9.+eE]+)\s([-0-9.+eE]+ [-0-9.+eE]+ [-0-9.+eE]+)} ${pointlist2} full p1 p2 p3
31 checkpoint "point1" $p1 {1 0 4} 0.0001
32 checkpoint "point2" $p2 {1 0 2} 0.0001
33 checkpoint "point3" $p3 {1 0 1.7320508075688776} 0.0001
34
35 vdump ${imagedir}/${casename}.png