1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/bugs/vis/bug1174
ski 5747059b21 0026833: Create command checkview containing all viewer types
Created command checkview for displaying shapes.
2016-02-05 11:14:37 +03:00

70 lines
1.6 KiB
Plaintext
Executable File

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"
}
checkview -screenshot -3d -path ${imagedir}/${test_image}.png