File: bug1174

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (69 lines) | stat: -rw-r--r-- 1,545 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
puts "================"
puts "OCC1174"
puts "================"
puts ""
########################################################################################
# puts "Impossible to set different properties for different sides of a (sur)face"
########################################################################################

set x 200
set y 200

set Black_R 0
set Black_G 0
set Black_B 0

restore [locate_data_file OCC1174.brep] a
vinit
OCC1174_1 a
vdisplay a
vfit

set scale    2.50501
set proj_X   0.672033
set proj_Y   -0.721033
set proj_Z   0.168771
set up_X     -0.131494
set up_Y     0.108095
set up_Z     0.985406
set at_X     102.061817325836
set at_Y     169.436979868935
set at_Z     70.7572056943368

vviewparams -scale ${scale} -proj ${proj_X} ${proj_Y} ${proj_Z} -up ${up_X} ${up_Y} ${up_Z} -at ${at_X} ${at_Y} ${at_Z}

set x_GREEN 300
set y_GREEN 180

set x_BLUE 180
set y_BLUE 250

set ColorList1 [vreadpixel ${x_GREEN} ${y_GREEN} rgb]
set RED_1   [lindex $ColorList1 0]
set GREEN_1 [lindex $ColorList1 1]
set BLUE_1  [lindex $ColorList1 2]

set ColorList2 [vreadpixel ${x_BLUE} ${y_BLUE} rgb]
set RED_2   [lindex $ColorList2 0]
set GREEN_2 [lindex $ColorList2 1]
set BLUE_2  [lindex $ColorList2 2]

if {${RED_1} == 0 && ${GREEN_1} > 0 && ${BLUE_1} == 0} {
   set IsGreen 1
} else {
   set IsGreen 0
}

if {${RED_2} == 0 && ${GREEN_2} == 0 && ${BLUE_2} > 0} {
   set IsBlue 1
} else {
   set IsBlue 0
}

if {${IsGreen} == 1 && ${IsBlue} == 1} {
   puts "OCC1174: OK"
} else {
   puts "OCC1174: Error"
}

set only_screen 1