0027986: Visualization - AIS_InteractiveContext::SetLocation() does not update dynami...
[occt.git] / tests / bugs / vis / bug26779
CommitLineData
23963a92 1puts "============"
2puts "CR26779"
3puts "============"
4puts ""
5
6##########################################################################################
7puts "Draw Harness, ViewerTest - vstate output is incorrect for sub-shapes selection without opening local context"
8##########################################################################################
9
10pload MODELING VISUALIZATION
11
12box b1 1 2 3
13box b2 5 5 5 1 1 1
14
15vclear
16vclose ALL
17vinit View1
18vaxo
19vsetdispmode 1
20vdisplay b1
21vfit
22
23vselmode b1 4 1
24vselect 300 300
25set anInfo [split [vstate] "\n"]
26set aItem1 [lindex $anInfo 0]
27set aItem2 [string trim [lindex $anInfo 1] ]
28set aSize [llength $anInfo]
29if {$aSize != 3 || [string compare $aItem1 "Locally selected sub-shapes within b1:"] != 0 || [string compare $aItem2 "Face #2"] != 0} {
30 puts "ERROR: vstate output for selected face is incorrect"
31}
32
33vdisplay b2
34vfit
35
36vselect 350 120 1
37set anInfo [split [vstate *] "\n"]
38set aItem1 [string trim [lindex $anInfo 1] ]
39set aItem2 [string trim [lindex $anInfo 2] ]
40set aItem3 [string trim [lindex $anInfo 4] ]
41set aSize [llength $anInfo]
42puts $aItem1
43puts $aItem2
44puts $aSize
45if {$aSize != 6} {
46 puts "ERROR: vstate output for shift selection is incorrect"
47}
48if {[string compare $aItem1 "b1 Displayed Type: AIS_Shape (AIS_Shape)"] != 0 &&
49[string compare $aItem2 "b1 Displayed Type: AIS_Shape (AIS_Shape)"] != 0} {
50 puts "ERROR: no info about object b1 in vstate output"
51}
52if {[string compare $aItem1 "b2 Displayed Selected Detected Type: AIS_Shape (AIS_Shape)"] != 0 &&
53[string compare $aItem2 "b2 Displayed Selected Detected Type: AIS_Shape (AIS_Shape)"] != 0} {
54 puts "ERROR: no info about object b2 in vstate output"
55}
56if {[string compare $aItem3 "Face #2"] != 0} {
57 puts "ERROR: vstate output for selected face in test part 2 is incorrect"
58}
59
5747059b 60checkview -screenshot -3d -path ${imagedir}/${test_image}.png