1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-01 10:26:12 +03:00
occt/tests/bugs/vis/bug25723
vpa f751596e46 0024623: Visualization - improve selection mechanism
Redesign of selection mechanism:
- implemented 3-level BVH tree for selection;
- selection now calculates in 3D space;
- intersection tests were moved to SelectMgr_BaseFrustum descendants;
- removed .cdl files in Select3D and .cdl related to selection in MeshVS;
- SelectMgr_ViewerSelectors are now shared between local and global contexts;
- transformations of sensitive entities are now stored in SelectMgr_SelectableObject only. Sensitive entities are independent from transformations, it is applied to SelectMgr_SelectingVolumeManager instance only;
- connected and multiple connected interactive objects are now represented by their child objects only for SelectMgr_SelectionManager;
- if interactive object has child objects, they will be stored as separate objects in SelectMgr_SelectionManager now.
- test cases bugs/vis/bug24623_1, bug24623_2, bug24623_3, bug24623_4 to test performance and memory issues.
2015-04-06 17:27:38 +03:00

51 lines
1017 B
Plaintext

puts "============"
puts "OCC25723"
puts "Calculate the center of rotation taking into account structure visibility"
puts "============"
puts ""
set x_start_sel_coord 100
set y_start_sel_coord 104
set x_end_sel_coord 400
set y_end_sel_coord 400
set x_mouse_start_coord 100
set y_mouse_start_coord 100
set x_mouse_move_coord 300
set y_mouse_move_coord 300
set x_check_coord 220
set y_check_coord 50
box b1 0 0 0 10 10 10
box b2 0 0 20 10 10 10
box b3 0 0 -20 10 10 10
box b4 0 0 40 10 10 10
vinit View1
vclear
vaxo
vsetdispmode 1
# turn on solid selection
vselmode 6 1
vdisplay b1 b2 b3 b4
vfit
# select solid
vselect ${x_start_sel_coord} ${y_start_sel_coord} ${x_end_sel_coord} ${y_end_sel_coord}
# hide selected solids
verase
# rotation
vrotate -mouseStart ${x_mouse_start_coord} ${y_mouse_start_coord} -mouseMove ${x_mouse_move_coord} ${y_mouse_move_coord}
if {"[vreadpixel ${x_check_coord} ${y_check_coord} rgb name]" != "GOLDENROD2"} {
puts "Error: Rotation is not correct"
}
set only_screen 1