0032208: Tests - refactor visualization tests to cover several graphic drivers
[occt.git] / tests / vselect / clipping / bug29791
CommitLineData
fad3eca7 1puts "============"
2puts "0029791: Visualization - Wrong result of SelectMgr_RectangularFrustum::IsClipped"
3puts "============"
4puts ""
5
6pload MODELING VISUALIZATION
7restore [locate_data_file occ/bottle.brep] b
8vclear
9vinit View1
10vdisplay -dispMode 1 -highMode 1 b
11vfit
12vzbufftrihedron
fad3eca7 13vclipplane p -equation 1 0 0 -20 -set
029594a0 14
15# clipping plane orthogonal to the camera direction
16vfront
17vfit
18vmoveto 150 200
19vstate -entities
20vselect 150 200
1a96d253 21if { [vreadpixel 150 200 rgb name] != "BLACK" } { puts "Error: object is not clipped" }
22if { [vreadpixel 350 200 rgb name] != "GOLDENROD" } { puts "Error: object should NOT be selected" }
029594a0 23vdump $imagedir/${casename}_1.png
24
25# depth range starts behinds the picking ray
26vviewparams -scale 14.7435 -proj 0.193921 -0.891229 0.410007 -up -0.0205984 0.414149 0.909976 -at 11.3689 1.32152 24.9954
fad3eca7 27vmoveto 150 200
28vstate -entities
29vselect 150 200
30if { [vreadpixel 150 200 rgb name] != "BLACK" } { puts "Error: object is not clipped" }
ba00aab7 31if { [vreadpixel 300 200 rgb name] != "GOLDENROD3" } { puts "Error: object should NOT be selected" }
fad3eca7 32
029594a0 33vdump $imagedir/${casename}_2.png