6 ##########################################################################################
7 puts "Visualization - cannot pick zoom persistent object"
8 ##########################################################################################
10 proc compareDepth {theInfo} {
11 set aInfoList [split $theInfo "\n"]
12 set aEntNb [llength $aInfoList]
14 for {set aEntIdx 0} {$aEntIdx < $aEntNb} {incr aEntIdx} {
15 set aBuff [lindex $aInfoList $aEntIdx]
16 set aStringArr [split $aBuff " "]
17 set aSize [llength $aStringArr]
18 for {set aIdx 0} {$aIdx < $aSize} {incr aIdx} {
19 set aItem [lindex $aBuff $aIdx]
20 if {[string compare $aItem "Depth:"] == 0} {
21 lappend aDepths [string trim [lindex $aBuff [expr $aIdx + 1]]]
26 set aDepth1 [lindex $aDepths 0]
27 set aDepth2 [lindex $aDepths 1]
28 set aDiff [expr $aDepth1 - $aDepth2]
29 if {[expr abs($aDiff)] > 0.55} {
30 puts "ERROR: the depths diff is bigger than adequate tolerance, see vstate output!"
34 pload VISUALIZATION MODELING
42 box b3 150 150 150 100 100 100
46 vdisplay b1 -trsfPers zoom -trsfPersPos 200 200 200
47 vdisplay b2 -trsfPers zoom -trsfPersPos 200 200 200
48 vsetlocation b2 -20.3 -20.3 -20.3
52 vaspects b1 -setColor RED
53 vaspects b2 -setColor GREEN
55 # setup the view in a way that front faces of b2 and b3 lie
56 # almost on the same plane
57 vviewparams -scale 0.99 -proj -0.04 -0.99 0.11
58 vviewparams -up -0.58 0.16 0.8 -at 8.48 160.93 282.42
59 vviewparams -eye -14.63 -379.49 343.06
62 set anInfo [vstate -entities]
64 vdump ${imagedir}/${casename}_1.png
68 # setup the view in a way that front faces of b1 and b3 lie
69 # almost on the same plane
70 vviewparams -scale 0.99 -proj -0.17 0.09 0.98
71 vviewparams -up -0.1 0.99 -0.1 -at -49.98 231.47 25.2
72 vviewparams -eye -142.03 280.17 559.45
75 set anInfo [vstate -entities]
77 vdump ${imagedir}/${casename}_2.png
79 checkview -screenshot -3d -path ${imagedir}/${test_image}.png