1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00
occt/tests/bugs/vis/bug1174
aba 4754e16481 0023539: QASelect and QAShiftSelect commands
Replaced QAMoveTo, QASelect and QAShiftSelect draw commands with vmoveto and vselect
Moved vselect and vmoveto draw commands to ViewerTest_ViewerCommands.cxx
Replaced  QAMoveTo and QASelect in test cases. Corrected returned error case result in vselect and vmoveto.
Added commands in ViewerTest_ViewerCommands from QADraw. Edited tests.
QACommands in tests were replaced with ViewerTest commands.
QAxwd command was removed from QADraw. Edited command wzoom and commands from ViewerTest.
Help for ViewerTest commands was edited
Small corrections. Added test cases for polygonal selection.
Small correction of test cases
2013-01-18 14:22:14 +04:00

72 lines
1.7 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 center_X 191.285
set center_Y 76.6556
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 -27.258
set at_Y 30.2321
set at_Z -9.0201
vviewparams ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
set x_GREEN 300
set y_GREEN 180
set x_BLUE 180
set y_BLUE 250
set ColorList1 [QAGetPixelColor ${x_GREEN} ${y_GREEN}]
regexp {RED +: +([-0-9.+eE]+)} $ColorList1 full RED_1
regexp {GREEN +: +([-0-9.+eE]+)} $ColorList1 full GREEN_1
regexp {BLUE +: +([-0-9.+eE]+)} $ColorList1 full BLUE_1
set ColorList2 [QAGetPixelColor ${x_BLUE} ${y_BLUE}]
regexp {RED +: +([-0-9.+eE]+)} $ColorList2 full RED_2
regexp {GREEN +: +([-0-9.+eE]+)} $ColorList2 full GREEN_2
regexp {BLUE +: +([-0-9.+eE]+)} $ColorList2 full BLUE_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