2 puts "0026047: Data Exchange - Lost colors for IGES export"
5 pload MODELING VISUALIZATION OCAF XDE
11 box b 0 -20 -10 100 40 20
14 trotate a_1 0 0 0 1 0 0 60
15 trotate a_2 0 0 0 1 0 0 -60
20 trotate c 0 0 0 0 1 0 90
27 trotate e 0 0 0 0 1 0 90
33 text2brep text "CAD Assistant" -font Times -height 10
34 ttranslate text 10 -4 10
41 #vsetcolor body yellow
52 for {set i 1} {$i <= 26} {incr i} {XSetColor D body_1_$i BLUE}
53 XSetColor D body_1_1 E68066
54 XSetColor D body_1_9 E68066
55 for {set i 10} {$i <= 22} {incr i} {XSetColor D body_1_$i 99B300}
56 XSetColor D core_1 1A1AFF
57 foreach ff [explode core_1 f] { XSetColor D $ff 1A1AFF ; puts "set color $ff" }
61 XDisplay D -dispMode 1
63 vdump "$::imagedir/${::casename}_orig.png"
64 set aColorOrig [vreadpixel 360 290 rgb name]
67 set anIgesCopy "$::imagedir/${::casename}_exported.igs"
68 WriteIges D $anIgesCopy
70 # display an exported model
71 ReadIges D_Copy $anIgesCopy
72 file delete $anIgesCopy
76 XDisplay D_Copy -dispMode 1
78 vdump "$::imagedir/${::casename}_exported.png"
81 set aColorNew [vreadpixel 360 290 rgb name]
82 if { "$aColorOrig" == "$aColorNew" } {
83 puts "OK: Image of exported model matches original"
85 puts "Error: Image of exported model is wrong!"
88 set xst [ XStat D_Copy 1]
89 regexp {Number +of +labels +with +color +link += +([-0-9.+eE]+)} $xst full nbshcolor_Copy
91 if {$nbshcolor_Copy != 31} {
92 puts "Error: incorrect count of color links to shapes"