puts "========"
-puts "OCC26379"
+puts "0026379: Wrong result produced by the volume maker algorithm"
puts "========"
puts ""
-#######################################################
-# Wrong result produced by the volume maker algorithm
-#######################################################
restore [locate_data_file OCC26379-csf_2.brep] cf
mkvolume result cf -ni
-vinit
-vsetdispmode 1
-vdisplay result
+vclear
+vinit View1
+vdisplay -dispMode 1 result
vfit
-set bug_info [vreadpixel 350 310 name]
-if {$bug_info != "DARKGOLDENROD3 1"} {
- puts "ERROR: OCC26379 is reproduced. Volume is incorrect."
-}
+if { [vreadpixel 350 310 -rgb -name] == "BLACK" } { puts "ERROR: OCC26379 is reproduced. Volume is incorrect." }
checkprops result -s 6.60933e+006
checkshape result
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
+vdump ${imagedir}/${test_image}.png
puts "========"
-puts "OCC26379"
+puts "0026379: Wrong result produced by the volume maker algorithm"
puts "========"
puts ""
-#######################################################
-# Wrong result produced by the volume maker algorithm
-#######################################################
restore [locate_data_file OCC26379-csf_3.brep] cf
mkvolume result cf -ni
-vinit
-vsetdispmode 1
-vdisplay result
+vclear
+vinit View1
+vdisplay -dispMode 1 result
vfit
-set bug_info [vreadpixel 350 310 name]
-if {$bug_info != "DARKGOLDENROD3 1"} {
- puts "ERROR: OCC26379 is reproduced. Volume is incorrect."
-}
+if { [vreadpixel 350 310 -rgb -name] == "BLACK" } { puts "ERROR: OCC26379 is reproduced. Volume is incorrect." }
checkprops result -s 7.22211e+006
checkshape result
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
+vdump ${imagedir}/${test_image}.png
}
# Check colors
-set color [XGetShapeColor DD 0:1:1:3 surf]
-if {$color != "RED"} {
- puts "Error: wrong color."
-}
-set color [XGetShapeColor DD 0:1:1:4 surf]
-if {$color != "DARKORANGE1"} {
- puts "Error: wrong color."
-}
+if {[XGetShapeColor DD 0:1:1:3 surf] != "RED"} { puts "Error: wrong color." }
+if {[XGetShapeColor DD 0:1:1:4 surf] != "DARKGOLDENROD1"} { puts "Error: wrong color." }
Close D
Close DD
vfit
vselprops selHighlight -dispMode -1
vselect 0 0 400 400 1
-if { [vreadpixel 50 300 rgb name] != "GRAY66" } { puts "Error: b1 should be selected."}
-if { [vreadpixel 300 200 rgb name] != "GRAY66" } { puts "Error: b2 should be selected."}
+if { [vreadpixel 50 300 rgb name] != "GRAY73" } { puts "Error: b1 should be selected."}
+if { [vreadpixel 300 200 rgb name] != "GRAY73" } { puts "Error: b2 should be selected."}
vselect 200 200
-if { [vreadpixel 50 300 rgb name] != "DARKGOLDENROD3" } { puts "Error: b1 should not be selected."}
-if { [vreadpixel 300 200 rgb name] != "GRAY66" } { puts "Error: b2 should be selected."}
+if { [vreadpixel 50 300 rgb name] != "DARKGOLDENROD" } { puts "Error: b1 should not be selected."}
+if { [vreadpixel 300 200 rgb name] != "GRAY73" } { puts "Error: b2 should be selected."}
vdump $imagedir/${casename}.png
+++ /dev/null
-puts "============"
-puts "OCC22879"
-puts "============"
-puts ""
-#######################################################################
-# Possible bug in Opengl_togl_begin_layer_mode.cxx
-#######################################################################
-
-vfont add [locate_data_file DejaVuSans.ttf] SansFont
-
-set BugNumber OCC22879
-
-vinit
-
-vdrawtext t1 "Text Height=14" -2d -perspos -1 1 -pos 10 -10 0 -height 14 -color WHITE -font SansFont
-vdrawtext t2 "Text Height=25" -2d -perspos -1 1 -pos 10 -40 0 -height 25 -color WHITE -font SansFont
-vdrawtext t3 "Arial" -2d -perspos -1 1 -pos 10 -60 0 -height 18 -font SansFont -color RED
-vdrawtext t4 "Times New Roman" -2d -perspos -1 1 -pos 10 -80 0 -height 18 -font SansFont -color BLUE
-vdrawtext t5 "Subtitle" -2d -perspos -1 1 -pos 10 -110 0 -height 20 -font SansFont -color GREEN -disptype subtitle -subcolor 0.3 0.3 0.3
-vdrawtext t6 "Decal" -2d -perspos -1 1 -pos 10 -140 0 -height 20 -font SansFont -color BLUE -disptype decal -subcolor 1 0 0
-vdrawtext t7 "Blend" -2d -perspos -1 1 -pos 10 -170 0 -height 20 -font SansFont -color RED -disptype blend
-box b 50 -700 450 50 50 50
-vdisplay b
-vsetdispmode 1
-vsetcolor b ANTIQUEWHITE
-
-checkcolor 24 55 0.753 0.000 0.000
-checkcolor 16 76 0.000 0.000 1.000
-checkcolor 25 107 0.000 1.000 0.000
-checkcolor 34 114 0.298 0.298 0.298
-checkcolor 24 131 0.922 0.000 0.000
-checkcolor 18 139 0.145 0.000 0.855
-checkcolor 56 160 1.000 0.000 0.000
-checkcolor 30 160 0.188 0.761 0.698
-
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
set aWireColor [vreadpixel 54 150 rgb name]
set anEdgeColor [vreadpixel 100 90 rgb name]
set aFaceColor [vreadpixel 30 200 rgb name]
-if {"$aWireColor" != "HOTPINK"} {
- puts "Error: wrong Wire color"
-}
-if {"$anEdgeColor" != "RED"} {
- puts "Error: wrong Edge color"
-}
-if {"$aFaceColor" != "GRAY62"} {
- puts "Error: wrong Face color"
-}
+if {"$aWireColor" != "HOTPINK"} { puts "Error: wrong Wire color" }
+if {"$anEdgeColor" != "RED"} { puts "Error: wrong Edge color" }
+if {"$aFaceColor" != "GRAY69"} { puts "Error: wrong Face color" }
# create default color scale
vcolorscale cs1 -demo -xy 0 0
-foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 180 CHARTREUSE2 220 GREEN 250 MEDIUMSPRINGGREEN 290 CYAN 330 DODGERBLUE1 370 BLUE} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
+foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 220 GREEN 250 SPRINGGREEN 290 CYAN 330 DODGERBLUE1 370 BLUE} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
# reduce color scale range and number of intervals
vcolorscale cs2 -range 0 20 5 -xy 60 0
vcolorscale cs4 -color 5 pink
vcolorscale cs4 -label 6 "last"
vcolorscale cs4 -title "My color scale"
-foreach {y aColor} {60 PINK 120 RED 200 GREEN 280 BLUE 350 SLATEBLUE} { if { [vreadpixel 215 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
+foreach {y aColor} {60 PINK 120 RED 200 GREEN 280 BLUE 350 MEDIUMPURPLE2} { if { [vreadpixel 215 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
vdump ${imagedir}/${casename}.png
puts "========"
-puts "OCC25340"
+puts "0025340: Visualization, AIS_InteractiveContext - properly apply selection filters at Neutral point"
puts "========"
puts ""
-#############################################################################################
-# Visualization, AIS_InteractiveContext - properly apply selection filters at Neutral point
-#############################################################################################
pload QAcommands
-vinit
+vinit View1
box b 1 2 3
vdisplay b
vfit
vtrihedron t
-set color_1 [vreadpixel 87 25]
+set color_1 [vreadpixel 87 25 -rgb -name]
OCC25340
vselect 87 25
-set color_2 [vreadpixel 87 25]
+set color_2 [vreadpixel 87 25 -rgb -name]
if {$color_2 != $color_1} {
puts "ERROR: OCC25340 is reproduced"
puts " final color of trihedron is: $color_2"
}
-if {$color_2 != "0.43137255311012268 0.48235294222831726 0.54509806632995605 1"} {
+if {$color_2 != "LIGHTSTEELBLUE4"} {
puts "ERROR: OCC25340 is reproduced"
puts " additional investigation is needed"
- puts " expected color is: 0.43137255311012268 0.48235294222831726 0.54509806632995605 1"
- puts " current color is: $_color_2"
+ puts " expected color is: LIGHTSTEELBLUE4"
+ puts " current color is: $color_2"
}
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
+vdump ${imagedir}/${test_image}.png
box b 0 0 0 1 2 3
# prepare view
-vinit View1
vclear
+vinit View1
vglinfo
-vsetdispmode 1
vaxo
-vdisplay b
+vdisplay -dispMode 1 b
vfit
# customize object
vaspects b -setmaterial PLASTIC
# validate results
-set aFaceColor [vreadpixel 128 256 rgb name]
-if {"$aFaceColor" != "RED4"} {
- puts "Error: wrong Face color"
-}
+if { [vreadpixel 128 256 -rgb -name] != "BROWN"} { puts "Error: wrong Face color" }
puts "============"
puts ""
-vinit View1
vclear
+vinit View1
box b 1 2 3
vaxo
-vsetdispmode 1
-vdisplay b
+vdisplay -dispMode 1 b
vtexture b 1 -modulate on
vfit
set aColorDec [vreadpixel 290 180 rgb name]
vdump $imagedir/${casename}_decal.png
-if {"$aColorMod" != "GOLDENROD4"} {
- puts "Error: wrong color with modulation ON"
-}
-if {"$aColorDec" != "GRAY80"} {
- puts "Error: wrong color with modulation OFF"
-}
+if {"$aColorMod" != "GOLD4"} { puts "Error: wrong color with modulation ON" }
+if {"$aColorDec" != "GRAY91"} { puts "Error: wrong color with modulation OFF" }
set aShapeTriang $imagedir/${casename}_shape_triangulation.png
set aDiff $imagedir/${casename}_diff.png
-vinit View1
vclear
+vinit View1
vaxo
vsetdispmode 1
vmoveto 250 347
set aColorV2B1 [vreadpixel 50 250 rgb name]
-if { $aColorV2B1 != "BLACK" } {
- puts "Error: box b1 (red) should NOT be visible in View2!"
-}
+if { $aColorV2B1 != "BLACK" } { puts "Error: box b1 (red) should NOT be visible in View2!" }
set aColorV2B2 [vreadpixel 200 350 rgb name]
-if { $aColorV2B2 != "GREEN3" } {
- puts "Error: box b2 (green) should be visible in View2!"
-}
+if { $aColorV2B2 != "GREEN2" } { puts "Error: box b2 (green) should be visible in View2!" }
set aColorV2B3 [vreadpixel 250 200 rgb name]
-if { $aColorV2B3 != "DARKGOLDENROD3" } {
- puts "Error: box b3 (goldenrod) should be visible in View2!"
-}
+if { $aColorV2B3 != "DARKGOLDENROD" } { puts "Error: box b3 (goldenrod) should be visible in View2!" }
vdump $imagedir/${casename}_v2.png
vactivate View1
vfit
set aColorV1B1 [vreadpixel 50 250 rgb name]
-if { $aColorV1B1 != "RED3" } {
- puts "Error: box b1 (red) should be visible in View1!"
-}
+if { $aColorV1B1 != "RED2" } { puts "Error: box b1 (red) should be visible in View1!" }
set aColorV1B2 [vreadpixel 200 350 rgb name]
-if { $aColorV1B2 != "BLACK" } {
- puts "Error: box b2 (green) should NOT be visible in View1!"
-}
+if { $aColorV1B2 != "BLACK" } { puts "Error: box b2 (green) should NOT be visible in View1!" }
set aColorV1B3 [vreadpixel 250 200 rgb name]
-if { $aColorV1B3 != "DARKGOLDENROD3" } {
- puts "Error: box b3 (goldenrod) should be visible in View1!"
-}
+if { $aColorV1B3 != "DARKGOLDENROD" } { puts "Error: box b3 (goldenrod) should be visible in View1!" }
vdump $imagedir/${casename}_v1.png
vselprops dynHighlight -dispMode -1 -transp 0.5 -material PLASTIC
vmoveto 250 250
-if { [vreadpixel 250 250 rgb name] != "PALEGREEN3" } { puts "Error: wrong highlighting color" }
+if { [vreadpixel 250 250 rgb name] != "GRAY58" } { puts "Error: wrong highlighting color" }
vdump $imagedir/${casename}.png
# rotation
vrotate -mouseStart 100 100 -mouseMove 300 300
-if {"[vreadpixel 220 50 rgb name]" != "GOLDENROD2"} { puts "Error: Rotation is not correct" }
+if {"[vreadpixel 220 50 rgb name]" != "DARKGOLDENROD3"} { puts "Error: Rotation is not correct" }
vdump ${imagedir}/${casename}.png
vselect 0 0
# check color
-if {"[vreadpixel ${x_check_coord} ${y_check_coord} rgb name]" != "GOLDENROD2"} {
- puts "Error : Rotation is not correct"
-}
+if {"[vreadpixel ${x_check_coord} ${y_check_coord} rgb name]" != "DARKGOLDENROD3"} { puts "Error : Rotation is not correct" }
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
+vdump ${imagedir}/${test_image}.png
set aColor4 [vreadpixel 325 200 rgb name]
# note that aColor2 is not expected to be capped
-if { "$aColor0" != "GRAY61" || "$aColor1" != "GRAY61" || "$aColor2" == "GRAY61" || "$aColor3" != "GRAY61" || "$aColor4" != "GRAY61" } {
+if { "$aColor0" != "GRAY72" || "$aColor1" != "GRAY72" || "$aColor2" == "GRAY72" || "$aColor3" != "GRAY72" || "$aColor4" != "GRAY72" } {
puts "Error: capping color does not match"
}
vfit
vselect 40 120 185 320
-set aColor [vreadpixel 120 200 rgb name]
-if {$aColor != "DARKGOLDENROD3"} {
- puts "ERROR: the circle is selected with no overlap mode activated"
-}
+if {[vreadpixel 120 200 rgb name] != "DARKGOLDENROD"} { puts "ERROR: the circle is selected with no overlap mode activated" }
vselect 0 0
vselect 40 120 185 320 -allowoverlap 1
-set aColor [vreadpixel 120 200 rgb name]
-if {$aColor != "GRAY66"} {
- puts "ERROR: the circle is not selected with overlap mode activated"
-}
+if {[vreadpixel 120 200 rgb name] != "GRAY73"} { puts "ERROR: the circle is not selected with overlap mode activated" }
vdump ${imagedir}/${casename}.png
vselect 0 0
vselect 387 77
-if { [vreadpixel 387 77 rgb name] != "GRAY66" } { puts "Error picking zoom persistence object(s)" }
+if { [vreadpixel 387 77 rgb name] != "GRAY73" } { puts "Error picking zoom persistence object(s)" }
vselect 0 0
vselect 330 120 410 50
-if { [vreadpixel 387 77 rgb name] != "GRAY66" || [vreadpixel 352 96 rgb name] != "GRAY66" } { puts "Error selecting zoom persistence object(s)" }
+if { [vreadpixel 387 77 rgb name] != "GRAY73" || [vreadpixel 352 96 rgb name] != "GRAY73" } { puts "Error selecting zoom persistence object(s)" }
# 2) Rotate persistence
vsetmaterial br PLASTIC
vselect 0 0
vselect 160 200
-if { [vreadpixel 160 180 rgb name] != "WHITE" } { puts "Error picking rotate persistence object" }
+if { [vreadpixel 160 180 rgb name] != "GRAY89" } { puts "Error picking rotate persistence object" }
vselect 0 0
vselect 130 230 190 170
-if { [vreadpixel 160 180 rgb name] != "WHITE" } { puts "Error selecting rotate persistence object" }
+if { [vreadpixel 160 180 rgb name] != "GRAY89" } { puts "Error selecting rotate persistence object" }
# 3) Zoom + Rotate persistence
vsetmaterial bzr PLASTIC
vselect 0 0
vselect 250 90
-if { [vreadpixel 250 90 rgb name] != "WHITE" } { puts "Error picking zoom-rotate persistence object" }
+if { [vreadpixel 250 90 rgb name] != "GRAY89" } { puts "Error picking zoom-rotate persistence object" }
vselect 0 0
vselect 200 70 286 110
-if { [vreadpixel 250 90 rgb name] != "WHITE" } { puts "Error selecting zoom-rotate persistence object" }
+if { [vreadpixel 250 90 rgb name] != "GRAY89" } { puts "Error selecting zoom-rotate persistence object" }
# 4) Trihedron persistence
vdisplay bt -dispMode 1 -highMode 1 -trsfPers trihedron -trsfPersPos -1 -1 62
vselect 0 0
vselect 132 300
-if { [vreadpixel 132 300 rgb name] != "GRAY66" } { puts "Error picking trihedron persistence object" }
+if { [vreadpixel 132 300 rgb name] != "GRAY73" } { puts "Error picking trihedron persistence object" }
vselect 0 0
vselect 50 223 235 395
-if { [vreadpixel 132 300 rgb name] != "GRAY66" } { puts "Error selecting trihedron persistence object" }
+if { [vreadpixel 132 300 rgb name] != "GRAY73" } { puts "Error selecting trihedron persistence object" }
vselect 50 410 410 50
vstate -entities
vfit
vpan 200 0
vmoveto 399 200
-if { [vreadpixel 399 200 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after forward panning in View1" }
+if { [vreadpixel 399 200 rgb name] != "CYAN2" } { puts "Error: incorrect color after forward panning in View1" }
vpan -200 0
vmoveto 200 200
-if { [vreadpixel 200 200 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after backward panning in View1" }
+if { [vreadpixel 200 200 rgb name] != "CYAN2" } { puts "Error: incorrect color after backward panning in View1" }
vdump ${imagedir}/${casename}_1.png
# Test panning with aspect ratio 1:2
vfit
vpan 100 0
vmoveto 199 100
-if { [vreadpixel 199 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after forward panning in View2" }
+if { [vreadpixel 199 100 rgb name] != "CYAN2" } { puts "Error: incorrect color after forward panning in View2" }
vpan -100 0
vmoveto 100 100
-if { [vreadpixel 100 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after backward panning in View2" }
+if { [vreadpixel 100 100 rgb name] != "CYAN2" } { puts "Error: incorrect color after backward panning in View2" }
vdump ${imagedir}/${casename}_2.png
# Test panning with aspect ratio 2:1
vfit
vpan 200 0
vmoveto 399 100
-if { [vreadpixel 399 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after forward panning in View3" }
+if { [vreadpixel 399 100 rgb name] != "CYAN2" } { puts "Error: incorrect color after forward panning in View3" }
vpan -200 0
vmoveto 200 100
-if { [vreadpixel 200 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after backward panning in View3" }
+if { [vreadpixel 200 100 rgb name] != "CYAN2" } { puts "Error: incorrect color after backward panning in View3" }
vdump ${imagedir}/${casename}_3.png
puts "============"
-puts "CR26680"
+puts "0026680: Visualization - Changed behavior of mesh visualization and selection in OMF sample""
puts "============"
puts ""
-##########################################################################################
-puts "Visualization - Changed behavior of mesh visualization and selection in OMF sample"
-##########################################################################################
-
pload VISUALIZATION XDE
-vinit
+vinit View1
meshfromstl m [locate_data_file bug26680.stl]
meshcolors m elem2 1
vselmode 0 1
vmoveto 200 200
-if {[vreadpixel 197 257 rgb name] != "CYAN"} {
- puts "ERROR: presentation for dynamic highlight of the object is wrong!"
-}
+if {[vreadpixel 197 257 rgb name] != "CYAN"} { puts "ERROR: presentation for dynamic highlight of the object is wrong!" }
vmoveto 0 0
-if {[vreadpixel 197 257 rgb name] != "BLUE2"} {
- puts "ERROR: the object is not unhighlighted after dynamic highlight!"
-}
+if {[vreadpixel 197 257 rgb name] != "BLUE"} { puts "ERROR: the object is not unhighlighted after dynamic highlight!" }
vselect 200 200
-if {[vreadpixel 197 257 rgb name] != "GRAY93"} {
- puts "ERROR: presentation for selection highlight is wrong!"
-}
+if {[vreadpixel 197 257 rgb name] != "GRAY86"} { puts "ERROR: presentation for selection highlight is wrong!" }
vselect 0 0
-if {[vreadpixel 197 257 rgb name] != "BLUE2"} {
- puts "ERROR: the object is not unhighlighted after selection highlight!"
-}
+if {[vreadpixel 197 257 rgb name] != "BLUE"} { puts "ERROR: the object is not unhighlighted after selection highlight!" }
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
+vdump ${imagedir}/${test_image}.png
puts "============"
-puts "CR26719"
+puts "0026719: Visualization - cannot pick zoom persistent object"
puts "============"
puts ""
-##########################################################################################
-puts "Visualization - cannot pick zoom persistent object"
-##########################################################################################
-
pload VISUALIZATION MODELING
-vinit
+vinit View1
vsetdispmode 1
restore [locate_data_file face1.brep] f
# with dynamic highlight color, check that the face is
# not highlighted
vmoveto 280 290
-if {[vreadpixel 297 297 name] != "CYAN 1"} {
- puts "ERROR: zoom persistent box is not highlighted dynamically!"
-}
-if {[vreadpixel 372 210 name] != "GOLDENROD1 1"} {
- puts "ERROR: the shape behind zoom persistent object was highlighted instead!"
-}
+if {[vreadpixel 297 297 -rgb -name] != "CYAN"} { puts "ERROR: zoom persistent box is not highlighted dynamically!" }
+if {[vreadpixel 372 210 -rgb -name] != "DARKGOLDENROD3"} { puts "ERROR: the shape behind zoom persistent object was highlighted instead!" }
vdump ${imagedir}/${casename}_1.png
vmoveto 0 0
# will be highlighted dynamically
vmoveto 264 135
-if {[vreadpixel 275 142 name] != "CYAN 1"} {
- puts "ERROR: zoom persistent box is not highlighted dynamically in precision test!"
-}
-if {[vreadpixel 243 123 name] != "LIGHTGOLDENROD1 1"} {
- puts "ERROR: the shape behind zoom persistent object was highlighted instead in precision test!"
-}
+if {[vreadpixel 275 142 -rgb -name] != "CYAN"} { puts "ERROR: zoom persistent box is not highlighted dynamically in precision test!" }
+if {[vreadpixel 243 123 -rgb -name] != "BURLYWOOD2"} { puts "ERROR: the shape behind zoom persistent object was highlighted instead in precision test!" }
vdump ${imagedir}/${casename}_2.png
vmoveto 0 0
# move to a point on the face and check if it
# will be highlighted dynamically
vmoveto 259 135
-if {[vreadpixel 275 142 name] != "GOLDENROD3 1"} {
- puts "ERROR: zoom persistent box is highlighted instead in precision test!"
-}
-if {[vreadpixel 243 123 name] != "CYAN 1"} {
- puts "ERROR: the shape behind zoom persistent object was not highlighted dynamically in precision test!"
-}
+if {[vreadpixel 275 142 -rgb -name] != "DARKGOLDENROD"} { puts "ERROR: zoom persistent box is highlighted instead in precision test!" }
+if {[vreadpixel 243 123 -rgb -name] != "CYAN"} { puts "ERROR: the shape behind zoom persistent object was not highlighted dynamically in precision test!" }
vdump ${imagedir}/${casename}_3.png
-
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
puts "============"
puts ""
-vinit View1
vclear
+vinit View1
vaxo
vsetdispmode 1
box b 1 1 1
vdisplay b
vfit
-vclipplane create pln
-vclipplane set pln view Driver1/Viewer1/View1
-vclipplane change pln equation 0 1 0 -0.5
-vclipplane change pln capping on
+vclipplane pln -set Driver1/Viewer1/View1 -equation 0 1 0 -0.5 -capping on
vdump $imagedir/${casename}_normal.png
set aColorNorm [vreadpixel 200 250 rgb name]
-if { "$aColorNorm" != "GRAY13" } {
- puts "Error: Expected color of capping plane is GRAY13 (normal presentation). Actial is $aColorNorm"
-}
+if { "$aColorNorm" != "GRAY14" } { puts "Error: Expected color of capping plane is GRAY14 (normal presentation). Actial is $aColorNorm" }
vclear
vdump $imagedir/${casename}_connected.png
set aColorConn [vreadpixel 200 250 rgb name]
-if { "$aColorConn" != "GRAY13" } {
- puts "Error: Expected color of capping plane is GRAY13 (connected presentation). Actial is $aColorConn"
-}
+if { "$aColorConn" != "GRAY14" } { puts "Error: Expected color of capping plane is GRAY14 (connected presentation). Actial is $aColorConn" }
puts "========"
-puts "OCC26960"
+puts "0026960: Visualization, TKOpenGl - update transformation of dynamically highlighted presentation"
puts "========"
puts ""
-##################################################################
-puts "Visualization, TKOpenGl - update transformation of dynamically highlighted presentation"
-##################################################################
pload VISUALIZATION MODELING
vfit
vselmode 4 1
vmoveto 250 250
-if {[vreadpixel 350 140 rgb name] != "BLACK"} {
- puts "ERROR: wrong inital location"
-}
+if {[vreadpixel 350 140 rgb name] != "BLACK"} { puts "ERROR: wrong inital location" }
vsetlocation b 0.5 0 0
-if {[vreadpixel 350 140 rgb name] != "DARKTURQUOISE"} {
- puts "ERROR: the transformation was not applied to highlight structure"
-}
+if {[vreadpixel 350 140 rgb name] != "CYAN2"} { puts "ERROR: the transformation was not applied to highlight structure" }
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
+vdump ${imagedir}/${test_image}.png
puts "========"
-puts "OCC27083"
-puts "Visualization, Ray Tracing - shape with visible face boundaries disappears after turning the ray-tracing on"
+puts "0027083: Visualization, Ray Tracing - shape with visible face boundaries disappears after turning the ray-tracing on"
puts "========"
puts ""
vaspects b -setFaceBoundaryDraw 1 -setFaceBoundaryColor RED -setFaceBoundaryWidth 3
vraytrace 1
-if {[vreadpixel 295 255 name] != "GOLDENROD4 0"} {
- puts "ERROR: the box with boundary aspect set is not shown in ray-tracing mode!"
-}
-
-if {[vreadpixel 105 58 name] != "RED 1"} {
- puts "ERROR: the box's boundaries are not shown in ray-tracing mode!"
-}
+if {[vreadpixel 295 255 -rgb -name] != "SIENNA"} { puts "ERROR: the box with boundary aspect set is not shown in ray-tracing mode!" }
+if {[vreadpixel 105 58 -rgb -name] != "RED"} { puts "ERROR: the box's boundaries are not shown in ray-tracing mode!" }
vdump $imagedir/${casename}.png
puts "========"
-puts "OCC27536"
+puts "0027536: Visualization - incorrect behavior of zoom persisted objects"
puts "========"
puts ""
-##################################################################
-puts "Visualization - incorrect behavior of zoom persisted objects"
-##################################################################
-set anImage1 $imagedir/${casename}_1.png
-set anImage2 $imagedir/${casename}_2.png
-
-vinit
vclear
+vinit View1
vaxo
box b -50 -50 -50 100 100 100
vdisplay b -trsfPers zoom -trsfPersPos 0 0 0 -dispmode 1
-
-vdump $anImage1
+vdump $imagedir/${casename}_1.png
vinit View2 w=200 h=400
vaxo
vfit
# Check that box was't resized in small view
-if {[vreadpixel 165 200 name] != "DARKGOLDENROD3 1"} {
- puts "ERROR: zoom persistent box is resized on view sizes changed!"
-}
+if {[vreadpixel 165 200 -rgb -name] != "DARKGOLDENROD"} { puts "ERROR: zoom persistent box is resized on view sizes changed!" }
-vdump $anImage2
+vdump $imagedir/${casename}_2.png
vselmode pp 0 0
vmoveto 245 190
-if { [vreadpixel 235 140 rgb name] == "DARKTURQUOISE" } { puts "Error: top should NOT be highlighted" }
-if { [vreadpixel 235 190 rgb name] != "DARKTURQUOISE" } { puts "Error: bottom should be highlighted" }
+if { [vreadpixel 235 140 rgb name] == "CYAN2" } { puts "Error: top should NOT be highlighted" }
+if { [vreadpixel 235 190 rgb name] != "CYAN2" } { puts "Error: bottom should be highlighted" }
vseldump $imagedir/${casename}_sel_depth.png -type depth
vseldump $imagedir/${casename}_sel_entity.png -type entity
vmoveto 0 0
vmoveto 245 190
-if { [vreadpixel 235 140 rgb name] == "DARKTURQUOISE" } { puts "Error: top should NOT be highlighted" }
-if { [vreadpixel 235 190 rgb name] != "DARKTURQUOISE" } { puts "Error: bottom should be highlighted" }
+if { [vreadpixel 235 140 rgb name] == "CYAN2" } { puts "Error: top should NOT be highlighted" }
+if { [vreadpixel 235 190 rgb name] != "CYAN2" } { puts "Error: bottom should be highlighted" }
vseldump $imagedir/${casename}_perps_sel_depth.png -type depth
vseldump $imagedir/${casename}_persp_sel_entity.png -type entity
puts "========"
-puts "OCC27629"
+puts "0027629: Visualization - apply a correct model-world matrix to normals in fixed function pipeline with enabled zoom persistence"
puts "========"
puts ""
-##############################################################################################################################
-puts "Visualization - apply a correct model-world matrix to normals in fixed function pipeline with enabled zoom persistence."
-##############################################################################################################################
-vinit
+vinit View1
box b0 25 25 25
-vsetdispmode 1
-vdisplay b0 -trsfPers zoom
+vdisplay b0 -dispMode 1 -trsfPers zoom
vzoom 10
-if { [vreadpixel 220 200 name] != "DARKGOLDENROD3 1"} {
- puts "Error: normals aren't normalized!"
-}
+if { [vreadpixel 220 200 -rgb -name] != "DARKGOLDENROD"} { puts "Error: normals aren't normalized!" }
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
+vdump ${imagedir}/${test_image}.png
vmoveto 110 385
vselect 110 385
set aColor [vreadpixel 110 385 rgb name]
-if { $aColor != "WHITE" } { puts "Error: wrong object is highlighted" }
+if { $aColor != "GRAY89" } { puts "Error: wrong object is highlighted" }
vmoveto 0 0
set aSelColor [vreadpixel 100 300 rgb name]
-if { $aSelColor != "GRAY72"} { puts "Error: wrong object has been selected" }
+if { $aSelColor != "GRAY76"} { puts "Error: wrong object has been selected" }
vdisplay -dispMode 0 -osd -2d -trsfPersPos -1 1 v
vdisplay -trsfPers trihedron -trsfPersPos -1 -1 40 -dispMode 1 -highMode 1 b
vselmode b 4 1
vmoveto 50 350
-if { [vreadpixel 50 350 rgb name] != "DARKTURQUOISE" } { puts "Error: face is not highlighted" }
+if { [vreadpixel 50 350 rgb name] != "CYAN2" } { puts "Error: face is not highlighted" }
vdump $imagedir/${casename}.png
vviewparams -scale 6.66 -eye 48 43 -210 -at 50 45 -95
-if { [vreadpixel 100 300 rgb name] != "GRAY74" } { puts "Error: gradient background is not displayed" }
+if { [vreadpixel 100 300 -rgb -name] != "LIGHTSTEELBLUE3" } { puts "Error: gradient background is not displayed" }
vdump $imagedir/${casename}.png
set aColor1 [vreadpixel 320 160 rgb name]
set aColor2 [vreadpixel 80 250 rgb name]
-if { "$aColor1" != "BLACK" } { puts "Error: zoom-persistent object is not clipped" }
-if { "$aColor2" != "GOLDENROD3" } { puts "Error: zoom-persistent object is clipped" }
+if { "$aColor1" != "BLACK" } { puts "Error: zoom-persistent object is not clipped" }
+if { "$aColor2" != "DARKGOLDENROD" } { puts "Error: zoom-persistent object is clipped" }
vdump $imagedir/${casename}.png
vsetlocation b 2 1 0
set aColor1 [vreadpixel 220 200 rgb name]
set aColor2 [vreadpixel 350 220 rgb name]
-if { "$aColor1" != "BLACK" || "$aColor2" != "DARKTURQUOISE" } { puts "Error: dynamic highlighting is not updated" }
+if { "$aColor1" != "BLACK" || "$aColor2" != "CYAN2" } { puts "Error: dynamic highlighting is not updated" }
vdump $imagedir/${casename}.png
vsetlocation b 2 1 0
set aColor1 [vreadpixel 220 200 rgb name]
set aColor2 [vreadpixel 350 220 rgb name]
-if { "$aColor1" != "BLACK" || "$aColor2" != "DARKTURQUOISE" } { puts "Error: dynamic highlighting is not updated" }
+if { "$aColor1" != "BLACK" || "$aColor2" != "CYAN2" } { puts "Error: dynamic highlighting is not updated" }
vdump $imagedir/${casename}.png
# create default color scale
vcolorscale cs1 -demo -smooth 0 -xy 0 0
vcolorscale cs2 -demo -smooth 1 -xy 60 0
-foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 180 CHARTREUSE2 220 GREEN 250 MEDIUMSPRINGGREEN 290 CYAN 330 DODGERBLUE1 370 BLUE} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
-foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 180 CHARTREUSE2 220 GREEN 250 MEDIUMSPRINGGREEN 290 CYAN 330 DODGERBLUE1 370 BLUE} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
+foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 220 GREEN 250 SPRINGGREEN 290 CYAN 330 DODGERBLUE1 370 BLUE} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
+foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 220 GREEN 250 SPRINGGREEN 290 CYAN 330 DODGERBLUE1 370 BLUE} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
# reduce color scale range and number of intervals
vcolorscale cs3 -range 0 20 5 -font 16 -colors white 0 0 1 green 1 0 0 1 1 1 -labels start 1 2 3 4 end -smooth 0 -xy 120 0
# color scale with overridden hue range
vcolorscale cs5 -demo -smooth 0 -hueRange 300 130 -xy 240 0
vcolorscale cs6 -demo -smooth 1 -hueRange 300 130 -xy 300 0
-foreach {y aColor} {20 GREEN 60 SPRINGGREEN 100 CYAN2 140 TURQUOISE2 180 DODGERBLUE1 220 BLUE 250 BLUE 290 BLUEVIOLET 330 PURPLE 370 MAGENTA} { if { [vreadpixel 245 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
-foreach {y aColor} {20 GREEN 60 SPRINGGREEN 100 CYAN2 140 TURQUOISE2 180 DODGERBLUE1 220 DODGERBLUE2 250 BLUE 290 BLUE 330 PURPLE 370 MAGENTA2} { if { [vreadpixel 315 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
+foreach {y aColor} {20 GREEN 60 SPRINGGREEN 100 AQUAMARINE1 140 TURQUOISE1 180 DODGERBLUE1 220 BLUE 250 BLUE 290 BLUE 330 PURPLE1 370 MAGENTA} { if { [vreadpixel 245 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
+foreach {y aColor} {20 GREEN 60 MEDIUMSPRINGGREEN 100 AQUAMARINE1 140 TURQUOISE2 180 DEEPSKYBLUE2 220 ROYALBLUE1 250 BLUE 290 BLUE 330 PURPLE1 370 MEDIUMORCHID1} { if { [vreadpixel 315 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
# free labels
vcolorscale cs7 -demo -smooth 0 -colorRange BLACK WHITE -xy 360 0 -freeLabels 3 l1 l2 l3
vaspects c -subshapes b1 -setColor RED
vaspects c -subshapes c12 -setColor GREEN
-if { [vreadpixel 100 100 rgb name] != "RED3" } { puts "Error: wrong subshape color" }
-if { [vreadpixel 200 100 rgb name] != "GREEN3" } { puts "Error: wrong subshape color" }
-if { [vreadpixel 200 300 rgb name] != "BLUE3" } { puts "Error: wrong subshape color" }
+if { [vreadpixel 100 100 rgb name] != "RED2" } { puts "Error: wrong subshape color" }
+if { [vreadpixel 200 100 rgb name] != "GREEN2" } { puts "Error: wrong subshape color" }
+if { [vreadpixel 200 300 rgb name] != "BLUE2" } { puts "Error: wrong subshape color" }
vdump $imagedir/${casename}.png
vaspects b123_123 -subshapes b1_3 -setColor BLUE
vaspects b123_123 -subshapes b23_3 -setColor BLUE
-if { [vreadpixel 50 250 rgb name] != "RED3" } { puts "Error: wrong color" }
-if { [vreadpixel 175 175 rgb name] != "RED3" } { puts "Error: wrong color" }
-if { [vreadpixel 300 100 rgb name] != "RED3" } { puts "Error: wrong color" }
+if { [vreadpixel 50 250 rgb name] != "RED2" } { puts "Error: wrong color" }
+if { [vreadpixel 175 175 rgb name] != "RED2" } { puts "Error: wrong color" }
+if { [vreadpixel 300 100 rgb name] != "RED2" } { puts "Error: wrong color" }
-if { [vreadpixel 100 310 rgb name] != "GREEN3"} { puts "Error: wrong color" }
-if { [vreadpixel 200 230 rgb name] != "GREEN3"} { puts "Error: wrong color" }
-if { [vreadpixel 320 170 rgb name] != "GREEN3"} { puts "Error: wrong color" }
+if { [vreadpixel 100 310 rgb name] != "GREEN2"} { puts "Error: wrong color" }
+if { [vreadpixel 200 230 rgb name] != "GREEN2"} { puts "Error: wrong color" }
+if { [vreadpixel 320 170 rgb name] != "GREEN2"} { puts "Error: wrong color" }
-if { [vreadpixel 130 280 rgb name] != "BLUE3" } { puts "Error: wrong color" }
-if { [vreadpixel 250 200 rgb name] != "BLUE3" } { puts "Error: wrong color" }
-if { [vreadpixel 350 150 rgb name] != "BLUE3" } { puts "Error: wrong color" }
+if { [vreadpixel 130 280 rgb name] != "BLUE2" } { puts "Error: wrong color" }
+if { [vreadpixel 250 200 rgb name] != "BLUE2" } { puts "Error: wrong color" }
+if { [vreadpixel 350 150 rgb name] != "BLUE2" } { puts "Error: wrong color" }
vdump $imagedir/${casename}.png
vsettransparency b 0.5
-if { [vreadpixel 150 150 rgb name] != "GREEN3" } { puts "Error: wrong color - GREEN box should overlap RED one" }
-if { [vreadpixel 84 64 rgb name] == "RED3" } { puts "Error: wrong color - Trihedron should overlap RED box" }
+if { [vreadpixel 150 150 rgb name] != "GREEN2" } { puts "Error: wrong color - GREEN box should overlap RED one" }
+if { [vreadpixel 84 64 rgb name] == "RED2" } { puts "Error: wrong color - Trihedron should overlap RED box" }
vdump $imagedir/${casename}.png
vdisplay -dispMode 1 -highMode 1 b
vfit
-if { [vreadpixel 165 400 rgb name] != "DARKGOLDENROD3" } { puts "Error: fit all produces incorrect result after Erase" }
+if { [vreadpixel 165 400 rgb name] != "DARKGOLDENROD" } { puts "Error: fit all produces incorrect result after Erase" }
vdump $::imagedir/${::casename}_1.png
verase b
vdisplay -dispMode 1 -highMode 1 b
vfit
-if { [vreadpixel 165 400 rgb name] != "DARKGOLDENROD3" } { puts "Error: fit all produces incorrect result after Remove" }
+if { [vreadpixel 165 400 rgb name] != "DARKGOLDENROD" } { puts "Error: fit all produces incorrect result after Remove" }
vdump $::imagedir/${::casename}_2.png
vdisplay -dispMode 1 -highMode 1 b
vfit
vmoveto 110 110
-if { "[vreadpixel 110 110 rgb name]" != "DARKTURQUOISE" } { puts "Error: shape is not selected!" }
+if { "[vreadpixel 110 110 rgb name]" != "CYAN2" } { puts "Error: shape is not selected!" }
vlocation b -translate 1 0 0
vmoveto 110 110
vlocation b -reset
vmoveto 110 110
vreadpixel 110 110 rgb name
-if { "[vreadpixel 110 110 rgb name]" != "DARKTURQUOISE" } { puts "Error: resetted shape is not selected!" }
+if { "[vreadpixel 110 110 rgb name]" != "CYAN2" } { puts "Error: resetted shape is not selected!" }
vselprops dynHighlight -dispMode 1 -color RED -transp 0.2
vmoveto 250 250
vrenderparams -oit off
-if { [vreadpixel 250 250 rgb name] != "ORANGERED3" } { puts "Error: wrong highlight color with OIT turned OFF"}
+if { [vreadpixel 250 250 rgb name] != "ORANGERED2" } { puts "Error: wrong highlight color with OIT turned OFF"}
vdump $imagedir/${casename}_oit_off.png
vrenderparams -oit 0
vreadpixel 250 250 rgb name
-if { [vreadpixel 250 250 rgb name] != "ORANGERED3" } { puts "Error: wrong highlight color with OIT turned ON"}
+if { [vreadpixel 250 250 rgb name] != "ORANGERED2" } { puts "Error: wrong highlight color with OIT turned ON"}
vdump $imagedir/${casename}_oit_on.png
vdisplay -dispMode 1 -inview -erased b
vdisplay b
vfit
-if { [vreadpixel 200 200 rgb name] != "DARKGOLDENROD3" } { puts "Error: object is not displayed in Shaded mode" }
+if { [vreadpixel 200 200 rgb name] != "DARKGOLDENROD" } { puts "Error: object is not displayed in Shaded mode" }
vdump $imagedir/${casename}_view2.png
vactivate View1
vclipplane pb0 equation 0 1 0 -0.5 -set b0
vclipplane pb1 equation 0 1 0 -0.5 -setOverrideGlobal b1
-if { [vreadpixel 300 200 rgb name] != "GREEN3" } { puts "Error: box b1 is fully clipped" }
+if { [vreadpixel 300 200 rgb name] != "GREEN2" } { puts "Error: box b1 is fully clipped" }
vdump $imagedir/${casename}.png
vmoveto 150 200
vstate -entities
vselect 150 200
-if { [vreadpixel 150 200 rgb name] != "BLACK" } { puts "Error: object is not clipped" }
-if { [vreadpixel 350 200 rgb name] != "GOLDENROD1" } { puts "Error: object should NOT be selected" }
+if { [vreadpixel 150 200 rgb name] != "BLACK" } { puts "Error: object is not clipped" }
+if { [vreadpixel 350 200 rgb name] != "GOLDENROD" } { puts "Error: object should NOT be selected" }
vdump $imagedir/${casename}_1.png
# depth range starts behinds the picking ray
vmoveto 150 200
vstate -entities
vselect 150 200
-if { [vreadpixel 150 200 rgb name] != "BLACK" } { puts "Error: object is not clipped" }
-if { [vreadpixel 300 200 rgb name] != "GOLDENROD1" } { puts "Error: object should NOT be selected" }
+if { [vreadpixel 150 200 rgb name] != "BLACK" } { puts "Error: object is not clipped" }
+if { [vreadpixel 300 200 rgb name] != "DARKGOLDENROD3" } { puts "Error: object should NOT be selected" }
vdump $imagedir/${casename}_2.png
vdisplay -dispMode 1 b
vmoveto 200 200
if { [vreadpixel 150 150 -rgb -name] != "BLACK" } { puts "Error: wrong prs location" }
-if { [vreadpixel 300 300 -rgb -name] != "DARKGOLDENROD3" } { puts "Error: wrong sel location" }
+if { [vreadpixel 300 300 -rgb -name] != "DARKGOLDENROD" } { puts "Error: wrong sel location" }
vmoveto 300 300
-if { [vreadpixel 300 300 -rgb -name] != "DARKTURQUOISE" } { puts "Error: wrong highlighting" }
+if { [vreadpixel 300 300 -rgb -name] != "CYAN2" } { puts "Error: wrong highlighting" }
vdump $imagedir/${casename}.png
vdisplay -dispMode 1 b
vfit
vclipplane p 1 -equation 0 1 0 -1 -set -capping 1
-if { [vreadpixel 200 200 rgb name] != "GRAY13" } { puts "Error: capping does not work with zero origin" }
+if { [vreadpixel 200 200 rgb name] != "GRAY14" } { puts "Error: capping does not work with zero origin" }
vzlayer DEFAULT -origin 0 10 0
-if { [vreadpixel 200 200 rgb name] != "GRAY13" } { puts "Error: capping does not work with non-zero origin" }
+if { [vreadpixel 200 200 rgb name] != "GRAY14" } { puts "Error: capping does not work with non-zero origin" }
vdump ${imagedir}/${casename}.png
vclipplane c1 -equation 0 1 0 1 -setOverrideGlobal b1
vclipplane c2 -equation 0 1 0 -1 -set
vmoveto 200 200
-if { [vreadpixel 250 200 -rgb -name] != "DARKGOLDENROD3" } { puts "Error: selection of clipped object" }
-if { [vreadpixel 150 200 -rgb -name] != "DARKTURQUOISE" } { puts "Error: object is not selected" }
+if { [vreadpixel 250 200 -rgb -name] != "DARKGOLDENROD" } { puts "Error: selection of clipped object" }
+if { [vreadpixel 150 200 -rgb -name] != "CYAN2" } { puts "Error: object is not selected" }
vdump ${imagedir}/${casename}.png
puts "============"
-puts "OCC23193"
+puts "0023193: Some triangles are inverted when writing an STL file"
puts "============"
puts ""
-###########################################################################
-# Some triangles are inverted when writing an STL file
-###########################################################################
-pload QAcommands
+pload QAcommands
set aFile $imagedir/bug23193_sample.stl
-vinit
+vinit View1
stepread [locate_data_file bug23193_sample.stp] a *
incmesh a_1 1
writestl a_1 ${aFile} 0
vrotate 4 0 0
vfit
-set x_coord 189
-set y_coord 236
-
-#checkcolor $x_coord $y_coord 0 0 0.7
-
-if { "[vreadpixel $x_coord $y_coord rgb name]" != "MATRABLUE" } {
- puts "Error : There is missing triangle"
-}
-
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
-
-
-
+if { [vreadpixel 189 236 -rgb -name] != "BLUE3" } { puts "Error : There is missing triangle" }
+vdump ${imagedir}/${test_image}.png
vsetdispmode 1
vselprops dynHighlight -dispMode -1
vmoveto 300 200
-if { [vreadpixel 250 200 rgb name] != "DARKTURQUOISE" } { puts "Error: object is NOT picked" }
+if { [vreadpixel 250 200 rgb name] != "CYAN2" } { puts "Error: object is NOT picked" }
vmoveto 200 250
-if { [vreadpixel 200 250 rgb name] != "BLACK"} { puts "Error: hidden part is displayed" }
-if { [vreadpixel 250 200 rgb name] != "RED4" } { puts "Error: object is picked by hidden part" }
+if { [vreadpixel 200 250 rgb name] != "BLACK"} { puts "Error: hidden part is displayed" }
+if { [vreadpixel 250 200 rgb name] != "BROWN" } { puts "Error: object is picked by hidden part" }
vdump ${imagedir}/${casename}.png
puts "========"
-puts "OCC28641"
+puts "0028641: Data Exchange - Support alpha-channel of color"
puts "========"
puts ""
-####################################################
-# Data Exchange - Support alpha-channel of color
-####################################################
pload OCAF
explode b e
explode b f
XAddShape D_First b
-XSetColor D_First b_1 1 0 0 s
-XSetColor D_First b_2 1 1 0 0.3 s
-XSetColor D_First b_11 1 1 1 0.2 c
-XSetColor D_First b_10 0 1 1 c
+XSetColor D_First b_1 RED s
+XSetColor D_First b_2 YELLOW 0.3 s
+XSetColor D_First b_11 WHITE 0.2 c
+XSetColor D_First b_10 CYAN c
XAddColor D_First 0.5 0.5 1 0.1
XShow D_First
vfit
vsetdispmode 1
vdump $::imagedir/${::casename}_first.png
-if { [vreadpixel 300 200 rgb name] != "DARKKHAKI" } { puts "Error: wrong color in 3D Viewer" }
+if { [vreadpixel 300 200 rgb name] != "GRAY63" } { puts "Error: wrong color in 3D Viewer" }
# Write file
SaveAs D_First ${imagedir}/bug28521.xbf
#0:1:2:5
set res [XGetColor D_Second 0:1:2:5]
regexp {([A-Z0-9]+) \(([0-9.+eE]+)\)} $res full color alpha
-if {$color != "LIGHTSLATEBLUE"} {
+if {$color != "LIGHTSTEELBLUE2"} {
set isOK 0
}
if {[expr abs(0.1 - $alpha)] > $prec} {
vfit
vsetdispmode 1
vdump $::imagedir/${::casename}.png
-if { [vreadpixel 300 200 rgb name] != "DARKKHAKI" } { puts "Error: wrong color in 3D Viewer" }
+if { [vreadpixel 300 200 rgb name] != "GRAY63" } { puts "Error: wrong color in 3D Viewer" }
Close D_Second
for {set i 1} {$i <= 4} {incr i} {
set sublabel 0:1:1:3:$i
set color [XGetShapeColor D $sublabel]
- if {$color != "GRAY"} {
- puts "Error: wrong color after expand compounds."
- }
+ if {$color != "GRAY88"} { puts "Error: wrong color after expand compounds." }
}
Close D
vanimation anim -play 2.0 0.0
vdump $imagedir/${casename}_2.png
-if {[vreadpixel 270 20 rgb name] != "DARKGOLDENROD3"} { puts "Error: Box moving result is wrong!" }
-if {[vreadpixel 120 255 rgb name] != "DARKGOLDENROD4"} { puts "Error: Sphere moving result is wrong!" }
+if {[vreadpixel 270 20 rgb name] != "DARKGOLDENROD"} { puts "Error: Box moving result is wrong!" }
+if {[vreadpixel 120 255 rgb name] != "ORANGE4"} { puts "Error: Sphere moving result is wrong!" }
puts "Put the following command to start interactive animation:"
puts " vanimation anim -play"
vanimation anim/movecam -view -at1 0 0 50 -at2 0 0 50 -eye1 100 -100 150 -eye2 -153 -70 8 -duration 3
vanimation anim -play 0.0 0.0
-if {[vreadpixel 306 280 rgb name] != "DARKGOLDENROD3" || [vreadpixel 325 280 rgb name] != "DARKGOLDENROD3"} { puts "Error: Camera rotate result is wrong!" }
+if {[vreadpixel 306 280 rgb name] != "DARKGOLDENROD" || [vreadpixel 325 280 rgb name] != "DARKGOLDENROD"} { puts "Error: Camera rotate result is wrong!" }
vdump $imagedir/${casename}_0.png
vanimation anim -play 1.0 0.0
-if {[vreadpixel 306 280 rgb name] != "DARKORANGE4" || [vreadpixel 325 280 rgb name] != "BLACK"} { puts "Error: Camera rotate result is wrong!" }
+if {[vreadpixel 306 280 rgb name] != "GRAY26" || [vreadpixel 325 280 rgb name] != "BLACK"} { puts "Error: Camera rotate result is wrong!" }
vdump $imagedir/${casename}_1.png
vanimation anim -play 2.0 0.0
-if {[vreadpixel 306 280 rgb name] != "GOLDENROD2" || [vreadpixel 325 280 rgb name] != "GOLDENROD2"} { puts "Error: Camera rotate result is wrong!" }
+if {[vreadpixel 306 280 rgb name] != "DARKGOLDENROD3" || [vreadpixel 325 280 rgb name] != "DARKGOLDENROD3"} { puts "Error: Camera rotate result is wrong!" }
vdump $imagedir/${casename}_2.png
puts "Put the following command to start interactive animation:"
vanimation anim/zoom -view -scale1 1.2 -scale2 4.8 -duration 2
vanimation anim -play 0.0 0.0
-if {[vreadpixel 230 220 rgb name] != "DARKGOLDENROD3" || [vreadpixel 250 220 rgb name] != "BLACK"} { puts "Error: Camera scale result is wrong!" }
+if {[vreadpixel 230 220 rgb name] != "DARKGOLDENROD" || [vreadpixel 250 220 rgb name] != "BLACK"} { puts "Error: Camera scale result is wrong!" }
vdump $imagedir/${casename}_0.png
vanimation anim -play 1.0 0.0
-if {[vreadpixel 250 220 rgb name] != "DARKGOLDENROD3" || [vreadpixel 270 220 rgb name] != "BLACK"} { puts "Error: Camera scale result is wrong!" }
+if {[vreadpixel 250 220 rgb name] != "DARKGOLDENROD" || [vreadpixel 270 220 rgb name] != "BLACK"} { puts "Error: Camera scale result is wrong!" }
vdump $imagedir/${casename}_1.png
vanimation anim -play 2.0 0.0
-if {[vreadpixel 334 220 rgb name] != "DARKGOLDENROD3" || [vreadpixel 350 220 rgb name] != "BLACK"} { puts "Error: Camera scale result is wrong!" }
+if {[vreadpixel 334 220 rgb name] != "DARKGOLDENROD" || [vreadpixel 350 220 rgb name] != "BLACK"} { puts "Error: Camera scale result is wrong!" }
vdump $imagedir/${casename}_2.png
puts "Put the following command to start interactive animation:"
vanimation anim/movecam -view -at1 116 355 327 -at2 -174 47 330 -eye1 225 253 413 -eye2 -65 -55 415 -duration 2
vanimation anim -play 0.0 0.0
-if {[vreadpixel 60 360 rgb name] != "GOLDENROD3"} { puts "Error: Camera translation result is wrong!" }
+if {[vreadpixel 60 360 rgb name] != "DARKGOLDENROD"} { puts "Error: Camera translation result is wrong!" }
vdump $imagedir/${casename}_0.png
vanimation anim -play 1.0 0.0
-if {[vreadpixel 160 360 rgb name] != "GOLDENROD3"} { puts "Error: Camera translation result is wrong!" }
+if {[vreadpixel 160 360 rgb name] != "DARKGOLDENROD"} { puts "Error: Camera translation result is wrong!" }
vdump $imagedir/${casename}_1.png
vanimation anim -play 2.0 0.0
-if {[vreadpixel 260 360 rgb name] != "GOLDENROD3"} { puts "Error: Camera translation result is wrong!" }
+if {[vreadpixel 260 360 rgb name] != "DARKGOLDENROD"} { puts "Error: Camera translation result is wrong!" }
vdump $imagedir/${casename}_2.png
puts "Put the following command to start interactive animation:"
vselmode b1 4 1
vmoveto 220 220
-if { [vreadpixel 220 220 rgb name] != "TURQUOISE3" } { puts "Error: box b2 should be highlighted" }
+if { [vreadpixel 220 220 rgb name] != "TURQUOISE2" } { puts "Error: box b2 should be highlighted" }
vselfilter -type FACE
vmoveto 0 0
vdisplay pp1 pp2
vclipplane pln -set {*}$aCapParams -equation1 0 0 -1 40 -equation2 0 1 0 -15
-if { [vreadpixel 200 360 rgb name] != "DARKTURQUOISE" } { puts "Error: bb should NOT be clipped" }
+if { [vreadpixel 200 360 rgb name] != "CYAN2" } { puts "Error: bb should NOT be clipped" }
vdump $::imagedir/${::casename}_2.png
vclipplane pln -set {*}$aCapParams -equation1 0 0 -1 40 -equation2 0 1 0 -15 -equation3 -1 0 0 5
catch { Close D }
NewDocument D BinXCAF
XAddShape D b
-XSetColor D b 0 0 1
+XSetColor D b BLUE
explode b f
-XSetColor D b_1 1 0 0
+XSetColor D b_1 RED
XDisplay D
vviewparams -proj 1 0.1 0.1
vclipplane set pln view Driver1/Viewer1/View1
vclipplane change pln equation -1 0 0 5
-# FFP on, pixel is RED3, which is expected
+# FFP on
vcaps -ffp 1
set aColorFfp [vreadpixel 200 200 rgb name]
-if { "$aColorFfp" != "RED3" } {
- puts "Error: RED3 color is expected at the back side (FFP)"
-}
+if { "$aColorFfp" != "RED" } { puts "Error: RED color is expected at the back side (FFP)" }
-# GLSL on, pixel should has the same color RED3, but actual color is KHAKI1
+# GLSL on
vcaps -ffp 0
set aColorGlsl [vreadpixel 200 200 rgb name]
-if { "$aColorGlsl" != "RED3" } {
- puts "Error: RED3 color is expected at the back side (GLSL)"
-}
+if { "$aColorGlsl" != "FIREBRICK" } { puts "Error: FIREBRICK color is expected at the back side (GLSL)" }
set aColor3 [vreadpixel 205 132 rgb name]
set aColor4 [vreadpixel 205 280 rgb name]
-if { "$aColor3" != "RED3" || "$aColor4" != "RED4" } {
- puts "Error: expected color mid from the light spot is RED4"
+if { "$aColor3" != "RED3" || "$aColor4" != "FIREBRICK" } {
+ puts "Error: expected color mid from the light spot is FIREBRICK"
}
set aColor5 [vreadpixel 205 100 rgb name]
set aColor6 [vreadpixel 205 306 rgb name]
-if { "$aColor5" != "RED4" || "$aColor6" != "RED4" } {
- puts "Error: expected color far from the light spot is RED4"
+if { "$aColor5" != "BROWN" || "$aColor6" != "BROWN" } {
+ puts "Error: expected color far from the light spot is BROWN"
}
if { "$aColor3" != "RED" || "$aColor4" != "RED4" } {
puts "Error: expected color mid from the light spot is RED4"
}
-
-set aColor5 [vreadpixel 205 100 rgb name]
-set aColor6 [vreadpixel 205 306 rgb name]
-if { "$aColor5" != "GRAY9" || "$aColor6" != "GRAY9" } {
- puts "Error: expected color far from the light spot is GRAY9"
-}
vdump $::imagedir/${::casename}_OFF.png
set aColorL [vreadpixel 150 250 rgb name]
set aColorR [vreadpixel 250 250 rgb name]
-if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
- puts "Error: wrong color (fixed pipeline)!"
-}
+if { "$aColorL" != "GREEN4" || "$aColorR" != "GREEN4" } { puts "Error: wrong color (fixed pipeline)!" }
vshaderprog b phong
set aColorL [vreadpixel 150 250 rgb name]
set aColorR [vreadpixel 250 250 rgb name]
-if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
- puts "Error: wrong color (Phong shader)!"
-}
+if { "$aColorL" != "GREEN4" || "$aColorR" != "GREEN4" } { puts "Error: wrong color (Phong shader)!" }
set aColor3 [vreadpixel 205 132 rgb name]
set aColor4 [vreadpixel 205 280 rgb name]
-if { "$aColor3" != "RED4" || "$aColor4" != "RED4" } {
- puts "Error: expected color mid from the light spot is RED4"
+if { "$aColor3" != "FIREBRICK" || "$aColor4" != "FIREBRICK" } {
+ puts "Error: expected color mid from the light spot is FIREBRICK"
}
set aColor5 [vreadpixel 205 100 rgb name]
set aColor6 [vreadpixel 205 306 rgb name]
-if { "$aColor5" != "RED4" || "$aColor6" != "RED4" } {
- puts "Error: expected color far from the light spot is RED4"
+if { "$aColor5" != "BROWN" || "$aColor6" != "BROWN" } {
+ puts "Error: expected color far from the light spot is BROWN"
}
set aColor3 [vreadpixel 205 132 rgb name]
set aColor4 [vreadpixel 205 280 rgb name]
-if { "$aColor3" != "RED4" || "$aColor4" != "RED4" } {
+if { "$aColor3" != "BROWN" || "$aColor4" != "RED4" } {
puts "Error: expected color mid from the light spot is RED4"
}
set aColor5 [vreadpixel 205 100 rgb name]
set aColor6 [vreadpixel 205 306 rgb name]
-if { "$aColor5" != "GRAY2" || "$aColor6" != "GRAY2" } {
- puts "Error: expected color far from the light spot is GRAY2"
+if { "$aColor5" != "GRAY12" || "$aColor6" != "GRAY13" } {
+ puts "Error: expected color far from the light spot is GRAY12"
}
vfit
vmoveto 250 150
set aColor [vreadpixel 200 150 name rgb]
-if { "$aColor" != "TURQUOISE4" } {
- puts "Error: Wrong dynamic highlight color"
-}
+if { "$aColor" != "TURQUOISE3" } { puts "Error: Wrong dynamic highlight color" }
vselprops dynHighlight -transp 0.3 -color PALEGREEN2 -dispMode 1
vmoveto 285 212
-if { [vreadpixel 285 212 name rgb] != "DARKKHAKI" } { puts "Error: highlighting of a box is not transparent!" }
+if { [vreadpixel 285 212 name rgb] != "KHAKI3" } { puts "Error: highlighting of a box is not transparent!" }
vmoveto -reset
if { [vreadpixel 285 212 name rgb] != "RED" } { puts "Error: highlighting of a box is not reset!" }
vselect 200 200 1
vselect 350 200 1
-if {[vreadpixel 350 200 name rgba] != "RED3 1" || [vreadpixel 350 200 name rgba] == [vreadpixel 200 200 name rgba]} {
+if {[vreadpixel 350 200 name rgba] != "RED2 1" || [vreadpixel 350 200 name rgba] == [vreadpixel 200 200 name rgba]} {
puts "ERROR: selection highlight of 3rd box is displayed with wrong color!"
}
vdump $::imagedir/${::casename}_OFF.png
set aColorL [vreadpixel 150 250 rgb name]
set aColorR [vreadpixel 250 250 rgb name]
-if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
+if { "$aColorL" != "GREEN4" || "$aColorR" != "GREEN4" } {
puts "Error: wrong color (fixed pipeline)!"
}
vrenderparams -raytrace
set aColorL [vreadpixel 150 250 rgb name]
set aColorR [vreadpixel 250 250 rgb name]
-#if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
+#if { "$aColorL" != "GREEN4" || "$aColorR" != "GREEN4" } {
# puts "Error: wrong color (Ray Tracing)!"
#}
# check FRONT/TOP edge
vselect 100 270
-if {[vreadpixel 100 300 name rgb] != "GRAY51"} { puts "Error: Position of FRONT-TOP camera is wrong." }
-if {[vreadpixel 100 310 name rgb] != "CYAN"} { puts "Error: Position of FRONT-TOP camera is wrong." }
+if {[vreadpixel 100 300 name rgb] != "GRAY52"} { puts "Error: Position of FRONT-TOP camera is wrong." }
+if {[vreadpixel 100 310 name rgb] != "CYAN"} { puts "Error: Position of FRONT-TOP camera is wrong." }
vdump $imagedir/${casename}_edge.png
# Check vertex
vselect 140 310
-if {[vreadpixel 100 290 name rgb] != "GRAY42"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." }
-if {[vreadpixel 100 310 name rgb] != "CYAN"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." }
-if {[vreadpixel 100 320 name rgb] != "MATRAGRAY"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." }
+if {[vreadpixel 100 290 name rgb] != "GRAY47"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." }
+if {[vreadpixel 100 310 name rgb] != "CYAN"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." }
+if {[vreadpixel 100 320 name rgb] != "GRAY58"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." }
vdump $imagedir/${casename}_corner.png