1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00
Files
occt/tests/bugs/vis/bug85_2

79 lines
1.7 KiB
Plaintext
Executable File

puts "==========="
puts "BUC60918"
puts "OCC85"
puts "==========="
puts ""
###############################
## Shape drawn in transparency mode does not always eclipse another shapes
###############################
puts "=================================="
puts "It takes visual check for this BUG"
puts "=================================="
pload OCAF
restore [locate_data_file buc60918-psm1.brep] psm1
restore [locate_data_file buc60918-psm2.brep] psm2
restore [locate_data_file buc60918-shl.brep] shl
NewDocument D
SetShape D 0:1:1 shl
SetShape D 0:1:2 psm1
SetShape D 0:1:3 psm2
AISSet D 0:1:1 NS
AISSet D 0:1:2 NS
AISSet D 0:1:3 NS
AISInitViewer D
AISMaterial D 0:1:1 plastic
AISMaterial D 0:1:2 plastic
AISMaterial D 0:1:3 plastic
AISTransparency D 0:1:1 0.6
AISColor D 0:1:1 1
AISDisplay D 0:1:1
AISDisplay D 0:1:2
AISDisplay D 0:1:3
vsetdispmode 1
box b 10 10 10
SetShape D 0:1:4 b
AISSet D 0:1:4 NS
AISDisplay D 0:1:4
vfit
if { [array get env os_type] != "" } {
set os $env(os_type)
}
if { [string compare $os "windows"] == 0 } {
set x1 231
set y1 170
set rd_ch1 76078
set gr_ch1 53725
set bl_ch1 8627
} else {
set x1 263
set y1 140
set rd_ch1 76862
set gr_ch1 54117
set bl_ch1 9019
}
set color1 [QAGetPixelColor ${x1} ${y1}]
regexp {RED +: +([-0-9.+eE]+)} $color1 full rd1
regexp {GREEN +: +([-0-9.+eE]+)} $color1 full gr1
regexp {BLUE +: +([-0-9.+eE]+)} $color1 full bl1
set rd_int1 [expr int($rd1 * 1.e+05)]
set gr_int1 [expr int($gr1 * 1.e+05)]
set bl_int1 [expr int($bl1 * 1.e+05)]
if { ${rd_int1} != ${rd_ch1} || ${gr_int1} != ${gr_ch1} || ${bl_int1} != ${bl_ch1} } {
puts "Error : colors are not equal"
}
set only_screen 1