0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / tests / bugs / vis / bug27573
1 puts "============"
2 puts "0027573"
3 puts "AIS_ColorScale::FindColor does not take into account custom colors."
4 puts "============"
5 puts ""
6
7 vclose all
8 vinit
9 vclear
10 vaxo
11
12 vcolorscale cs -demo
13 vcolorscale cs -range 0 20 5
14
15 # Set user-defined colors and labels for color scale
16 vcolorscale cs -colors white red green blue1 gray
17
18 # Check the first interval border color
19 if {[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
24 if {[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
29 if {[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
34 if {[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
39 if {[vcolorscale cs -findcolor 20] != "GRAY"} {
40   puts "ERROR: Find color result for the last segment is wrong!"
41 }
42
43 # Check negative value limits
44 vcolorscale cs -range -5 5 5
45
46 if {[vcolorscale cs -findcolor -5] != "WHITE"} {
47   puts "ERROR: Find color result for the first segment is wrong!"
48 }
49
50 if {[vcolorscale cs -findcolor 0] != "GREEN"} {
51   puts "ERROR: Find color result for the middle segment is wrong!"
52 }
53
54 if {[vcolorscale cs -findcolor 5] != "GRAY"} {
55   puts "ERROR: Find color result for the last segment is wrong!"
56 }
57
58 # Dump result
59 set only_screen 1