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/bug74
2013-01-14 16:38:44 +04:00

253 lines
5.1 KiB
Plaintext

puts "TODO ?OCC12345 ALL: An exception was caught"
puts "TODO ?OCC12345 ALL: \\*\\* Exception \\*\\*.*"
puts "TODO ?OCC12345 ALL: TEST INCOMPLETE"
puts "TODO ?OCC12345 ALL: Colors are not equal in default coordinate and in the near coordinates too"
puts "================"
puts "OCC74"
puts "BUC61051"
puts "================"
puts ""
# Data
set Shape_X 100
set Shape_Y 346
set Vertex_X 29
set Vertex_Y 305
set Edge_X ${Shape_X}
set Edge_Y ${Shape_Y}
set Wire_X ${Shape_X}
set Wire_Y ${Shape_Y}
set Face_X ${Shape_X}
set Face_Y ${Shape_Y}
set Shell_X ${Shape_X}
set Shell_Y ${Shape_Y}
set Solid_X ${Shape_X}
set Solid_Y ${Shape_Y}
# Display box
vinit
box b 10 10 10
vdisplay b
vfit
QAUpdateLights
### FIRST PART
# Check Shape color
checkcolor ${Shape_X} ${Shape_Y} 1 1 0
# Check Vertex color
checkcolor ${Vertex_X} ${Vertex_Y} 1 1 0
# Check Edge color
checkcolor ${Edge_X} ${Edge_Y} 1 1 0
# Check Wire color
checkcolor ${Wire_X} ${Wire_Y} 1 1 0
# Check Face color
checkcolor ${Face_X} ${Face_Y} 1 1 0
# Check Shell color
checkcolor ${Shell_X} ${Shell_Y} 1 1 0
# Check Solid color
checkcolor ${Solid_X} ${Solid_Y} 1 1 0
### SECOND PART
# Check Shape color
QAMoveTo 1 1
QAMoveTo 1 1
set SetSelectMode 0
OCC74_set b ${SetSelectMode}
set GetSelectMode [OCC74_get b]
if { ${GetSelectMode} != ${SetSelectMode} } {
puts "Select Mode = ${GetSelectMode}"
puts "OCC74: Get Select Mode Error "
}
QAMoveTo ${Shape_X} ${Shape_Y}
QAMoveTo ${Shape_X} ${Shape_Y}
QAUpdateLights
checkcolor ${Shape_X} ${Shape_Y} 0 1 1
# Check Vertex color
QAMoveTo 1 1
QAMoveTo 1 1
set SetSelectMode 1
OCC74_set b ${SetSelectMode}
set GetSelectMode [OCC74_get b]
if { ${GetSelectMode} != ${SetSelectMode} } then {
puts "Select Mode = ${GetSelectMode}"
puts "OCC74: Get Select Mode Error "
}
QAMoveTo ${Vertex_X} ${Vertex_Y}
QAMoveTo ${Vertex_X} ${Vertex_Y}
QAUpdateLights
checkcolor ${Vertex_X} ${Vertex_Y} 0 1 1
# Check Edge color
QAMoveTo 1 1
QAMoveTo 1 1
set SetSelectMode 2
OCC74_set b ${SetSelectMode}
set GetSelectMode [OCC74_get b]
if { ${GetSelectMode} != ${SetSelectMode} } then {
puts "Select Mode = ${GetSelectMode}"
puts "OCC74: Get Select Mode Error "
}
QAMoveTo ${Edge_X} ${Edge_Y}
QAMoveTo ${Edge_X} ${Edge_Y}
QAUpdateLights
checkcolor ${Edge_X} ${Edge_Y} 0 1 1
# Check Wire color
QAMoveTo 1 1
QAMoveTo 1 1
set SetSelectMode 3
OCC74_set b ${SetSelectMode}
set GetSelectMode [OCC74_get b]
if { ${GetSelectMode} != ${SetSelectMode} } then {
puts "Select Mode = ${GetSelectMode}"
puts "OCC74: Get Select Mode Error "
}
QAMoveTo ${Wire_X} ${Wire_Y}
QAMoveTo ${Wire_X} ${Wire_Y}
QAUpdateLights
checkcolor ${Wire_X} ${Wire_Y} 0 1 1
# Check Face color
QAMoveTo 1 1
QAMoveTo 1 1
set SetSelectMode 4
OCC74_set b ${SetSelectMode}
set GetSelectMode [OCC74_get b]
if { ${GetSelectMode} != ${SetSelectMode} } then {
puts "Select Mode = ${GetSelectMode}"
puts "OCC74: Get Select Mode Error "
}
QAMoveTo ${Face_X} ${Face_Y}
QAMoveTo ${Face_X} ${Face_Y}
QAUpdateLights
checkcolor ${Face_X} ${Face_Y} 0 1 1
# Check Shell color
QAMoveTo 1 1
QAMoveTo 1 1
set SetSelectMode 5
OCC74_set b ${SetSelectMode}
set GetSelectMode [OCC74_get b]
if { ${GetSelectMode} != ${SetSelectMode} } then {
puts "Select Mode = ${GetSelectMode}"
puts "OCC74: Get Select Mode Error "
}
QAMoveTo ${Shell_X} ${Shell_Y}
QAMoveTo ${Shell_X} ${Shell_Y}
QAUpdateLights
checkcolor ${Shell_X} ${Shell_Y} 0 1 1
# Check Solid color
QAMoveTo 1 1
QAMoveTo 1 1
set SetSelectMode 6
OCC74_set b ${SetSelectMode}
set GetSelectMode [OCC74_get b]
if { ${GetSelectMode} != ${SetSelectMode} } then {
puts "Select Mode = ${GetSelectMode}"
puts "OCC74: Get Select Mode Error "
}
QAMoveTo ${Solid_X} ${Solid_Y}
QAMoveTo ${Solid_X} ${Solid_Y}
QAUpdateLights
checkcolor ${Solid_X} ${Solid_Y} 0 1 1
### THIRD PART
set SetSelectMode -1
OCC74_set b ${SetSelectMode}
set GetSelectMode [OCC74_get b]
if { ${GetSelectMode} != ${SetSelectMode} } then {
puts "Select Mode = ${GetSelectMode}"
puts "OCC74: Get Select Mode Error "
}
# Check Shape color
QAMoveTo 1 1
QAMoveTo 1 1
QAMoveTo ${Shape_X} ${Shape_Y}
QAMoveTo ${Shape_X} ${Shape_Y}
QAUpdateLights
checkcolor ${Shape_X} ${Shape_Y} 1 1 0
# Check Vertex color
QAMoveTo 1 1
QAMoveTo 1 1
QAMoveTo ${Vertex_X} ${Vertex_Y}
QAMoveTo ${Vertex_X} ${Vertex_Y}
QAUpdateLights
checkcolor ${Vertex_X} ${Vertex_Y} 1 1 0
# Check Edge color
QAMoveTo 1 1
QAMoveTo 1 1
QAMoveTo ${Edge_X} ${Edge_Y}
QAMoveTo ${Edge_X} ${Edge_Y}
QAUpdateLights
checkcolor ${Edge_X} ${Edge_Y} 1 1 0
# Check Wire color
QAMoveTo 1 1
QAMoveTo 1 1
QAMoveTo ${Wire_X} ${Wire_Y}
QAMoveTo ${Wire_X} ${Wire_Y}
QAUpdateLights
checkcolor ${Wire_X} ${Wire_Y} 1 1 0
# Check Face color
QAMoveTo 1 1
QAMoveTo 1 1
QAMoveTo ${Face_X} ${Face_Y}
QAMoveTo ${Face_X} ${Face_Y}
QAUpdateLights
checkcolor ${Face_X} ${Face_Y} 1 1 0
# Check Shell color
QAMoveTo 1 1
QAMoveTo 1 1
QAMoveTo ${Shell_X} ${Shell_Y}
QAMoveTo ${Shell_X} ${Shell_Y}
QAUpdateLights
checkcolor ${Shell_X} ${Shell_Y} 1 1 0
# Check Solid color
QAMoveTo 1 1
QAMoveTo 1 1
QAMoveTo ${Solid_X} ${Solid_Y}
QAMoveTo ${Solid_X} ${Solid_Y}
QAUpdateLights
checkcolor ${Solid_X} ${Solid_Y} 1 1 0
set only_screen 1