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