mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
Fix incorrect value of axis intersection with segment inside of SelectMgr_AxisIntersector::raySegmentDistance(). Move camera definition to base intersector (it is not possible to set it for axis intersector, is is not applicable). Add method Graphic3d_Camera::SetIdentityOrientation() to set camera parameters to make current orientation matrix identity one. Remove all matrices from selection intersectors and frustum builder and use camera instead of them. Fix missed axis tests in vselect grid.
36 lines
1.2 KiB
Plaintext
36 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_a1 -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_a2 -onlytop 0 -shownormal]
|
|
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
|
|
checkpoint "point1" $p1 {1 0 4} 0.0001
|
|
checkpoint "point2" $p2 {1 0 2} 0.0001
|
|
checkpoint "point3" $p3 {1 0 1.7320508075688776} 0.0001
|
|
|
|
vdump ${imagedir}/${casename}.png
|