0027986: Visualization - AIS_InteractiveContext::SetLocation() does not update dynami...
[occt.git] / tests / bugs / vis / bug26028
CommitLineData
c3715b74 1puts "============="
cde2e2f0 2puts "Drawing mesh as closed object."
c3715b74 3puts "============="
4puts ""
5
c3715b74 6pload XDE
7
cde2e2f0 8set aMeshFile [locate_data_file sh1.stl]
9
10vclear
11vinit View1
12vaxo
13
14meshfromstl m0 "$aMeshFile"
15vsetdispmode m0 2
16
17vsetlocation -noupdate m0 -100 0 0
18meshfromstl m1 "$aMeshFile"
19meshcolors m1 elem1 0
20vsetlocation -noupdate m1 0 0 0
c3715b74 21
cde2e2f0 22meshfromstl m2 "$aMeshFile"
23meshcolors m2 elem2 0
24vsetlocation -noupdate m2 100 0 0
25
26meshfromstl m3 "$aMeshFile"
27meshcolors m3 nodal 1
28vsetlocation -noupdate m3 0 0 100
29
30meshfromstl m4 "$aMeshFile"
31meshcolors m4 nodaltex 1
32vsetlocation -noupdate m4 100 0 100
c3715b74 33vfit
34
cde2e2f0 35vclipplane create p
36vclipplane change p equation 0 1 0 0
37vclipplane change p capping on
38vclipplane change p capping color 0.9 0.9 0.9
39vclipplane set p view Driver1/Viewer1/View1
40
41for {set i 0} {$i < 5} {incr i} { meshclosed m$i 0 }
42vdump ${imagedir}/${casename}_open.png
43
44for {set i 0} {$i < 5} {incr i} { meshclosed m$i 1 }
45set aColor0 [vreadpixel 125 200 rgb name]
46set aColor1 [vreadpixel 225 300 rgb name]
47set aColor2 [vreadpixel 325 325 rgb name]
48set aColor3 [vreadpixel 225 150 rgb name]
49set aColor4 [vreadpixel 325 200 rgb name]
c3715b74 50
3e05329c 51# note that aColor2 is not expected to be capped
52if { "$aColor0" != "GRAY61" || "$aColor1" != "GRAY61" || "$aColor2" == "GRAY61" || "$aColor3" != "GRAY61" || "$aColor4" != "GRAY61" } {
cde2e2f0 53 puts "Error: capping color does not match"
54}
c3715b74 55
cde2e2f0 56vdump ${imagedir}/${casename}_closed.png