5bffb882 |
1 | # Sample model of Intel i7-4790 CPU |
a110c4a3 |
2 | # Dimensions are taken from specs and photo found in Internet |
5bffb882 |
3 | |
4 | #Category: XDE |
5 | #Title: Intel i7-4790 CPU |
6 | |
7 | pload MODELING VISUALIZATION XDE |
8 | |
9 | puts "Making board..." |
10 | |
11 | # board is rectangle 37.5 x 37.5 mm with semi-round holes on two sides; |
12 | # assumed board thickness is 1 mm |
13 | dset L 37.5 |
14 | dset t 1. |
15 | polyline pboard 0 0 0 L 0 0 L L 0 0 L 0 0 0 0 |
16 | mkplane fboard pboard |
17 | circle cslot -0.2 32.2 0 1 |
18 | mkedge eslot cslot |
19 | wire wslot eslot |
20 | mkplane fslot wslot |
21 | bcut fboard fboard fslot |
22 | ttranslate fslot L+0.4 0 0 |
23 | bcut fboard fboard fslot |
24 | prism board fboard 0 0 t |
25 | |
26 | # make faces representing dard-green parts of the board sides |
27 | mkoffset dgbot fboard 1 -0.5 |
28 | mkplane dgbot dgbot_1 |
29 | tcopy dgbot dgtop |
30 | ttranslate dgtop 0 0 0.5*t |
31 | box aux 36.6 17.7 0 10 8.4 2*t |
32 | bcut dgtop dgtop aux |
33 | prism pbot dgbot 0 0 0.5*t |
34 | prism ptop dgtop 0 0 0.5*t |
35 | bfuse board board pbot |
36 | bfuse board board ptop |
37 | |
38 | # add triangular faces indicating base corner of the plate |
39 | polyline btri 0.5 0.5 0 1.5 0.5 0 0.5 1.5 0 0.5 0.5 0 |
40 | polyline ttri 0.5 0.5 t 2.5 0.5 t 0.5 2.5 t 0.5 0.5 t |
41 | thrusections stri 1 1 btri ttri |
42 | bfuse board board stri |
43 | |
44 | explode board so |
45 | renamevar board_1 board |
46 | |
47 | puts "Making case..." |
48 | |
49 | # case is made of two filleted prisms, base and top |
50 | polyline lbase 3.4 1.8 t L-3.4 1.8 t L-3.4 11.4 t L-1.8 11.4 t L-1.8 25.2 t \ |
51 | L-3.4 25.2 t L-3.4 L-3 t 3.4 L-3 t 3.4 25.2 t \ |
52 | 1.8 25.2 t 1.8 11.4 t 3.4 11.4 t 3.4 1.8 t |
53 | mkplane f lbase |
54 | explode f e |
55 | chfi2d fbase f f_1 f_2 F 1.3 f_2 f_3 F 0.7 f_3 f_4 F 0.7 f_4 f_5 F 0.7 \ |
56 | f_5 f_6 F 0.7 f_6 f_7 F 1.3 f_7 f_8 F 1.3 f_8 f_9 F 0.7 \ |
57 | f_9 f_10 F 0.7 f_10 f_11 F 0.7 f_11 f_12 F 0.7 f_12 f_1 F 1.3 |
58 | |
59 | polyline ltop 4. 3.4 t L-4 3.4 t L-4 L-4.8 t 4 L-4.8 t 4. 3.4 t |
60 | mkplane f ltop |
61 | explode f e |
62 | chfi2d ftop f f_1 f_2 F 1.6 f_2 f_3 F 1.6 f_3 f_4 F 1.6 f_4 f_1 F 1.6 |
63 | |
64 | # make case, assume height of base 1 mm and top additional 2.5 mm |
65 | prism pbase fbase 0 0 1 |
66 | prism ptop ftop 0 0 3.5 |
67 | bfuse case pbase ptop |
68 | |
69 | explode case so |
70 | renamevar case_1 case |
71 | |
72 | # write text on top of the case |
73 | # note that font is chosen by availability of Unicode symbols, |
74 | # it is different from actual font found on processor |
75 | set font "Arial Unicode MS" |
76 | #set text "i\u24c2\u00a911\nINTEL\u00ae CORE\u2122 i7-4790\nSR1QF 3.60GHZ\nMALAY\nL411B540 \u24d4" |
77 | #text2brep title $text "Arial Unicode MS" 1.7 x=10 y=24 z=4.51 |
78 | # alternative variant to work-around issue #25852 |
79 | set text "i\u20dd\u20dd11\nINTEL\u20dd CORE\u2122 i7-4790\nSR1QF 3.60GHZ\nMALAY\nL411B540 \u20dd" |
ac84fcf6 |
80 | text2brep title0 $text -font $font -height 1.7 -pos 10 24 4.51 -valign topfirstline |
81 | text2brep title1 " M C" -font $font -height 0.77 -pos 10 24.2 4.51 |
82 | text2brep title2 "R" -font $font -height 0.77 -pos 15.3 21.9 4.51 |
83 | text2brep title3 "e4" -font $font -height 0.7 -pos 18.6 15.1 4.51 |
5bffb882 |
84 | compound title0 title1 title2 title3 title |
85 | |
86 | puts "Adding contact pads..." |
87 | |
88 | # contact pads on top side (round); we need 42 with R=0.3 and 1 with R=0.6 |
89 | pcylinder rpad 0.27 0.1 |
90 | eval compound [lrepeat 42 rpad] cpad |
91 | set lpad [explode cpad] |
92 | for {set i 1} {$i <= 20} {incr i} { |
93 | ttranslate cpad_[expr 2*$i ] [expr 4.5 + $i * 0.7] L-0.7 t |
94 | ttranslate cpad_[expr 2*$i-1] [expr 4.85 + $i * 0.7] L-1.3 t |
95 | } |
96 | ttranslate cpad_41 L-0.7 L-0.7 t |
97 | ttranslate cpad_42 L-0.7 0.7 t |
98 | pcylinder Rpad 0.5 0.1 |
99 | ttranslate Rpad 0.9 L-0.9 t |
100 | eval compound $lpad Rpad rpads |
101 | |
102 | # contact pads at the bottom |
103 | box pad -0.45 -0.27 -0.1 0.9 0.54 0.1 |
104 | trotate pad 0 0 0 0 0 1 60 |
105 | ellipse c 0 0 -0.1 0.5 0.4 |
106 | mkedge e c |
107 | wire w e |
108 | mkplane f w |
109 | prism b f 0 0 0.1 |
110 | bcommon bpad pad b |
111 | explode bpad so |
112 | renamevar bpad_1 bpad |
113 | #donly bpad; boundings bpad |
114 | |
115 | # pattern of presence of bottom pads, on XY plane (top view) |
116 | set pattern [join { |
117 | ..ooooooooooooooo...ooooooooooooooooo... |
118 | .oooooooooooooooo...ooooooooooooooooooo. |
119 | .oooooooooooooooooooooooooooooooooooooo. |
120 | .oooooooooooooooooooooooooooooooooooooo. |
121 | .oooooooooooooooooooooooooooooooooooooo. |
122 | .oooooooooooooooooooooooooooooooooooooo. |
123 | .oooooooooooooooooooooooooooooooooooooo. |
124 | .oooooooooooooooooooooooooooooooooooooo. |
125 | .ooooooooooo................ooooooooooo. |
126 | .oooooooooo.................ooooooooooo. |
127 | oooooooooooo................oooooooooooo |
128 | oooooooooooo................oooooooooooo |
129 | oooooooooooo................oooooooooooo |
130 | oooooooooooo................oooooooooooo |
131 | oooooooooooo................oooooooooooo |
132 | oooooooooooo................oooooooooooo |
133 | oooooooooooo................oooooooooooo |
134 | oooooooooooo................oooooooooooo |
135 | ..oooooooooo................oooooooooo.. |
136 | ..oooooooooo................oooooooooo.. |
137 | ..oooooooooo................oooooooooo.. |
138 | ..oooooooooo................oooooooooo.. |
139 | oooooooooooo................oooooooooooo |
140 | oooooooooooo................oooooooooooo |
141 | oooooooooooo................oooooooooooo |
142 | oooooooooooo................oooooooooooo |
143 | oooooooooooo................oooooooooooo |
144 | oooooooooooo................oooooooooooo |
145 | oooooooooooo................oooooooooooo |
146 | oooooooooooo................oooooooooooo |
147 | .ooooooooooo.................ooooooooooo |
148 | .ooooooooooo................oooooooooooo |
149 | .ooooooooooooooooooooooooooooooooooooooo |
150 | oooooooooooooooooooooooooooooooooooooooo |
151 | oooooooooooooooooooooooooooooooooooooooo |
152 | oooooooooooooooooooooooooooooooooooooooo |
153 | oooooooooooooooooooooooooooooooooooooooo |
154 | .ooooooooooooooooooooooooooooooooooooooo |
155 | ..oooooooooooooooo...oooooooooooooooooo. |
156 | ...ooooooooooooooo...ooooooooooooooooo.. |
157 | } ""] |
158 | |
159 | set nbpads 0 |
160 | for {set i 0} {$i < 1600} {incr i} { |
161 | if { [string index $pattern $i] == "o" } { incr nbpads } |
162 | } |
163 | eval compound [lrepeat $nbpads bpad] cpad |
164 | set lpad [explode cpad] |
165 | for {set ipad 1; set iplace 0} {$ipad <= $nbpads && $iplace < 1600} {incr ipad; incr iplace} { |
166 | while { [string index $pattern $iplace] == "." } { incr iplace } |
167 | set icol [expr $iplace % 40] |
168 | set irow [expr $iplace / 40] |
169 | ttranslate cpad_$ipad [expr 1 + 0.91 * $icol] [expr [dval L] - 1 - 0.91 * $irow] 0 |
170 | } |
171 | |
172 | # round and square contact pads on top side |
a110c4a3 |
173 | # note re-use of rpad object used for bottom round pads |
5bffb882 |
174 | eval compound [lrepeat 8 rpad] crpads |
175 | set lrpad [explode crpads] |
176 | ttranslate crpads_1 25.3 8.4 -0.1 |
177 | ttranslate crpads_2 12.2 29.2 -0.1 |
178 | ttranslate crpads_3 12.5 15. -0.1 |
179 | ttranslate crpads_4 12.5 18.75 -0.1 |
180 | ttranslate crpads_5 12.5 19.5 -0.1 |
181 | ttranslate crpads_6 12.5 20.25 -0.1 |
182 | ttranslate crpads_7 12.5 21. -0.1 |
183 | ttranslate crpads_8 12.5 22.5 -0.1 |
184 | box spad_1 12.21 13.75 -0.1 0.58 0.58 0.1 |
185 | box spad_2 12.21 23.2 -0.1 0.58 0.58 0.1 |
186 | |
187 | # final compound for all bottom pads |
188 | eval compound $lpad $lrpad spad_1 spad_2 bpads |
189 | |
190 | # resistor-like packages at the bottom |
191 | box rpk1 -0.6 -0.25 -0.5 0.3 0.5 0.5 |
192 | box rpk2 -0.3 -0.25 -0.5 0.6 0.5 0.5 |
193 | box rpk3 0.3 -0.25 -0.5 0.3 0.5 0.5 |
194 | compound rpk1 rpk2 rpk3 rpk |
195 | |
196 | eval compound [lrepeat 47 rpk] crpk |
197 | set lrpk [explode crpk] |
198 | # rotate first 26 packages vertically |
199 | for {set i 1} {$i <= 26} {incr i} {trotate crpk_$i 0 0 0 0 0 1 90} |
200 | # first 9 are vertical column on the right side of the bottom view |
201 | for {set i 1} {$i <= 9} {incr i} { |
202 | ttranslate crpk_$i 13.4 [expr 9.8 + 1.6 * $i] 0 |
203 | } |
204 | # next 8 are 2x4 grid in top left corner |
205 | for {set i 1} {$i <= 4} {incr i} { |
206 | ttranslate crpk_[expr 9 + $i] 23. [expr 21.5 + 1.6 * $i] 0 |
207 | ttranslate crpk_[expr 13 + $i] 24. [expr 21.5 + 1.6 * $i] 0 |
208 | } |
209 | # others are translated individually, vertical first, bottom to top |
210 | ttranslate crpk_18 21.5 9.4 0 |
211 | ttranslate crpk_19 21.5 11.0 0 |
212 | ttranslate crpk_20 21.5 12.6 0 |
213 | ttranslate crpk_21 22.5 9.8 0 |
214 | ttranslate crpk_22 20.0 12.2 0 |
215 | ttranslate crpk_23 24.0 13.6 0 |
216 | ttranslate crpk_24 24.0 15.2 0 |
217 | ttranslate crpk_25 19.5 16.0 0 |
218 | ttranslate crpk_26 20.5 16.0 0 |
219 | # now horizontal, bottom to top |
220 | ttranslate crpk_27 23.7 9.5 0 |
221 | ttranslate crpk_28 23.7 10.5 0 |
222 | ttranslate crpk_29 22.8 11.5 0 |
223 | ttranslate crpk_30 22.8 12.5 0 |
224 | ttranslate crpk_31 22.7 14.3 0 |
225 | ttranslate crpk_32 22.7 16.0 0 |
226 | ttranslate crpk_33 22.8 17.0 0 |
227 | ttranslate crpk_34 22.8 19.1 0 |
228 | ttranslate crpk_35 22.7 20.0 0 |
229 | ttranslate crpk_36 23.0 20.9 0 |
230 | ttranslate crpk_37 23.3 21.8 0 |
231 | |
232 | ttranslate crpk_38 19.8 21.6 0 |
233 | ttranslate crpk_39 19.8 22.6 0 |
234 | ttranslate crpk_40 19.8 23.6 0 |
235 | ttranslate crpk_41 21.6 22.2 0 |
236 | ttranslate crpk_42 21.6 23.2 0 |
237 | ttranslate crpk_43 21.6 24.2 0 |
238 | |
239 | ttranslate crpk_44 18.0 24.6 0 |
240 | ttranslate crpk_45 18.0 25.6 0 |
241 | ttranslate crpk_46 18.0 26.6 0 |
242 | ttranslate crpk_47 18.0 27.6 0 |
243 | |
244 | eval compound $lrpk brpk |
245 | |
06d40093 |
246 | # show result in 3d viewer |
247 | vinit View1 |
248 | vclear |
249 | vsetdispmode 1 |
250 | vrenderparams -msaa 8 |
251 | vlight -clear |
252 | vlight amblight -type AMBIENT |
253 | vlight dirlight -type DIRECTIONAL -direction 1 -1 -2 -head 1 |
5bffb882 |
254 | if [info exists i7_show_3dview] { |
5bffb882 |
255 | vdisplay case |
aaf8d6a9 |
256 | vsetcolor case GRAY70 |
5bffb882 |
257 | |
258 | vdisplay title |
aaf8d6a9 |
259 | vsetcolor title GRAY10 |
5bffb882 |
260 | |
261 | # board is mostly yellow (edges, triangle markers) |
aaf8d6a9 |
262 | foreach f [explode board f] { vdisplay $f; vsetcolor $f B3803D } |
5bffb882 |
263 | # top and bottom faces are light-green (outside) and dark-green (inside) |
aaf8d6a9 |
264 | vsetcolor board_4 00998C |
265 | vsetcolor board_5 00998C |
266 | vsetcolor board_12 004D54 |
267 | vsetcolor board_14 004D54 |
5bffb882 |
268 | |
269 | vdisplay rpads |
aaf8d6a9 |
270 | vsetcolor rpads B39966 |
5bffb882 |
271 | |
272 | vdisplay bpads |
aaf8d6a9 |
273 | vsetcolor bpads B39966 |
5bffb882 |
274 | |
275 | vdisplay brpk |
aaf8d6a9 |
276 | vsetcolor brpk 80664D |
5bffb882 |
277 | |
278 | donly board case rpads brpk; fit |
279 | } |
280 | |
281 | # make XDE document |
282 | catch {Close D} |
283 | pload OCAF XDE |
284 | |
285 | NewDocument D MDTV-XCAF |
286 | |
287 | SetName D [XAddShape D board 0] "Board" |
aaf8d6a9 |
288 | foreach f [explode board f] { XSetColor D $f B3803D } |
289 | XSetColor D board_4 00998C |
290 | XSetColor D board_5 00998C |
291 | XSetColor D board_12 004D54 |
292 | XSetColor D board_14 004D54 |
5bffb882 |
293 | |
294 | SetName D [XAddShape D case 0] "Case" |
aaf8d6a9 |
295 | XSetColor D case GRAY70 |
5bffb882 |
296 | |
297 | SetName D [XAddShape D title 0] "Case title" |
aaf8d6a9 |
298 | XSetColor D title GRAY10 |
5bffb882 |
299 | |
300 | SetName D [XAddShape D rpads 1] "Top side contact pads" |
301 | SetName D [XAddShape D bpads 1] "Bottom contact pads" |
302 | SetName D [XFindShape D bpad] "Contact pad" |
303 | SetName D [XFindShape D rpad] "Round pad" |
304 | SetName D [XFindShape D Rpad] "Big round pad" |
305 | SetName D [XFindShape D spad_1] "Square pad 1" |
306 | SetName D [XFindShape D spad_2] "Square pad 2" |
aaf8d6a9 |
307 | XSetColor D rpad B39966 |
308 | XSetColor D Rpad B39966 |
309 | XSetColor D bpad B39966 |
310 | XSetColor D spad_1 B39966 |
311 | XSetColor D spad_2 B39966 |
5bffb882 |
312 | |
313 | SetName D [XAddShape D brpk 1] "Bottom packages" |
314 | SetName D [XFindShape D rpk] "Bottom package" |
aaf8d6a9 |
315 | XSetColor D rpk1 GRAY70 |
316 | XSetColor D rpk2 80664D |
317 | XSetColor D rpk3 GRAY70 |
5bffb882 |
318 | |
06d40093 |
319 | # display in 3D Viewer |
320 | XDisplay -dispMode 1 D -explore |
5bffb882 |
321 | vfit |
322 | |
323 | # save to STEP if variable i7_save_xde is defined (specifies file name) |
324 | if [info exists i7_save_xde] { |
325 | param write.surfacecurve.mode 0 |
326 | WriteStep D $i7_save_xde |
63fad07e |
327 | } |