aboutsummaryrefslogtreecommitdiff
path: root/diagrams/u-channel-cover.typ
blob: 549b2215c4ec6c42b5757d3b3e49bcfdd73577f8 (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
// 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.060 drawing units
    let s = 0.060

    let h = 165.1 * s // 4.953 mm
    let d = 152.4 * s // 4.572 mm
    let w = 35.7 * s // 1.071 mm
    let f = 8.0 * s // 0.240 mm (8 mm flange overlap)
    let t = 1.2 * s // Sheet metal thickness (1.2 mm)

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

    // ==========================================
    // 1. FRONT ELEVATION (U-Profile End View: 35.7 x 165.1 mm)
    // ==========================================
    let x-front-start = 0
    let x-front-end = x-front-start + w
    let x-front-mid = (x-front-start + x-front-end) / 2

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

    // U-Channel Sheet Metal Cross-Section Outline
    // Top Limb
    rect(
      (x-front-start, y-top - t),
      (x-front-end, y-top),
      fill: luma(210),
      stroke: 0.8pt + black,
    )
    // Right Side Wall
    rect(
      (x-front-end - t, y-bot),
      (x-front-end, y-top),
      fill: luma(230),
      stroke: 0.8pt + black,
    )
    // Bottom Limb
    rect(
      (x-front-start, y-bot),
      (x-front-end, y-bot + t),
      fill: luma(210),
      stroke: 0.8pt + black,
    )

    // Inner Cavity Hatch/Indicator Line
    line(
      (x-front-start, y-bot + t),
      (x-front-end - t, y-bot + t),
      (x-front-end - t, y-top - t),
      (x-front-start, y-top - t),
      stroke: (paint: luma(140), thickness: 0.5pt, dash: "dotted"),
    )

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

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

    // ==========================================
    // 2. RIGHT ELEVATION (Inner Face View: 152.4 x 165.1 mm)
    // ==========================================
    let x-right-start = 3.5
    let x-right-end = x-right-start + d
    let x-right-mid = (x-right-start + x-right-end) / 2

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

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

    // Masked Unpainted Perimeter Area (8mm border where it mates with L-channel flanges)
    rect(
      (x-right-start + f, y-bot + f),
      (x-right-end - f, y-top - f),
      fill: luma(230),
      stroke: (paint: luma(130), thickness: 0.7pt, dash: "dashed"),
    )
    content(
      (x-right-mid, (y-bot + y-top) / 2),
      text(size: 7.5pt, fill: luma(100))[Painted Central Surface],
    )

    // Countersunk Through-Holes (Crosshair + concentric circles for 90-deg countersink)
    let draw-csink(cx, cy) = {
      circle((cx, cy), radius: 0.10, fill: white, stroke: 0.6pt + black)
      circle((cx, cy), radius: 0.05, fill: luma(180), stroke: 0.4pt + black)
      line((cx - 0.13, cy), (cx + 0.13, cy), stroke: 0.3pt + luma(120))
      line((cx, cy - 0.13), (cx, cy + 0.13), stroke: 0.3pt + luma(120))
    }

    // Top & Bottom Edge Countersunk Hole Pattern (matching top/bottom flanges)
    draw-csink(x-right-start + 30.0 * s, y-top - f / 2)
    draw-csink(x-right-start + 122.4 * s, y-top - f / 2)
    draw-csink(x-right-start + 30.0 * s, y-bot + f / 2)
    draw-csink(x-right-start + 122.4 * s, y-bot + f / 2)

    // Front & Rear Edge Countersunk Hole Pattern
    draw-csink(x-right-start + f / 2, y-bot + 30.0 * s)
    draw-csink(x-right-start + f / 2, y-top - 30.0 * s)
    draw-csink(x-right-end - f / 2, y-bot + 30.0 * s)
    draw-csink(x-right-end - f / 2, y-top - 30.0 * s)

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

    // Masked Border Callout Annotation
    line(
      (x-right-start + f / 2, y-top - 15.0 * s),
      (x-right-start - 0.5, y-top - 1.0),
      stroke: 0.5pt + black,
    )
    content(
      (x-right-start - 0.5, y-top),
      text(size: 6.5pt)[Masked unpainted perimeter \
        (8 mm EMI contact area)],
      anchor: "south-east",
      angle: 90deg,
    )
  }),
  caption: [Cassette U-Channel cover technical drawings showing Front Elevation (profile) and Right Elevation (inner face showing masked unpainted EMI perimeter and countersunk hole grid)],
) <figure-cassette-uchannel-diagram>