mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-16 10:54:53 +03:00
Usage of QAGetPixelColor were checked and corrected. Using simple comparison instead of regexp. Improved usage of command vreadpixel for standard colors. Command QAGetPixelColor was dropped from TKQADraw. Procedures "checkcolor" and auxiliary "checkpoint" were moved to DrawResources/TestCommands.tcl Some test cases using "checkcolor" for picking line color were simplified. Procedures checkcolor and checkpoint were changed to handle situation when pixel is out of view. Removed unnecessary use of command "vaspects -setwidth" in tests. Revert -setwidth change in test bugs/vis/bug23525
70 lines
1.5 KiB
Plaintext
Executable File
70 lines
1.5 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"
|
|
}
|
|
|
|
set only_screen 1
|