Files
OCCT/tests/bugs/vis/bug31221
sshutina 897aeb207f 0031221: Visualization - selection filter in context
- Added the new filter SelectMgr_AndOrFilter which allows to define the context filter. By default OR selection filter is used
 - Added the enumeration SelectMgr_FilterType provides filter types
 - To define behavior SelectMgr_AndOrFilter use  SetFilterType in AIS_InteractiveContext
 - Added the test
 - SelectMgr_OrFilter don't store the disabled objects, it's stored in SelectMgr_AndOrFilter
2020-09-12 20:42:24 +03:00

52 lines
1.1 KiB
Plaintext

puts "==========="
puts "0031221: Visualization - selection filter in context"
puts "==========="
puts ""
vertex v 0 0 0
vertex v1 1 0 0
vertex v2 10 0 0
edge e v1 v2
vclear
vinit View1
vdisplay v
vdisplay e
vfit
# 1.
# Set composition filter AND to aplly VERTEX and EDGE filter
# the vertex and the edge isn't selected
vselfilter -contextfilter AND -type VERTEX -secondtype EDGE
vchangeselected e
set aNbSelected [vnbselected]
if { $aNbSelected != 0 } { puts "Error: combined AND filter was not applied" }
vchangeselected v
set aNbSelected [vnbselected]
if { $aNbSelected != 0 } { puts "Error: combined AND filter was not applied" }
# 2.
# Deselected the edge and the vertex
vchangeselected e
vchangeselected v
# 3.
# Set composition filter OR to aplly VERTEX and EDGE filter
# the vertex and the edge is selected
vselfilter -contextfilter OR -type VERTEX -secondtype EDGE
vchangeselected e
set aNbSelected [vnbselected]
if { $aNbSelected != 1 } { puts "Error: combined OR filter was not applied" }
vchangeselected v
set aNbSelected [vnbselected]
if { $aNbSelected != 2 } { puts "Error: combined OR filter was not applied" }