12280e4b |
1 | puts "=====================================" |
2 | puts "0029885: Visualization, AIS_Manipulator - Translation is done in wrong direction depending on Camera orientation" |
3 | puts "=====================================" |
4 | |
5 | pload MODELING VISUALIZATION |
6 | box b 500 500 1 50 100 150 |
7 | vclear |
8 | vinit View1 |
9 | vzbufftrihedron |
10 | vcamera -persp |
11 | vaxo |
12 | vdisplay -dispMode 1 b |
13 | vfit |
14 | vmanipulator m -attach b |
15 | vmanipulator m -part 0 2 0 |
16 | vmanipulator m -part 1 2 0 |
17 | vmanipulator m -part 2 2 0 |
18 | vmanipulator m -part 0 3 0 |
19 | vmanipulator m -part 1 3 0 |
20 | vmanipulator m -part 2 3 0 |
21 | vmanipulator m -part 2 1 0 |
22 | vselmode m 2 0 |
23 | vselmode m 3 0 |
24 | |
25 | vmoveto 245 220 |
26 | vselect 245 220 |
27 | vmanipulator m -startTransform 245 220 |
28 | vmanipulator m -transform 340 265 |
29 | vmanipulator m -stopTransform |
30 | if {[vreadpixel 370 300 rgb name] == "BLACK" } { puts "Error: wrong translation" } |
31 | |
32 | set aLocFull [vlocation b] |
33 | regexp {Location:\s*([ 0-9.e+-]+)} $aLocFull aLocTmp aLoc |
34 | if { [expr abs([lindex $aLoc 0] - 46)] > 0.1 || [lindex $aLoc 1] != 0 || [lindex $aLoc 2] != 0 } { puts "Error: wrong translation" } |
35 | |
36 | vdump $imagedir/${casename}.png |