0031304: Configuration - TKACIS building failure due to duplicated symbol GeomFillFus...
[occt.git] / tests / bugs / vis / bug25627
1 puts "============"
2 puts "CR25627"
3 puts "============"
4 puts ""
5 #######################################################################
6 # SelectedShape() and HasSelectedShape() of AIS_InteractiveContext
7 # class do not work as expected.
8 #######################################################################
9 pload ALL
10
11 vinit
12 box aBox 5 5 5
13 vdisplay aBox
14 vfit
15 vselect 100 100
16 set aSelectionRes [vstate -hasSelected]
17 if { [lsearch $aSelectionRes 0] != -1 } {
18   puts "ERROR: Incorrect result of HasSelectedShape of the context!"
19 }
20 vpickselected aSelected
21 set aRes [vstate aSelected]
22 if { $aRes == "aSelected doesn't exist!" } {
23   puts "ERROR: No shape selected in neutral point!"
24 }
25 set aCompRes [compare aBox aSelected]
26 if { [lsearch $aCompRes not] != -1 } {
27   puts "ERROR: Selected box and selected shape from the context are not equal!"
28 }
29
30 vselect 0 0
31 vremove aSelected
32
33 vselmode aBox 6 1
34 vselect 100 100
35 set aSelectionRes [vstate -hasSelected]
36 if { [lsearch $aSelectionRes 0] != -1 } {
37   puts "ERROR: Incorrect result of HasSelectedShape of the context!"
38 }
39 vpickselected aSelected
40 set aRes [vstate aSelected]
41 if { $aRes == "aSelected doesn't exist!" } {
42   puts "ERROR: No shape selected in local selection!"
43 }
44 set aCompRes [compare aBox aSelected]
45 if { [lsearch $aCompRes not] != -1 } {
46   puts "ERROR: Selected box and selected solid are not equal!"
47 }
48
49 checkview -screenshot -3d -path ${imagedir}/${test_image}.png