1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00
Files
occt/tests/bugs/vis/bug26344
isk 1d92133e83 0026641: Visualization, TKOpenGl - handle correctly transformation persistence within perspective projection.
Add a new method AIS_InteractiveContext::SetTransformPersistence, which sets transform persistence to object and selection.
Add a new method SelectMgr_SelectionManager::UpdateSelection, which re-adds selectable object in BVHs in all viewer selectors.
Add a new method SelectMgr_ViewerSelector::MoveSelectableObject, which moves object from set of not transform persistence objects to set of transform persistence objects (or vice versa).
Add a new method Graphic3d_TransformUtils::Convert, which converts gp_Trsf to Graphic3d_Mat4.
Remove the method PrsMgr_PresentableObject::SetTransformPersistence(flag, point).
2016-07-07 14:30:18 +03:00

81 lines
1.9 KiB
Plaintext

puts "============"
puts "CR26344"
puts "============"
puts ""
##########################################################################################
puts "Visualization - provide a support of zoom persistent selection"
##########################################################################################
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 -trsfPers zoom -trsfPersPos 200 200 200
vdisplay b2 -trsfPers zoom -trsfPersPos 200 200 200
vsetlocation b2 -25 -25 -25
vmoveto 387 77
if { ![checkcolor 387 77 0 1 1] } {
puts "Error picking zoom persistence object"
}
vmoveto 352 96
if { ![checkcolor 352 96 0 1 1] } {
puts "Error picking zoom persistent object with location"
}
vselect 330 120 400 50
if { ![checkcolor 387 77 0.8 0.8 0.8] || ![checkcolor 352 96 0.8 0.8 0.8] } {
puts "Error selecting zoom persistence object(s)"
}
# 2) Rotate persistence
vdisplay b3 -trsfPers rotate -trsfPersPos -200 -200 -200
vmoveto 160 200
if { ![checkcolor 160 180 0 1 1] } {
puts "Error picking rotate persistence object"
}
vselect 130 230 190 170
if { ![checkcolor 160 180 0.8 0.8 0.8] } {
puts "Error selecting rotate persistence object"
}
# 3) Pan persistence
vdisplay b4 -trsfPers pan
vmoveto 233 188
if { ![checkcolor 233 188 0 1 1] } {
puts "Error picking pan persistence object"
}
vselect 200 230 270 140
if { ![checkcolor 233 188 0.8 0.8 0.8] } {
puts "Error selecting pan persistence object"
}
# 4) Trihedron persistence
vdisplay b5 -trsfPers trihedron -trsfPersPos -1 -1 300
vmoveto 132 300
if { ![checkcolor 132 300 0 1 1] } {
puts "Error picking trihedron persistence object"
}
vselect 50 223 235 395
if { ![checkcolor 132 300 0.8 0.8 0.8] } {
puts "Error selecting trihedron persistence object"
}
vselect 50 380 400 50
checkview -screenshot -3d -path ${imagedir}/${test_image}.png