7479f643 |
1 | puts "============" |
2 | puts "CR26719" |
3 | puts "============" |
4 | puts "" |
5 | |
6 | ########################################################################################## |
7 | puts "Visualization - cannot pick zoom persistent object" |
8 | ########################################################################################## |
9 | |
10 | proc compareDepth {theInfo} { |
11 | set aInfoList [split $theInfo "\n"] |
12 | set aEntNb [llength $aInfoList] |
13 | set aDepths {} |
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]]] |
22 | } |
23 | } |
24 | } |
25 | |
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!" |
31 | } |
32 | } |
33 | |
34 | pload VISUALIZATION MODELING |
35 | |
36 | vinit |
37 | vtrihedron tri |
38 | vpan 50 50 |
39 | |
91d96372 |
40 | box b1 20.3 20.3 20.3 |
41 | box b2 20.3 20.3 20.3 |
7479f643 |
42 | box b3 150 150 150 100 100 100 |
43 | |
44 | vpoint p1 200 200 200 |
45 | |
46 | vdisplay b1 -trsfPers zoom -trsfPersPos 200 200 200 |
47 | vdisplay b2 -trsfPers zoom -trsfPersPos 200 200 200 |
91d96372 |
48 | vsetlocation b2 -20.3 -20.3 -20.3 |
7479f643 |
49 | vdisplay b3 |
50 | |
51 | vsetdispmode 1 |
52 | vaspects b1 -setColor RED |
53 | vaspects b2 -setColor GREEN |
54 | |
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 |
60 | # check depth values |
61 | vmoveto 230 280 |
62 | set anInfo [vstate -entities] |
63 | compareDepth $anInfo |
64 | vdump ${imagedir}/${casename}_1.png |
65 | |
66 | vmoveto 0 0 |
67 | |
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 |
73 | # check depth values |
74 | vmoveto 276 110 |
75 | set anInfo [vstate -entities] |
76 | compareDepth $anInfo |
77 | vdump ${imagedir}/${casename}_2.png |
78 | |
5747059b |
79 | checkview -screenshot -3d -path ${imagedir}/${test_image}.png |