1 # Sample demonstrating assignment of colors to faces in XDE
3 #Category: Data Exchange
4 #Title: Assignment of colors to faces
6 pload MODELING VISUALIZATION OCAF XDE
8 box b 0 -20 -10 100 40 20
11 trotate a_1 0 0 0 1 0 0 60
12 trotate a_2 0 0 0 1 0 0 -60
17 trotate c 0 0 0 0 1 0 90
24 trotate e 0 0 0 0 1 0 90
30 text2brep text "CAD Assistant" Times 10
31 ttranslate text 10 -4 10
38 #vsetcolor body yellow
49 #XSetColor D body_1 0. 0. 1.
50 for {set i 1} {$i <= 26} {incr i} {XSetColor D body_1_$i 0. 0. 1.}
51 XSetColor D body_1_1 0.9 0.5 0.4
52 XSetColor D body_1_9 0.9 0.5 0.4
53 for {set i 10} {$i <= 22} {incr i} {XSetColor D body_1_$i 0.6 0.7 0.0}
54 XSetColor D core_1 0.1 0.1 1.
55 foreach ff [explode core_1 f] { XSetColor D $ff 0.1 0.1 1. ; puts "set color $ff" }
61 vsetcolorbg 255 255 255
63 #param write.iges.brep.mode 1
64 #WriteIges D d:/pencil3.igs