aboutsummaryrefslogtreecommitdiff
path: root/diagrams/l-channel-chassis.typ
blob: fedd6a58af627d606ea57f4d54606b45a2400464 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
// SAME Analog Modular Ecosystem
//
// / SPDX-FileCopyrightText: 2026 Denis Chevalier <perso@denischevalier.fr>
// / SPDX-License-Identifier: CC-BY-SA-4.0
// / SPDX-License-Identifier: CERN-OHL-S-2.0+
// / SPDX-License-Identifier: GPL-3.0-or-later
//
// The prose, explanatory text, rendered figures, tables, and mathematical
// content of this specification are licensed under CC BY-SA 4.0. If a later
// version of CC BY-SA is published, the author grants permission to distribute
// this work under that later version as well.
//
// Hardware designs contained herein (schematics, PCB layouts, mechanical
// drawings, and CAD models) are licensed under CERN-OHL-S-2.0+.
//
// All executable code, helper libraries (`lib/*`), metrology assertions, and
// embedded verification scripts throughout the source documents are licensed
// under the GNU General Public License v3.0 or later (GPL-3.0-or-later).

#import "../lib/unify.typ": qty
#import "@preview/cetz:0.5.2"

#figure(
  cetz.canvas({
    import cetz.draw: *

    // Scale factor: 1 mm = 0.030 drawing units
    let s = 0.030

    let h = 165.1 * s // 4.953
    let d = 152.4 * s // 4.572
    let w = 35.7 * s // 1.071
    let f = 8.0 * s // 0.240 (8 mm flange width)

    let db25-y = 55.0 * s // 1.650
    let bnc-y = 130.0 * s // 3.900
    let db25-x = 17.85 * s // 0.5355 (centered in 35.7 mm width)

    let y-bot = 0
    let y-top = h

    // ==========================================
    // 1. LEFT ELEVATION (Left Wall: 152.4 x 165.1 mm)
    // ==========================================
    let x-left-start = 0
    let x-left-end = x-left-start + d
    let x-left-mid = (x-left-start + x-left-end) / 2

    // View Title
    content((x-left-mid, y-top + 0.8), text(
      size: 8.5pt,
      weight: "bold",
    )[LEFT ELEVATION])

    // Main Left Wall Sheet
    rect(
      (x-left-start, y-bot),
      (x-left-end, y-top),
      fill: luma(245),
      stroke: 1.2pt + black,
    )

    // Folded Flanges (Top, Bottom, Front folded 90 deg inward - shown as dashed lines)
    // Top Flange
    line(
      (x-left-start, y-top - f),
      (x-left-end, y-top - f),
      stroke: (paint: luma(120), thickness: 0.7pt, dash: "dashed"),
    )
    // Bottom Flange
    line(
      (x-left-start, y-bot + f),
      (x-left-end, y-bot + f),
      stroke: (paint: luma(120), thickness: 0.7pt, dash: "dashed"),
    )
    // Front Flange (at x-left-start)
    line(
      (x-left-start + f, y-bot),
      (x-left-start + f, y-top),
      stroke: (paint: luma(120), thickness: 0.7pt, dash: "dashed"),
    )

    // PEM Nut Press-Fit Inserts on Flanges (Representative circles)
    circle(
      (x-left-start + f / 2, y-bot + 12 * s),
      radius: 0.06,
      fill: white,
      stroke: 0.6pt + black,
    )
    circle(
      (x-left-start + f / 2, y-top - 12 * s),
      radius: 0.06,
      fill: white,
      stroke: 0.6pt + black,
    )
    circle(
      (x-left-mid, y-bot + f / 2),
      radius: 0.06,
      fill: white,
      stroke: 0.6pt + black,
    )
    circle(
      (x-left-mid, y-top - f / 2),
      radius: 0.06,
      fill: white,
      stroke: 0.6pt + black,
    )

    // Dimensions: Depth & Height
    line(
      (x-left-start, y-bot),
      (x-left-start, y-bot - 0.6),
      stroke: 0.4pt + luma(140),
    )
    line(
      (x-left-end, y-bot),
      (x-left-end, y-bot - 0.6),
      stroke: 0.4pt + luma(140),
    )
    line(
      (x-left-start, y-bot - 0.6),
      (x-left-end, y-bot - 0.6),
      mark: (start: "stealth", end: "stealth"),
      mark-size: 0.10,
      stroke: 0.6pt + black,
    )
    content((x-left-mid, y-bot - 0.9), text(size: 7pt)[$qty(152.4, "mm")$])

    line(
      (x-left-start, y-bot),
      (x-left-start - 0.6, y-bot),
      stroke: 0.4pt + luma(140),
    )
    line(
      (x-left-start, y-top),
      (x-left-start - 0.6, y-top),
      stroke: 0.4pt + luma(140),
    )
    line(
      (x-left-start - 0.6, y-bot),
      (x-left-start - 0.6, y-top),
      mark: (start: "stealth", end: "stealth"),
      mark-size: 0.10,
      stroke: 0.6pt + black,
    )
    content(
      (x-left-start - 0.9, (y-bot + y-top) / 2),
      text(size: 7pt)[$qty(165.1, "mm")$],
      angle: 90deg,
    )

    // ==========================================
    // 2. REAR ELEVATION (Rear Closure: 35.7 x 165.1 mm)
    // ==========================================
    let x-rear-start = 5.8
    let x-rear-end = x-rear-start + w
    let x-rear-mid = (x-rear-start + x-rear-end) / 2

    // View Title
    content((x-rear-mid, y-top + 0.8), text(
      size: 8.5pt,
      weight: "bold",
    )[REAR ELEVATION])

    // Main Rear Closure Plate
    rect(
      (x-rear-start, y-bot),
      (x-rear-end, y-top),
      fill: luma(235),
      stroke: 1.2pt + black,
    )

    // Flanges (Top, Bottom, Right folded 90 deg inward)
    line((x-rear-start, y-top - f), (x-rear-end, y-top - f), stroke: (
      paint: luma(120),
      thickness: 0.7pt,
      dash: "dashed",
    ))
    line((x-rear-start, y-bot + f), (x-rear-end, y-bot + f), stroke: (
      paint: luma(120),
      thickness: 0.7pt,
      dash: "dashed",
    ))
    line((x-rear-end - f, y-bot), (x-rear-end - f, y-top), stroke: (
      paint: luma(120),
      thickness: 0.7pt,
      dash: "dashed",
    ))

    // DB-25 Cutout at Y = 55.0 mm (Centered)
    let db25-w = 26.0 * s
    let db25-h = 11.0 * s
    rect(
      (x-rear-start + db25-x - db25-w / 2, db25-y - db25-h / 2),
      (x-rear-start + db25-x + db25-w / 2, db25-y + db25-h / 2),
      fill: white,
      stroke: 0.9pt + black,
    )
    content((x-rear-start + db25-x, db25-y), text(
      size: 5.5pt,
      weight: "bold",
    )[DB-25])

    // BNC Cutout at Y = 130.0 mm (Centered, Facultative)
    let bnc-r = 6.0 * s
    circle(
      (x-rear-start + db25-x, bnc-y),
      radius: bnc-r,
      fill: white,
      stroke: 0.9pt + black,
    )
    content((x-rear-start + db25-x, bnc-y), text(
      size: 5pt,
      weight: "bold",
    )[BNC])

    // Cutout Centerline Indicators & Heights
    line((x-rear-start - 0.2, db25-y), (x-rear-end + 0.6, db25-y), stroke: (
      paint: luma(160),
      thickness: 0.4pt,
      dash: "dash-dotted",
    ))
    line((x-rear-start - 0.2, bnc-y), (x-rear-end + 0.6, bnc-y), stroke: (
      paint: luma(160),
      thickness: 0.4pt,
      dash: "dash-dotted",
    ))

    // Width Dimension (35.7 mm)
    line(
      (x-rear-start, y-bot),
      (x-rear-start, y-bot - 0.6),
      stroke: 0.4pt + luma(140),
    )
    line(
      (x-rear-end, y-bot),
      (x-rear-end, y-bot - 0.6),
      stroke: 0.4pt + luma(140),
    )
    line(
      (x-rear-start, y-bot - 0.6),
      (x-rear-end, y-bot - 0.6),
      mark: (start: "stealth", end: "stealth"),
      mark-size: 0.10,
      stroke: 0.6pt + black,
    )
    content((x-rear-mid, y-bot - 0.9), text(size: 7pt)[$qty(35.7, "mm")$])

    // Height Dimensions: DB-25 (55 mm) & BNC (130 mm)
    line(
      (x-rear-end, y-bot),
      (x-rear-end + 0.6, y-bot),
      stroke: 0.4pt + luma(140),
    )
    line(
      (x-rear-end + 0.6, y-bot),
      (x-rear-end + 0.6, db25-y),
      mark: (start: "stealth", end: "stealth"),
      mark-size: 0.10,
      stroke: 0.6pt + black,
    )
    content(
      (x-rear-end + 0.9, db25-y / 2),
      text(size: 6.5pt)[$qty(55.0, "mm")$],
      angle: -90deg,
    )

    line(
      (x-rear-end + 0.6, db25-y),
      (x-rear-end + 0.6, bnc-y),
      mark: (start: "stealth", end: "stealth"),
      mark-size: 0.10,
      stroke: 0.6pt + black,
    )
    content(
      (x-rear-end + 0.9, (db25-y + bnc-y) / 2),
      text(size: 6.5pt)[$qty(130.0, "mm")$],
      angle: -90deg,
    )

    // ==========================================
    // 3. ISOMETRIC VIEW (3D Sheet Metal Structure)
    // ==========================================
    let iso-x0 = 12.5
    let iso-y0 = -1

    // Helper function for isometric projection
    // X = Width (0..35.7 mm), Y = Height (0..165.1 mm), Z = Depth (0..152.4 mm)
    let p(x-mm, y-mm, z-mm) = {
      let px = iso-x0 + (x-mm * 0.866 - z-mm * 0.866) * s
      let py = iso-y0 + (y-mm + x-mm * 0.5 + z-mm * 0.5) * s
      return (px, py)
    }

    // View Title
    content((iso-x0, y-top + 0.8), text(
      size: 8.5pt,
      weight: "bold",
    )[ISOMETRIC VIEW])

    // Left Wall Outer Face (Z=0..152.4, Y=0..165.1, X=0)
    line(
      p(0, 0, 0),
      p(0, 0, 152.4),
      p(0, 165.1, 152.4),
      p(0, 165.1, 0),
      close: true,
      fill: luma(240),
      stroke: 1pt + black,
    )

    // Rear Closure Outer Face (X=0..35.7, Y=0..165.1, Z=0)
    line(
      p(0, 0, 0),
      p(35.7, 0, 0),
      p(35.7, 165.1, 0),
      p(0, 165.1, 0),
      close: true,
      fill: luma(225),
      stroke: 1pt + black,
    )

    // Folded Inward Flanges (8 mm width)
    // Left Wall Top Flange
    line(
      p(0, 165.1, 0),
      p(0, 165.1, 152.4),
      p(8.0, 165.1, 152.4),
      p(8.0, 165.1, 0),
      close: true,
      fill: luma(210),
      stroke: 0.8pt + black,
    )

    // Left Wall Front Flange
    line(
      p(0, 0, 152.4),
      p(0, 165.1, 152.4),
      p(8.0, 165.1, 152.4),
      p(8.0, 0, 152.4),
      close: true,
      fill: luma(215),
      stroke: 0.8pt + black,
    )

    // Rear Wall Bottom Flange
    line(
      p(0, 0, 0),
      p(0, 0, 8.0),
      p(35.7, 0, 8.0),
      p(35.7, 0, 0.0),
      close: true,
      fill: luma(200),
      stroke: 0.8pt + black,
    )

    // Left Wall Bottom Flange
    line(
      p(0, 0, 0),
      p(0, 0, 152.4),
      p(8.0, 0, 152.4),
      p(8.0, 0, 8),
      close: true,
      fill: luma(210),
      stroke: 0.8pt + black,
    )

    // Rear Wall Right Flange
    line(
      p(35.7, 0, 0),
      p(35.7, 165.1, 0),
      p(35.7, 165.1, 8.0),
      p(35.7, 0, 8.0),
      close: true,
      fill: luma(200),
      stroke: 0.8pt + black,
    )

    // Rear Wall Top Flange
    line(
      p(0, 165.1, 0),
      p(0, 165.1, 8.0),
      p(35.7, 165.1, 8.0),
      p(35.7, 165.1, 0.0),
      close: true,
      fill: luma(200),
      stroke: 0.8pt + black,
    )

    // DB-25 Cutout on Rear Face (Z=0)
    let db-w2 = 13.0
    let db-h2 = 5.5
    line(
      p(17.85 - db-w2, 55.0 - db-h2, 0),
      p(17.85 + db-w2, 55.0 - db-h2, 0),
      p(17.85 + db-w2, 55.0 + db-h2, 0),
      p(17.85 - db-w2, 55.0 + db-h2, 0),
      close: true,
      fill: white,
      stroke: 0.8pt + black,
    )

    // BNC Cutout on Rear Face (Z=0)
    line(
      p(17.85 - 4.5, 130.0 - 4.5, 0),
      p(17.85 + 4.5, 130.0 - 4.5, 0),
      p(17.85 + 4.5, 130.0 + 4.5, 0),
      p(17.85 - 4.5, 130.0 + 4.5, 0),
      close: true,
      fill: white,
      stroke: 0.8pt + black,
    )

    // PEM Nut Threaded Insert Points (Visual markers on top/front flanges)
    circle(p(4.0, 165.1, 30.0), radius: 0.05, fill: black)
    circle(p(4.0, 165.1, 120.0), radius: 0.05, fill: black)
    circle(p(4.0, 0, 30.0), radius: 0.05, fill: black)
    circle(p(4.0, 0, 120.0), radius: 0.05, fill: black)
    circle(p(4.0, 30.0, 152.4), radius: 0.05, fill: black)
    circle(p(4.0, 135.0, 152.4), radius: 0.05, fill: black)
    circle(p(35.7 - 4.0, 30.0, 0), radius: 0.05, fill: black)
    circle(p(35.7 - 4.0, 135.0, 0), radius: 0.05, fill: black)
    circle(p(17.85, 165.1, 4.0), radius: 0.05, fill: black)
    circle(p(17.85, 0, 4.0), radius: 0.05, fill: black)

    // Masked Unpainted Area Callout Annotation
    line(
      p(4.0, 165.1, 75.0),
      (iso-x0 + 1.2, y-top),
      stroke: 0.5pt + black,
    )
    content(
      (iso-x0 + 1.25, y-top - 0.3),
      text(size: 6.5pt)[Unpainted EMI flange \
        contact area (PEM nuts \
        fitted)],
      anchor: "south-west",
    )
  }),
  caption: [Cassette L-Channel structural spine technical drawings showing orthographic projections (left and rear elevations) and 3D isometric sheet metal form],
) <figure-cassette-lchannel-diagram>