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