0032208: Tests - refactor visualization tests to cover several graphic drivers
[occt.git] / tests / v3d / bugs / bug349
1 puts "========"
2 puts "OCC349 - Hidden line removal algorithm works incorrect in the perspective view"
3 puts "========"
4 puts ""
5
6 pload MODELING VISUALIZATION
7 vinit View1
8 box b 100 900 300
9 vcamera -persp
10 vdisplay b
11 vhlr 1
12 vfit
13
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}}
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
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 }
68
69 vdump ${imagedir}/${test_image}.png