0027986: Visualization - AIS_InteractiveContext::SetLocation() does not update dynami...
[occt.git] / tests / bugs / vis / bug26973
CommitLineData
e9312c0f 1puts "============"
2puts "CR26973"
3puts "============"
4puts ""
5
6##########################################################################################
7puts "Visualization - selection of entities hidden by clipping planes is broken"
8##########################################################################################
9
10pload MODELING VISUALIZATION
11
12vinit View1
13vclear
14vaxo
15vsetdispmode 1
16
17proc OCC26973 { toTestViewPlanes toApplyTrsf theImgIdr theCaseName} {
18 if {$toApplyTrsf == "1"} {
19 box b -100 -100 -100 1 1 1
20 ttranslate b 100 100 100
21 } else {
22 box b 1 1 1
23 }
24
25 vdisplay b
26 vfit
27 vselmode b 4 1
28
29 vclipplane create pln
30 if {$toTestViewPlanes == "1"} {
31 vclipplane set pln view Driver1/Viewer1/View1
32 } else {
33 vclipplane set pln object b
34 }
35 vclipplane change pln equation 0 1 0 -0.5
36
37 vselect 200 140
38 set aTestInfo "Test case: "
39 append aTestInfo "clipping planes applied to "
40 set aDumpFileName $theImgIdr/${theCaseName}
41 if {$toTestViewPlanes == "1"} {
42 append aTestInfo "view, "
43 append aDumpFileName "_view"
44 } else {
45 append aTestInfo "object, "
46 append aDumpFileName "_obj"
47 }
48 append aTestInfo "object trsf is "
49 if {$toApplyTrsf == "1"} {
50 append aTestInfo "on"
51 append aDumpFileName "_with_trsf.png"
52 } else {
53 append aTestInfo "off"
54 append aDumpFileName "_wo_trsf.png"
55 }
56
57 if {[vnbselected] != 1} {
58 puts "ERROR: can not select face."
59 puts $aTestInfo
60 }
61 set aSelectedFace [string trim [lindex [split [vstate] "\n"] 1] ]
62 if {$aSelectedFace != "Face #1"} {
63 puts "ERROR: wrong face is selected."
64 puts "Actually seleced face: $aSelectedFace"
65 puts $aTestInfo
66 }
67
68 vdump $aDumpFileName
69 vremove -all
70 vclipplane delete pln
71}
72
73# check global clipping planes selection
74OCC26973 1 0 $imagedir $casename
75OCC26973 1 1 $imagedir $casename
76
77# check object clipping planes selection
78OCC26973 0 0 $imagedir $casename
79OCC26973 0 1 $imagedir $casename