0026106: BRepMesh - revision of data model
[occt.git] / tests / bugs / vis / bug27573
CommitLineData
d5514578 1puts "============"
2puts "0027573"
3puts "AIS_ColorScale::FindColor does not take into account custom colors."
4puts "============"
5puts ""
6
7vclose all
8vinit
9vclear
10vaxo
11
12vcolorscale cs -demo
13vcolorscale cs -range 0 20 5
14
15# Set user-defined colors and labels for color scale
16vcolorscale cs -colors white red green blue1 gray
17
18# Check the first interval border color
19if {[vcolorscale cs -findcolor 0] != "WHITE"} {
20 puts "ERROR: Find color result for the first segment is wrong!"
21}
22
23# Check first-second intervals border
24if {[vcolorscale cs -findcolor 4] != "WHITE"} {
25 puts "ERROR: Find color result for the first segment border is wrong!"
26}
27
28# Check the second interval color
29if {[vcolorscale cs -findcolor 5] != "RED"} {
30 puts "ERROR: Find color result for the second segment is wrong!"
31}
32
33# Check the second interval color
34if {[vcolorscale cs -findcolor 9] != "GREEN"} {
35 puts "ERROR: Find color result for the third segment is wrong!"
36}
37
38# Check the last interval border color
39if {[vcolorscale cs -findcolor 20] != "GRAY"} {
40 puts "ERROR: Find color result for the last segment is wrong!"
41}
42
43# Check negative value limits
44vcolorscale cs -range -5 5 5
45
46if {[vcolorscale cs -findcolor -5] != "WHITE"} {
47 puts "ERROR: Find color result for the first segment is wrong!"
48}
49
50if {[vcolorscale cs -findcolor 0] != "GREEN"} {
51 puts "ERROR: Find color result for the middle segment is wrong!"
52}
53
54if {[vcolorscale cs -findcolor 5] != "GRAY"} {
55 puts "ERROR: Find color result for the last segment is wrong!"
56}
57
58# Dump result
59set only_screen 1