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