0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / samples / tcl / pencil.tcl
CommitLineData
92ac0eb7 1# Sample demonstrating assignment of colors to faces in XDE
2
5bffb882 3#Category: XDE
92ac0eb7 4#Title: Assignment of colors to faces
5
6pload MODELING VISUALIZATION OCAF XDE
7
8box b 0 -20 -10 100 40 20
9compound b b b a
10explode a
11trotate a_1 0 0 0 1 0 0 60
12trotate a_2 0 0 0 1 0 0 -60
13bcommon b a a_1
14bcommon b b a_2
15
16pcylinder c 4 100
17trotate c 0 0 0 0 1 0 90
18
19psphere s 1.4
20ttranslate s 99.2 0 0
21bfuse cx c s
22
23pcone e 60 0.5 101
24trotate e 0 0 0 0 1 0 90
25
26bcommon body b e
27bcut body body c
28bcommon core cx e
29
ac84fcf6 30text2brep text "CAD Assistant" -font Times -height 10
92ac0eb7 31ttranslate text 10 -4 10
32prism tr text 0 0 -1
33bfuse body body tr
34
35donly body core
36
37#vdisplay body core
38#vsetcolor body yellow
39#vsetcolor core red
40
41explode body so
42explode body_1 f
43explode core so
44
45NewDocument D
46XAddShape D body_1
47XAddShape D core_1
48
aaf8d6a9 49for {set i 1} {$i <= 26} {incr i} {XSetColor D body_1_$i BLUE}
50XSetColor D body_1_1 E68066
51XSetColor D body_1_9 E68066
52for {set i 10} {$i <= 22} {incr i} {XSetColor D body_1_$i 99B300}
53XSetColor D core_1 1A1AFF
54foreach ff [explode core_1 f] { XSetColor D $ff 1A1AFF ; puts "set color $ff" }
55
56vclear
57vinit View1
58XDisplay -dispMode 1 D -explore
92ac0eb7 59vfit
63fad07e 60vrenderparams -msaa 8
293211ae 61vbackground -color WHITE
92ac0eb7 62
63#param write.iges.brep.mode 1
64#WriteIges D d:/pencil3.igs