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

55 lines
1.2 KiB
Plaintext
Executable File

puts "============"
puts "OCC7186"
puts "============"
puts ""
######################################################
# Selecting an empty space with rectangle doesn't clear
# the current selection, when there is an opened local context
######################################################
set BugNumber OCC7186
set mistake 0
box b 10 10 10
vinit
vdisplay b
vfit
vselmode 2 1
vselect 1 1 407 407
set NbSelected1 [vnbselected]
if { ${NbSelected1} != 12 } {
puts "Bad number of selected edges after rectangle selection all edges"
set mistake 1
}
vselect 10 10 20 20
set NbSelected2 [vnbselected]
if { ${NbSelected2} != 0 } {
puts "Error : Bad number of selected edges after rectangle selection an empty space"
set mistake 1
}
set x [list 125 204 283 29 111 298 379 125 204 283 125 283]
set y [list 47 100 47 200 150 150 200 250 300 250 361 361]
vaspects -setwidth 5
puts ""
for {set i 0} {$i < 12} {incr i} {
if { [vreadpixel [lindex ${x} $i] [lindex ${y} $i] rgb name] != "YELLOW" } {
set mistake 1
}
}
puts ""
if { ${mistake} == 1 } {
puts "${BugNumber}: Faulty"
} else {
puts "${BugNumber}: OK"
}
checkview -screenshot -3d -path ${imagedir}/${test_image}.png