mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
The table of named colors has been compressed and moved out from Quantity_Color.cxx into Quantity_ColorTable.pxx. Quantity_NameOfColor - grayscale enumeration values have been re-ordered to fix discontinuity. Duplicating colors has been merged within enumeration: CHARTREUSE=CHARTREUSE1, GOLD=GOLD1, GREEN=GREEN1, ORANGE=ORANGE1, ORANGERED=ORANGERED1, RED=RED1, TOMATO=TOMATO1, YELLOW=YELLOW1. Added aliases to several other common colors: BLUE=BLUE1, CYAN=CYAN1, LIGHTCYAN=LIGHTCYAN1, MAGENTA=MAGENTA1. Quantity_Color class definition has been cleaned to follow OCCT coding style. Quantity_Color now stores NCollection_Vec3<float> as class field instead of separate components. Removed unused class Quantity_ColorDefinitionError. New methods Quantity_Color::Convert_LinearRGB_To_sRGB() and Quantity_Color::Convert_sRGB_To_LinearRGB() converting RGB components from linear to non-linear sRGB colorspace and vice versa. Image_PixMap::PixelColor() and Image_PixMap::SetPixelColor() methods have been extended with an optional argument for performing linearization/delinearization of 8-bit sRGB pixel formats. Draw Harness command AISColor has been corrected to take color name instead of enumeration index.
35 lines
1.7 KiB
Plaintext
35 lines
1.7 KiB
Plaintext
puts "========"
|
|
puts "0029295: Visualization, TKOpenGl - provide distance culling option"
|
|
puts "Check distance culling"
|
|
puts "========"
|
|
|
|
set THE_NB_BOXES 5
|
|
set THE_COLORS { RED GREEN BLUE YELLOW PURPLE1 }
|
|
set THE_PICK_PNTS1 { { 20 80 } { 60 110 } { 120 140 } { 200 180 } { 300 240 } }
|
|
set THE_PICK_PNTS2 { { 110 140 } { 130 150 } { 160 170 } { 200 190 } { 240 210 } }
|
|
|
|
pload MODELING VISUALIZATION
|
|
vclear
|
|
vinit View1
|
|
vaxo
|
|
vcamera -persp
|
|
for { set x 0 } { $x < $THE_NB_BOXES } { incr x } { box b$x $x 0 0 0.5 0.2 0.4; vpoint p$x $x 0 0; vdisplay -mutable p$x; vdisplay -dispMode 1 b$x }
|
|
for { set x 0 } { $x < $THE_NB_BOXES } { incr x } { vsetcolor b$x [lindex $THE_COLORS $x] }
|
|
vline l 0 0 0 5 0 0
|
|
vdisplay -mutable l
|
|
vfit
|
|
vzlayer default -culldist 7
|
|
for { set x 0 } { $x < $THE_NB_BOXES } { incr x } { if { [vreadpixel {*}[lindex $THE_PICK_PNTS1 $x] rgb name] == "BLACK" } { puts "Error: object is culled" } }
|
|
vdump $::imagedir/${::casename}_7.png
|
|
|
|
vzlayer default -culldist 5
|
|
for { set x 2 } { $x < $THE_NB_BOXES } { incr x } { if { [vreadpixel {*}[lindex $THE_PICK_PNTS1 $x] rgb name] == "BLACK" } { puts "Error: object is culled" } }
|
|
for { set x 0 } { $x < 2 } { incr x } { if { [vreadpixel {*}[lindex $THE_PICK_PNTS1 $x] rgb name] != "BLACK" } { puts "Error: object is NOT culled" } }
|
|
vdump $::imagedir/${::casename}_5.png
|
|
|
|
vzoom 0.5
|
|
vzlayer default -culldist 10
|
|
for { set x 1 } { $x < $THE_NB_BOXES } { incr x } { if { [vreadpixel {*}[lindex $THE_PICK_PNTS2 $x] rgb name] == "BLACK" } { puts "Error: object is culled" } }
|
|
for { set x 0 } { $x < 1 } { incr x } { if { [vreadpixel {*}[lindex $THE_PICK_PNTS2 $x] rgb name] != "BLACK" } { puts "Error: object is NOT culled" } }
|
|
vdump $::imagedir/${::casename}_10.png
|