1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-16 10:54:53 +03:00
occt/tests/bugs/vis/bug23153
ski ccadc126ba 0023493: Incorrect QAGetPixelColor usage
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
2014-12-11 16:48:05 +03:00

69 lines
1.2 KiB
Plaintext
Executable File

puts "============"
puts "OCC23153"
puts "============"
puts ""
#######################################################################
# BRepMesh can't apply a mesh for a face of attached shape
#######################################################################
pload XDE
set BugNumber OCC23153
set TheFileName OCC23153-long_furrowed_shape.stp
decho off
stepread [locate_data_file $TheFileName] a *
decho on
tpcompound result
set square 14684.4
set nb_v_good 1152
set nb_e_good 1735
set nb_w_good 635
set nb_f_good 581
set nb_sh_good 1
set nb_sol_good 1
set nb_compsol_good 0
set nb_compound_good 1
set nb_shape_good 4106
vinit
vsetdispmode 1
vdisplay result
vtop
vfit
set status 0
set x1 223
set y1 195
if { "[vreadpixel $x1 $y1 rgb name]" == "BLACK" } {
set status 1
puts "Faulty Color1"
}
set x2 224
set y2 240
if { "[vreadpixel $x2 $y2 rgb name]" == "BLACK" } {
set status 1
puts "Faulty Color2"
}
set x3 223
set y3 266
if { "[vreadpixel $x3 $y3 rgb name]" == "BLACK" } {
set status 1
puts "Faulty Color3"
}
# Resume
puts ""
if { ${status} == 0 } {
puts "OK ${BugNumber}"
} else {
puts "Faulty ${BugNumber}"
}
set only_screen 1