mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Graphic3d_TransformPers now takes Graphic3d_Camera definition as argument for methods applying transformation. Graphic3d_TransformPers::Apply() now computes Graphic3d_TMF_TriedronPers transformation in the following way: - The object is moved onto Z focus distance. - The object is expected to be defined in pixels. - The Z coordinate on anchor point is used as offset from the view corner in pixels. - It is now possible to define not only corners of the view, but also middle of the side. - Graphic3d_TMF_TriedronPers now works with perspective projection. OpenGl_LayerList::ChangeLayer() - fixed removing of the element in old ZLayer. OpenGl_Layer::BoundingBox() now takes into account bounding box of Graphic3d_TMF_TriedronPers presentations for Z-fit operation.
72 lines
2.2 KiB
Plaintext
72 lines
2.2 KiB
Plaintext
puts "============"
|
|
puts "CR26344"
|
|
puts "============"
|
|
puts ""
|
|
|
|
##########################################################################################
|
|
puts "Visualization - provide a support of zoom persistent selection"
|
|
##########################################################################################
|
|
|
|
vclear
|
|
vclose ALL
|
|
vinit View1 w=409 h=409
|
|
vtrihedron tri
|
|
vpan 50 50
|
|
|
|
box b1 25 25 25
|
|
box b2 25 25 25
|
|
box b3 100 100 100
|
|
box b4 100 100 100
|
|
box b5 100 100 100
|
|
|
|
# 1) Zoom persistence
|
|
vpoint p1 200 200 200
|
|
|
|
vdisplay b1 -dispMode 1 -highMode 1 -trsfPers zoom -trsfPersPos 200 200 200
|
|
vdisplay b2 -dispMode 1 -highMode 1 -trsfPers zoom -trsfPersPos 200 200 200
|
|
vsetlocation b2 -25 -25 -25
|
|
|
|
vselect 0 0
|
|
vselect 387 77
|
|
if { [vreadpixel 387 77 rgb name] != "GRAY66" } { puts "Error picking zoom persistence object(s)" }
|
|
|
|
vselect 0 0
|
|
vselect 330 120 400 50
|
|
if { [vreadpixel 387 77 rgb name] != "GRAY66" || [vreadpixel 352 96 rgb name] != "GRAY66" } { puts "Error selecting zoom persistence object(s)" }
|
|
|
|
# 2) Rotate persistence
|
|
|
|
vdisplay b3 -dispMode 1 -highMode 1 -trsfPers rotate -trsfPersPos -200 -200 -200
|
|
vsetmaterial b3 PLASTIC
|
|
vselect 0 0
|
|
vselect 160 200
|
|
if { [vreadpixel 160 180 rgb name] != "WHITE" } { puts "Error picking rotate persistence object" }
|
|
|
|
vselect 0 0
|
|
vselect 130 230 190 170
|
|
if { [vreadpixel 160 180 rgb name] != "WHITE" } { puts "Error selecting rotate persistence object" }
|
|
|
|
# 3) Pan persistence
|
|
|
|
vdisplay b4 -dispMode 1 -highMode 1 -trsfPers pan
|
|
vselect 0 0
|
|
vselect 233 188
|
|
if { [vreadpixel 233 188 rgb name] != "GRAY66" } { puts "Error picking pan persistence object" }
|
|
vselect 0 0
|
|
vselect 200 230 270 140
|
|
if { [vreadpixel 233 188 rgb name] != "GRAY66" } { puts "Error selecting pan persistence object" }
|
|
|
|
# 4) Trihedron persistence
|
|
|
|
vdisplay b5 -dispMode 1 -highMode 1 -trsfPers trihedron -trsfPersPos -1 -1 62
|
|
vselect 0 0
|
|
vselect 132 300
|
|
if { [vreadpixel 132 300 rgb name] != "GRAY66" } { puts "Error picking trihedron persistence object" }
|
|
vselect 0 0
|
|
vselect 50 223 235 395
|
|
if { [vreadpixel 132 300 rgb name] != "GRAY66" } { puts "Error selecting trihedron persistence object" }
|
|
|
|
vselect 50 380 400 50
|
|
|
|
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|