1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00
Files
occt/tests/vselect/axis/A1
mkrylova dd2bc8054f 0032182: Visualization - add Select3D_SensitiveSphere
- created Select3D_SensitiveSphere class
- implemented interfaces for intersection methods
- added tests
2021-06-16 17:15:34 +03:00

35 lines
1.2 KiB
Plaintext

puts "========"
puts "0032338: Visualization - provide straightforward interface for ray-picking"
puts "========"
puts ""
pload MODELING VISUALIZATION
psphere s 2
box b -min -1 -1 2 -max 1 1 4
vclear
vinit View1
vdisplay -dispMode 1 s
vsettransparency s 0.5
vdisplay -dispMode 1 b
vsettransparency b 0.5
vaxis a 1 -2 2 1 2 2
vpoint p 0 0 5
vdisplay p
vaspects p -markerType O
vaxo
vfit
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" }
set pointlist1 [vselaxis 0 0 6 0 0 -1 -display sel_a2 -onlytop 0]
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
checkpoint "point1" $p1 {0 0 5} 0.001
checkpoint "point2" $p2 {0 0 4} 0.001
checkpoint "point3" $p3 {0 0 2} 0.001
set pointlist2 [vselaxis 1 0 6 0 0 -1 -display sel_a1 -onlytop 0 -shownormal]
regexp {([-0-9.+eE]+ [-0-9.+eE]+ [-0-9.+eE]+)\s([-0-9.+eE]+ [-0-9.+eE]+ [-0-9.+eE]+)} ${pointlist2} full p1 p2
checkpoint "point1" $p1 {1 0 4} 0.0001
checkpoint "point2" $p2 {1 0 1.7320508075688794} 0.0001
vdump ${imagedir}/${casename}.png