1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00
Files
occt/tests/bugs/vis/bug1629
vpa c3282ec170 0026272: Visualization - provide a possibility to activate selection modes without opening local context
- picked or selected objects are now highlighted via owners instead of interactive objects;
- support methods for owners were added to AIS_InteractiveContext;
- dynamically highlighted owners are now displayed in immediate mode;
- selection without opening of local context is enabled by default;
- added "-local" key to vselmode command to enable selection in local context;
- selection filters are now completely supported in AIS_InteractiveContext;
- the idea of differencing of selected items onto current (in interactive context) and selected (local selection) was eliminated;
- all calls to "current" were replaced by calls to "selected" in terms of future local context removal;
- AIS_InteractiveObject::mySelectionMode was removed;
- now each selectable object can define own selection mode for "global" selection of the whole object;
- whole object selection mode is 0 by default for all standard interactive objects;
- immediate structures are now added to topmost and top layer lists;
- added support of drawing immediate structures in different layers;
- unused code for immediate mode was removed;
- vfeedback and vexport commands now produce correct output for raytrace mode.
2015-07-31 14:38:19 +03:00

98 lines
2.0 KiB
Plaintext
Executable File

puts "================"
puts "OCC1629"
puts "OCC2707"
puts "================"
puts ""
#######################################################################################
# Viewer is always updated on closing local contexts
#######################################################################################
box b1 10 10 10
box b2 50 50 50 10 10 10
vinit
vdisplay b1 b2
vfit
# box b2
set x1 321
set y1 120
set x2 336
set y2 145
set x3 367
set y3 144
# box b1
set x4 44
set y4 314
set x5 72
set y5 314
set Selection_R 0.8
set Selection_G 0.8
set Selection_B 0.8
#QASetChoiceMode EDGE ON
vselmode 2 1 -local
set BeforeNbSelected [vnbselected]
vselect 0 0 1
vselect ${x1} ${y1} 1
vselect ${x2} ${y2} 1
vselect ${x3} ${y3} 1
vselect ${x4} ${y4} 1
vselect ${x5} ${y5} 1
set AfterNbSelected [vnbselected]
checkcolor ${x1} ${y1} ${Selection_R} ${Selection_G} ${Selection_B}
checkcolor ${x2} ${y2} ${Selection_R} ${Selection_G} ${Selection_B}
checkcolor ${x3} ${y3} ${Selection_R} ${Selection_G} ${Selection_B}
checkcolor ${x4} ${y4} ${Selection_R} ${Selection_G} ${Selection_B}
checkcolor ${x5} ${y5} ${Selection_R} ${Selection_G} ${Selection_B}
if {${BeforeNbSelected} == 0} {
puts "OCC1629: OK (case 6: before selection)"
} else {
puts "OCC1629: Error (case 6: before selection)"
}
if {${AfterNbSelected} == 5} {
puts "OCC1629: OK (case 7: after selection)"
} else {
puts "OCC1629: Error (case 7: after selection)"
}
vselmode 0 1
#
puts "NOTES:"
puts ""
puts "Viewer is not updated on closing local context,"
puts "but we can not check it by automatic test!"
puts ""
puts "5 edges must be selected on the viewer,"
puts "but must be CloseNbSelected = 0 !"
puts ""
#
set CloseNbSelected [vnbselected]
checkcolor ${x1} ${y1} 1 1 0
checkcolor ${x2} ${y2} 1 1 0
checkcolor ${x3} ${y3} 1 1 0
checkcolor ${x4} ${y4} 1 1 0
checkcolor ${x5} ${y5} 1 1 0
if {${CloseNbSelected} == 0} {
puts "OCC1629: OK (case 13: after close local context)"
} else {
puts "OCC1629: Error (case 13: after close local context)"
}
set only_screen 1