0026106: BRepMesh - revision of data model
[occt.git] / tests / bugs / vis / bug28004
CommitLineData
4b3d6eb1 1puts "============"
2puts "OCC28004"
3puts "Visualization, AIS_ColorScale - allow defining labels list not equal to intervals list"
4puts "============"
5puts ""
6
7vclear
8vinit View1
9vaxo
10
11# create default color scale
12vcolorscale cs1 -demo -smooth 0 -xy 0 0
13vcolorscale cs2 -demo -smooth 1 -xy 60 0
14foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 180 CHARTREUSE2 220 GREEN 250 MEDIUMSPRINGGREEN 290 CYAN1 330 DODGERBLUE1 370 BLUE1} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
15foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 180 CHARTREUSE2 220 GREEN 250 MEDIUMSPRINGGREEN 290 CYAN1 330 DODGERBLUE1 370 BLUE1} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
16
17# reduce color scale range and number of intervals
18vcolorscale 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
19vcolorscale cs4 -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 1 -xy 180 0
20foreach {y aColor} {40 WHITE 120 RED 200 GREEN 280 BLUE1 350 WHITE} { if { [vreadpixel 135 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
21
22# color scale with overridden hue range
23vcolorscale cs5 -demo -smooth 0 -hueRange 300 130 -xy 240 0
24vcolorscale cs6 -demo -smooth 1 -hueRange 300 130 -xy 300 0
25foreach {y aColor} {20 GREEN 60 SPRINGGREEN 100 CYAN2 140 TURQUOISE2 180 DODGERBLUE1 220 BLUE1 250 BLUE1 290 BLUEVIOLET 330 PURPLE 370 MAGENTA1} { if { [vreadpixel 245 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
26foreach {y aColor} {20 GREEN 60 SPRINGGREEN 100 CYAN2 140 TURQUOISE2 180 DODGERBLUE1 220 DODGERBLUE2 250 BLUE1 290 BLUE1 330 PURPLE 370 MAGENTA2} { if { [vreadpixel 315 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
27
28# free labels
29vcolorscale cs7 -demo -smooth 0 -colorRange BLACK WHITE -xy 360 0 -freeLabels 3 l1 l2 l3
30
31vdump ${imagedir}/${casename}.png