c81c62338e0528d4a5c3bfeef5edee2d24d9c225
[occt.git] / tests / bugs / vis / bug223
1 puts "========"
2 puts "OCC223"
3 puts "========"
4 puts ""
5 ######################################################
6 # Shading is not correct for several overlapped faces, converted to B-Spline representation
7 ######################################################
8
9 restore [locate_data_file OCC223-1.brep] cylinder
10 checkshape cylinder
11 restore [locate_data_file OCC223-2.brep] face
12 checkshape face
13
14 set Start_X 140
15 set Start_Y 40
16
17 vinit
18 tclean cylinder
19 tclean face
20
21 vdisplay cylinder
22 vdisplay face
23 vfit
24
25 vsetdispmode face 1
26 vsetcolor face GREEN1
27
28 vsetdispmode  cylinder 1
29 vsetcolor cylinder RED1
30
31 QAUpdateLights
32 set ColorList [QAGetPixelColor $Start_X $Start_Y]
33 regexp {RED +: +([-0-9.+eE]+)} $ColorList full R_START_POINT
34 regexp {GREEN +: +([-0-9.+eE]+)} $ColorList full G_START_POINT
35 regexp {BLUE +: +([-0-9.+eE]+)} $ColorList full B_START_POINT
36
37 puts "R_START_POINT=$R_START_POINT ;   G_START_POINT=$G_START_POINT ;   B_START_POINT=$B_START_POINT"
38
39 set IsGood 1
40 for {set count 0} {${count} <= 11} {incr count 1} {
41     QAUpdateLights
42     checkcolor $Start_X $Start_Y $R_START_POINT $G_START_POINT $B_START_POINT
43     if {$stat != 1} {
44          set IsGood 0
45     }
46     incr $Start_X 10
47     incr $Start_Y 10
48 }
49
50 if {$IsGood == 1} {
51   puts "\nOCC223 OK\n"
52 } else {
53   puts "\nFaulty OCC223\n"
54 }
55
56 set only_screen 1
57
58 puts "\n------- Additional Comments From Igor FEOKTISTOV 2002-05-20 12:32 -------\n"
59
60 puts "It is not problem of meshing."
61 puts "It is pure problem of shading geometrically coinciding faces with different"
62 puts "triangulation. If we create analitical cylinder and box by such way that plane"
63 puts "faces of cylinder and two faces of box are coinceded, we will have the same"
64 puts "result: fractional shading of coinciding faces.\n"