61c421bf |
1 | puts "========" |
2 | puts "OCC349" |
3 | puts "1. Hidden line removal algorithm works incorrect in the perspective view" |
4 | puts "========" |
5 | |
6 | vinit |
7 | box b 100 900 300 |
61c421bf |
8 | vdisplay b |
9 | |
10 | OCC280 1 0 |
11 | |
12 | vfit |
13 | |
ccadc126 |
14 | set yellow_coords {{135 119} {387 33} {172 144} {28 190} {212 272} {60 343} {26 255} {389 113} {60 276}} |
15 | set black_coords {{160 257} {365 150} {353 99}} |
61c421bf |
16 | |
17 | # |
18 | # ___________2________________ |
19 | # /| /| |
20 | # / | / | |
21 | # / | / | |
22 | # / | / | |
23 | # / | / | |
24 | # 1 | 3 | |
25 | # / | / | |
26 | # / | / | |
27 | # / | / | |
28 | # / | / | |
29 | # ----------------4------------ | |
30 | # | | | | |
31 | # | | | | |
32 | # | | | | |
33 | # | 10 | 11 |
34 | # | | | | |
35 | # | | | | |
36 | # | | | | |
37 | # | | | | |
38 | # | | | | |
39 | # 9 | 12 | |
40 | # | |___________6____|__________| |
41 | # | / | / |
42 | # | / | / |
43 | # | / | / |
44 | # | / | / |
45 | # | 5 | / |
46 | # | / | 7 |
47 | # | / | / |
48 | # | / | / |
49 | # | / | / |
50 | # |/ |/ |
51 | # |--------------8------------| |
52 | # |
53 | # |
54 | |
ccadc126 |
55 | vaspects -setwidth 5 |
56 | |
57 | foreach i $yellow_coords { |
58 | if {"[vreadpixel [lindex $i 0] [lindex $i 1] rgb name]" != "YELLOW" } { |
59 | puts "Error : ${i} is not yellow" |
60 | } |
61 | } |
62 | |
63 | foreach i $black_coords { |
64 | if {"[vreadpixel [lindex $i 0] [lindex $i 1] rgb name]" != "BLACK" } { |
65 | puts "Error : ${i} is not black" |
66 | } |
67 | } |
61c421bf |
68 | |
5747059b |
69 | checkview -screenshot -3d -path ${imagedir}/${test_image}.png |