0031221: Visualization - selection filter in context
[occt.git] / tests / bugs / vis / bug31221
CommitLineData
897aeb20 1puts "==========="
2puts "0031221: Visualization - selection filter in context"
3puts "==========="
4puts ""
5
6vertex v 0 0 0
7
8vertex v1 1 0 0
9vertex v2 10 0 0
10edge e v1 v2
11
12vclear
13vinit View1
14vdisplay v
15vdisplay e
16vfit
17
18# 1.
19# Set composition filter AND to aplly VERTEX and EDGE filter
20# the vertex and the edge isn't selected
21vselfilter -contextfilter AND -type VERTEX -secondtype EDGE
22
23vchangeselected e
24
25set aNbSelected [vnbselected]
26if { $aNbSelected != 0 } { puts "Error: combined AND filter was not applied" }
27
28vchangeselected v
29
30set aNbSelected [vnbselected]
31if { $aNbSelected != 0 } { puts "Error: combined AND filter was not applied" }
32
33# 2.
34# Deselected the edge and the vertex
35vchangeselected e
36vchangeselected v
37
38# 3.
39# Set composition filter OR to aplly VERTEX and EDGE filter
40# the vertex and the edge is selected
41
42vselfilter -contextfilter OR -type VERTEX -secondtype EDGE
43
44vchangeselected e
45
46set aNbSelected [vnbselected]
47if { $aNbSelected != 1 } { puts "Error: combined OR filter was not applied" }
48
49vchangeselected v
50
51set aNbSelected [vnbselected]
52if { $aNbSelected != 2 } { puts "Error: combined OR filter was not applied" }