jscad-electronics 0.0.188 → 0.0.189

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,3 +1,15 @@
1
+ // lib/materials.ts
2
+ var componentMaterials = {
3
+ moldedPlastic: { metalness: 0, roughness: 0.7 },
4
+ rubber: { metalness: 0, roughness: 0.9 },
5
+ sleeve: { metalness: 0, roughness: 0.45 },
6
+ tinnedLead: { metalness: 0.8, roughness: 0.55 },
7
+ goldContact: { metalness: 1, roughness: 0.25 },
8
+ copper: { metalness: 1, roughness: 0.35 },
9
+ brushedMetal: { metalness: 1, roughness: 0.4 },
10
+ steel: { metalness: 1, roughness: 0.25 }
11
+ };
12
+
1
13
  // lib/A01005.tsx
2
14
  import { Cuboid } from "jscad-fiber";
3
15
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -13,6 +25,7 @@ var A01005 = ({ color = "#333" }) => {
13
25
  {
14
26
  size: [bodyLength, width, height],
15
27
  offset: [0, 0, height / 2],
28
+ material: componentMaterials.moldedPlastic,
16
29
  color
17
30
  }
18
31
  ),
@@ -21,6 +34,7 @@ var A01005 = ({ color = "#333" }) => {
21
34
  {
22
35
  size: [terminatorWidth, width, height],
23
36
  offset: [fullLength / 2 - terminatorWidth / 2, 0, height / 2],
37
+ material: componentMaterials.tinnedLead,
24
38
  color: "#ccc"
25
39
  }
26
40
  ),
@@ -29,6 +43,7 @@ var A01005 = ({ color = "#333" }) => {
29
43
  {
30
44
  size: [terminatorWidth, width, height],
31
45
  offset: [-fullLength / 2 + terminatorWidth / 2, 0, height / 2],
46
+ material: componentMaterials.tinnedLead,
32
47
  color: "#ccc"
33
48
  }
34
49
  )
@@ -50,6 +65,7 @@ var A0201 = ({ color = "#333" }) => {
50
65
  {
51
66
  size: [bodyLength2, width2, height2],
52
67
  offset: [0, 0, height2 / 2],
68
+ material: componentMaterials.moldedPlastic,
53
69
  color
54
70
  }
55
71
  ),
@@ -58,6 +74,7 @@ var A0201 = ({ color = "#333" }) => {
58
74
  {
59
75
  size: [terminatorWidth2, width2, height2],
60
76
  offset: [fullLength2 / 2 - terminatorWidth2 / 2, 0, height2 / 2],
77
+ material: componentMaterials.tinnedLead,
61
78
  color: "#ccc"
62
79
  }
63
80
  ),
@@ -66,6 +83,7 @@ var A0201 = ({ color = "#333" }) => {
66
83
  {
67
84
  size: [terminatorWidth2, width2, height2],
68
85
  offset: [-fullLength2 / 2 + terminatorWidth2 / 2, 0, height2 / 2],
86
+ material: componentMaterials.tinnedLead,
69
87
  color: "#ccc"
70
88
  }
71
89
  )
@@ -87,6 +105,7 @@ var A0402 = ({ color = "#333" }) => {
87
105
  {
88
106
  size: [bodyLength3, width3, height3],
89
107
  offset: [0, 0, height3 / 2],
108
+ material: componentMaterials.moldedPlastic,
90
109
  color
91
110
  }
92
111
  ),
@@ -95,6 +114,7 @@ var A0402 = ({ color = "#333" }) => {
95
114
  {
96
115
  size: [terminatorWidth3, height3, width3],
97
116
  offset: [fullLength3 / 2 - terminatorWidth3 / 2, 0, height3 / 2],
117
+ material: componentMaterials.tinnedLead,
98
118
  color: "#ccc"
99
119
  }
100
120
  ),
@@ -103,6 +123,7 @@ var A0402 = ({ color = "#333" }) => {
103
123
  {
104
124
  size: [terminatorWidth3, height3, width3],
105
125
  offset: [-fullLength3 / 2 + terminatorWidth3 / 2, 0, height3 / 2],
126
+ material: componentMaterials.tinnedLead,
106
127
  color: "#ccc"
107
128
  }
108
129
  )
@@ -124,6 +145,7 @@ var A0603 = ({ color = "#333" }) => {
124
145
  {
125
146
  size: [bodyLength4, width4, height4],
126
147
  offset: [0, 0, height4 / 2],
148
+ material: componentMaterials.moldedPlastic,
127
149
  color
128
150
  }
129
151
  ),
@@ -132,6 +154,7 @@ var A0603 = ({ color = "#333" }) => {
132
154
  {
133
155
  size: [terminatorLength, width4, height4],
134
156
  offset: [fullLength4 / 2 - terminatorLength / 2, 0, height4 / 2],
157
+ material: componentMaterials.tinnedLead,
135
158
  color: "#ccc"
136
159
  }
137
160
  ),
@@ -140,6 +163,7 @@ var A0603 = ({ color = "#333" }) => {
140
163
  {
141
164
  size: [terminatorLength, width4, height4],
142
165
  offset: [-fullLength4 / 2 + terminatorLength / 2, 0, height4 / 2],
166
+ material: componentMaterials.tinnedLead,
143
167
  color: "#ccc"
144
168
  }
145
169
  )
@@ -161,6 +185,7 @@ var A0805 = ({ color = "#333" }) => {
161
185
  {
162
186
  size: [bodyLength5, width5, height5],
163
187
  offset: [0, 0, height5 / 2],
188
+ material: componentMaterials.moldedPlastic,
164
189
  color
165
190
  }
166
191
  ),
@@ -169,6 +194,7 @@ var A0805 = ({ color = "#333" }) => {
169
194
  {
170
195
  size: [terminatorWidth4, width5, height5],
171
196
  offset: [fullLength5 / 2 - terminatorWidth4 / 2, 0, height5 / 2],
197
+ material: componentMaterials.tinnedLead,
172
198
  color: "#ccc"
173
199
  }
174
200
  ),
@@ -177,6 +203,7 @@ var A0805 = ({ color = "#333" }) => {
177
203
  {
178
204
  size: [terminatorWidth4, width5, height5],
179
205
  offset: [-fullLength5 / 2 + terminatorWidth4 / 2, 0, height5 / 2],
206
+ material: componentMaterials.tinnedLead,
180
207
  color: "#ccc"
181
208
  }
182
209
  )
@@ -198,6 +225,7 @@ var A1206 = ({ color = "#333" }) => {
198
225
  {
199
226
  size: [bodyLength6, width6, height6],
200
227
  offset: [0, 0, height6 / 2],
228
+ material: componentMaterials.moldedPlastic,
201
229
  color
202
230
  }
203
231
  ),
@@ -206,6 +234,7 @@ var A1206 = ({ color = "#333" }) => {
206
234
  {
207
235
  size: [terminatorWidth5, width6, height6],
208
236
  offset: [fullLength6 / 2 - terminatorWidth5 / 2, 0, height6 / 2],
237
+ material: componentMaterials.tinnedLead,
209
238
  color: "#ccc"
210
239
  }
211
240
  ),
@@ -214,6 +243,7 @@ var A1206 = ({ color = "#333" }) => {
214
243
  {
215
244
  size: [terminatorWidth5, width6, height6],
216
245
  offset: [-fullLength6 / 2 + terminatorWidth5 / 2, 0, height6 / 2],
246
+ material: componentMaterials.tinnedLead,
217
247
  color: "#ccc"
218
248
  }
219
249
  )
@@ -235,6 +265,7 @@ var A1210 = ({ color = "#333" }) => {
235
265
  {
236
266
  size: [bodyLength7, width7, height7],
237
267
  offset: [0, 0, height7 / 2],
268
+ material: componentMaterials.moldedPlastic,
238
269
  color
239
270
  }
240
271
  ),
@@ -243,6 +274,7 @@ var A1210 = ({ color = "#333" }) => {
243
274
  {
244
275
  size: [terminatorWidth6, width7, height7],
245
276
  offset: [fullLength7 / 2 - terminatorWidth6 / 2, 0, height7 / 2],
277
+ material: componentMaterials.tinnedLead,
246
278
  color: "#ccc"
247
279
  }
248
280
  ),
@@ -251,6 +283,7 @@ var A1210 = ({ color = "#333" }) => {
251
283
  {
252
284
  size: [terminatorWidth6, width7, height7],
253
285
  offset: [-fullLength7 / 2 + terminatorWidth6 / 2, 0, height7 / 2],
286
+ material: componentMaterials.tinnedLead,
254
287
  color: "#ccc"
255
288
  }
256
289
  )
@@ -272,6 +305,7 @@ var A2010 = ({ color = "#333" }) => {
272
305
  {
273
306
  size: [bodyLength8, width8, height8],
274
307
  offset: [0, 0, height8 / 2],
308
+ material: componentMaterials.moldedPlastic,
275
309
  color
276
310
  }
277
311
  ),
@@ -280,6 +314,7 @@ var A2010 = ({ color = "#333" }) => {
280
314
  {
281
315
  size: [terminatorWidth7, width8, height8],
282
316
  offset: [fullLength8 / 2 - terminatorWidth7 / 2, 0, height8 / 2],
317
+ material: componentMaterials.tinnedLead,
283
318
  color: "#ccc"
284
319
  }
285
320
  ),
@@ -288,6 +323,7 @@ var A2010 = ({ color = "#333" }) => {
288
323
  {
289
324
  size: [terminatorWidth7, width8, height8],
290
325
  offset: [-fullLength8 / 2 + terminatorWidth7 / 2, 0, height8 / 2],
326
+ material: componentMaterials.tinnedLead,
291
327
  color: "#ccc"
292
328
  }
293
329
  )
@@ -309,6 +345,7 @@ var A2512 = ({ color = "#333" }) => {
309
345
  {
310
346
  size: [bodyLength9, width9, height9],
311
347
  offset: [0, 0, height9 / 2],
348
+ material: componentMaterials.moldedPlastic,
312
349
  color
313
350
  }
314
351
  ),
@@ -317,6 +354,7 @@ var A2512 = ({ color = "#333" }) => {
317
354
  {
318
355
  size: [terminatorWidth8, width9, height9],
319
356
  offset: [fullLength9 / 2 - terminatorWidth8 / 2, 0, height9 / 2],
357
+ material: componentMaterials.tinnedLead,
320
358
  color: "#ccc"
321
359
  }
322
360
  ),
@@ -325,6 +363,7 @@ var A2512 = ({ color = "#333" }) => {
325
363
  {
326
364
  size: [terminatorWidth8, width9, height9],
327
365
  offset: [-fullLength9 / 2 + terminatorWidth8 / 2, 0, height9 / 2],
366
+ material: componentMaterials.tinnedLead,
328
367
  color: "#ccc"
329
368
  }
330
369
  )
@@ -551,7 +590,7 @@ var ChipBody = ({
551
590
  chamferCutout(-xOffset, -yOffset)
552
591
  ] });
553
592
  }
554
- return /* @__PURE__ */ jsx12(Colorize3, { color, children: /* @__PURE__ */ jsx12(Translate4, { offset: center, children: /* @__PURE__ */ jsx12(Translate4, { offset: { x: 0, y: 0, z: heightAboveSurface2 }, children: includeNotch ? /* @__PURE__ */ jsxs12(Subtract2, { children: [
593
+ return /* @__PURE__ */ jsx12(Colorize3, { color, material: componentMaterials.moldedPlastic, children: /* @__PURE__ */ jsx12(Translate4, { offset: center, children: /* @__PURE__ */ jsx12(Translate4, { offset: { x: 0, y: 0, z: heightAboveSurface2 }, children: includeNotch ? /* @__PURE__ */ jsxs12(Subtract2, { children: [
555
594
  finalBody,
556
595
  /* @__PURE__ */ jsx12(Translate4, { offset: actualNotchPosition, children: /* @__PURE__ */ jsx12(Rotate2, { rotation: notchRotation, children: /* @__PURE__ */ jsx12(Cylinder2, { radius: actualNotchRadius, height: notchWidth }) }) })
557
596
  ] }) : finalBody }) }) });
@@ -663,18 +702,26 @@ var Crystal = ({
663
702
  })
664
703
  ];
665
704
  return /* @__PURE__ */ jsxs13(Fragment12, { children: [
666
- terminalPositions.map((center, index) => /* @__PURE__ */ jsx13(Colorize4, { color: "#d6a258", children: /* @__PURE__ */ jsx13(ExtrudeLinear, { height: terminalThickness, children: /* @__PURE__ */ jsx13(
667
- Polygon,
705
+ terminalPositions.map((center, index) => /* @__PURE__ */ jsx13(
706
+ Colorize4,
668
707
  {
669
- points: getTerminalPoints(
670
- center,
671
- terminalWidth,
672
- terminalLength,
673
- bodyChamfer,
674
- index === 0
675
- )
676
- }
677
- ) }) }, index)),
708
+ color: "#d6a258",
709
+ material: componentMaterials.goldContact,
710
+ children: /* @__PURE__ */ jsx13(ExtrudeLinear, { height: terminalThickness, children: /* @__PURE__ */ jsx13(
711
+ Polygon,
712
+ {
713
+ points: getTerminalPoints(
714
+ center,
715
+ terminalWidth,
716
+ terminalLength,
717
+ bodyChamfer,
718
+ index === 0
719
+ )
720
+ }
721
+ ) })
722
+ },
723
+ index
724
+ )),
678
725
  /* @__PURE__ */ jsx13(
679
726
  ChipBody,
680
727
  {
@@ -690,8 +737,8 @@ var Crystal = ({
690
737
  chamferSize: bodyChamfer
691
738
  }
692
739
  ),
693
- /* @__PURE__ */ jsx13(Colorize4, { color: "#d2a057", children: /* @__PURE__ */ jsx13(Hull2, { children: sealProfile }) }),
694
- /* @__PURE__ */ jsx13(Colorize4, { color: "#b9bec2", children: /* @__PURE__ */ jsx13(Hull2, { children: lidProfiles }) })
740
+ /* @__PURE__ */ jsx13(Colorize4, { color: "#d2a057", material: componentMaterials.goldContact, children: /* @__PURE__ */ jsx13(Hull2, { children: sealProfile }) }),
741
+ /* @__PURE__ */ jsx13(Colorize4, { color: "#b9bec2", material: componentMaterials.brushedMetal, children: /* @__PURE__ */ jsx13(Hull2, { children: lidProfiles }) })
695
742
  ] });
696
743
  };
697
744
 
@@ -717,7 +764,7 @@ var FootprintPad = ({
717
764
  }) => {
718
765
  const color = isPin1 ? [0, 255, 0] : [255, 0, 0];
719
766
  if (pad.shape === "rect" || pad.shape === "rotated_rect") {
720
- return /* @__PURE__ */ jsx14(Colorize5, { color, children: /* @__PURE__ */ jsx14(Translate5, { offset: [pad.x, pad.y, -5e-3], children: /* @__PURE__ */ jsx14(
767
+ return /* @__PURE__ */ jsx14(Colorize5, { color, material: componentMaterials.copper, children: /* @__PURE__ */ jsx14(Translate5, { offset: [pad.x, pad.y, -5e-3], children: /* @__PURE__ */ jsx14(
721
768
  Rotate3,
722
769
  {
723
770
  angles: [
@@ -731,14 +778,14 @@ var FootprintPad = ({
731
778
  }
732
779
  if (pad.shape === "circle") {
733
780
  const radius = pad.radius ?? pad.r ?? 0.25;
734
- return /* @__PURE__ */ jsx14(Colorize5, { color, children: /* @__PURE__ */ jsx14(Translate5, { offset: [pad.x, pad.y, -5e-3], children: /* @__PURE__ */ jsx14(Cylinder4, { radius, height: PAD_THICKNESS }) }) });
781
+ return /* @__PURE__ */ jsx14(Colorize5, { color, material: componentMaterials.copper, children: /* @__PURE__ */ jsx14(Translate5, { offset: [pad.x, pad.y, -5e-3], children: /* @__PURE__ */ jsx14(Cylinder4, { radius, height: PAD_THICKNESS }) }) });
735
782
  }
736
783
  if (pad.shape === "polygon") {
737
784
  const points = (pad.points ?? []).map(
738
785
  ({ x, y }) => [x, y]
739
786
  );
740
787
  if (points.length < 3) return null;
741
- return /* @__PURE__ */ jsx14(Colorize5, { color, children: /* @__PURE__ */ jsx14(Translate5, { offset: [0, 0, -5e-3], children: /* @__PURE__ */ jsx14(ExtrudeLinear2, { height: PAD_THICKNESS, children: /* @__PURE__ */ jsx14(Polygon2, { points }) }) }) });
788
+ return /* @__PURE__ */ jsx14(Colorize5, { color, material: componentMaterials.copper, children: /* @__PURE__ */ jsx14(Translate5, { offset: [0, 0, -5e-3], children: /* @__PURE__ */ jsx14(ExtrudeLinear2, { height: PAD_THICKNESS, children: /* @__PURE__ */ jsx14(Polygon2, { points }) }) }) });
742
789
  }
743
790
  throw new Error("Shape not supported: " + pad.shape);
744
791
  };
@@ -759,13 +806,13 @@ var FootprintPlatedHole = ({
759
806
  }) => {
760
807
  const color = isPin1 ? "#00ff00" : "#b87333";
761
808
  if (hole.shape === "circle") {
762
- return /* @__PURE__ */ jsx15(Colorize6, { color, children: /* @__PURE__ */ jsx15(Translate6, { offset: [hole.x, hole.y, -5e-3], children: /* @__PURE__ */ jsxs14(Subtract3, { children: [
809
+ return /* @__PURE__ */ jsx15(Colorize6, { color, material: componentMaterials.copper, children: /* @__PURE__ */ jsx15(Translate6, { offset: [hole.x, hole.y, -5e-3], children: /* @__PURE__ */ jsxs14(Subtract3, { children: [
763
810
  /* @__PURE__ */ jsx15(Cylinder5, { radius: hole.outer_diameter / 2, height: 0.01 }),
764
811
  /* @__PURE__ */ jsx15(Cylinder5, { radius: hole.hole_diameter / 2, height: 0.01 })
765
812
  ] }) }) });
766
813
  }
767
814
  if (hole.shape === "circular_hole_with_rect_pad") {
768
- return /* @__PURE__ */ jsx15(Colorize6, { color, children: /* @__PURE__ */ jsx15(Translate6, { offset: [hole.x, hole.y, 0], children: /* @__PURE__ */ jsxs14(Subtract3, { children: [
815
+ return /* @__PURE__ */ jsx15(Colorize6, { color, material: componentMaterials.copper, children: /* @__PURE__ */ jsx15(Translate6, { offset: [hole.x, hole.y, 0], children: /* @__PURE__ */ jsxs14(Subtract3, { children: [
769
816
  /* @__PURE__ */ jsx15(
770
817
  Cuboid14,
771
818
  {
@@ -783,7 +830,7 @@ var FootprintPlatedHole = ({
783
830
  const isHorizontal = width10 > height10;
784
831
  const holeWidth = hole.hole_width ?? 0.8;
785
832
  const holeHeight = hole.hole_height ?? 0.8;
786
- return /* @__PURE__ */ jsx15(Colorize6, { color, children: /* @__PURE__ */ jsx15(Translate6, { offset: [hole.x, hole.y, 0], children: /* @__PURE__ */ jsxs14(Subtract3, { children: [
833
+ return /* @__PURE__ */ jsx15(Colorize6, { color, material: componentMaterials.copper, children: /* @__PURE__ */ jsx15(Translate6, { offset: [hole.x, hole.y, 0], children: /* @__PURE__ */ jsxs14(Subtract3, { children: [
787
834
  /* @__PURE__ */ jsxs14(Hull3, { children: [
788
835
  /* @__PURE__ */ jsx15(
789
836
  Cylinder5,
@@ -1344,7 +1391,7 @@ function HexSocketBolt({
1344
1391
  color = "#737e8f",
1345
1392
  ...props
1346
1393
  }) {
1347
- return /* @__PURE__ */ jsx19(Colorize9, { color, children: /* @__PURE__ */ jsx19(Custom3, { geometry: createHexSocketBoltGeom(props) }) });
1394
+ return /* @__PURE__ */ jsx19(Colorize9, { color, material: componentMaterials.steel, children: /* @__PURE__ */ jsx19(Custom3, { geometry: createHexSocketBoltGeom(props) }) });
1348
1395
  }
1349
1396
 
1350
1397
  // lib/SheetMetal.tsx
@@ -1501,7 +1548,7 @@ function createSheetMetalGeom(input) {
1501
1548
  return indexedMeshToGeom3(createSheetMetalMesh(input));
1502
1549
  }
1503
1550
  function SheetMetal({ color = "#737e8f", ...props }) {
1504
- return /* @__PURE__ */ jsx20(Colorize10, { color, children: /* @__PURE__ */ jsx20(Custom4, { geometry: createSheetMetalGeom(props) }) });
1551
+ return /* @__PURE__ */ jsx20(Colorize10, { color, material: componentMaterials.brushedMetal, children: /* @__PURE__ */ jsx20(Custom4, { geometry: createSheetMetalGeom(props) }) });
1505
1552
  }
1506
1553
 
1507
1554
  // lib/SpurGear.tsx
@@ -1912,23 +1959,40 @@ function NemaMotor({
1912
1959
  return /* @__PURE__ */ jsx23(
1913
1960
  Colorize13,
1914
1961
  {
1962
+ material: section.name === "body" ? componentMaterials.moldedPlastic : section.name === "shaft" ? componentMaterials.steel : componentMaterials.brushedMetal,
1915
1963
  color: section.name === "body" ? bodyColor : section.name === "shaft" ? shaftColor : capColor,
1916
1964
  children: /* @__PURE__ */ jsx23(Custom7, { geometry: generalize({ simplify: true }, geometry) })
1917
1965
  },
1918
1966
  `${section.name}-${index}`
1919
1967
  );
1920
1968
  }),
1921
- createNemaMotorWireGeometry(p).map(({ geometry, color }, index) => /* @__PURE__ */ jsx23(Colorize13, { color, children: /* @__PURE__ */ jsx23(Custom7, { geometry: generalize({ simplify: true }, geometry) }) }, `wire-${index}`)),
1969
+ createNemaMotorWireGeometry(p).map(({ geometry, color }, index) => /* @__PURE__ */ jsx23(
1970
+ Colorize13,
1971
+ {
1972
+ material: componentMaterials.rubber,
1973
+ color,
1974
+ children: /* @__PURE__ */ jsx23(Custom7, { geometry: generalize({ simplify: true }, geometry) })
1975
+ },
1976
+ `wire-${index}`
1977
+ )),
1922
1978
  screw && [-halfPitch, halfPitch].flatMap(
1923
- (x) => [-halfPitch, halfPitch].map((y) => /* @__PURE__ */ jsx23(Colorize13, { color: screwColor, children: /* @__PURE__ */ jsx23(
1924
- Custom7,
1979
+ (x) => [-halfPitch, halfPitch].map((y) => /* @__PURE__ */ jsx23(
1980
+ Colorize13,
1925
1981
  {
1926
- geometry: jscad3.transforms.translate(
1927
- [x, y, -p.bodyLength],
1928
- generalize({ simplify: true }, screw)
1982
+ material: componentMaterials.steel,
1983
+ color: screwColor,
1984
+ children: /* @__PURE__ */ jsx23(
1985
+ Custom7,
1986
+ {
1987
+ geometry: jscad3.transforms.translate(
1988
+ [x, y, -p.bodyLength],
1989
+ generalize({ simplify: true }, screw)
1990
+ )
1991
+ }
1929
1992
  )
1930
- }
1931
- ) }, `rear-screw-${x}-${y}`))
1993
+ },
1994
+ `rear-screw-${x}-${y}`
1995
+ ))
1932
1996
  )
1933
1997
  ] });
1934
1998
  }
@@ -2247,12 +2311,19 @@ var heightAboveSurface = 0.5;
2247
2311
  var DipPinLeg = ({ x, y, z }) => {
2248
2312
  const isRotated = x > 0;
2249
2313
  return /* @__PURE__ */ jsxs18(Fragment16, { children: [
2250
- /* @__PURE__ */ jsx26(Translate8, { offset: { x: x + 0.25 / 2, y, z }, children: /* @__PURE__ */ jsx26(Rotate4, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx26(ExtrudeLinear3, { height: 0.25, children: /* @__PURE__ */ jsx26(
2251
- Polygon3,
2314
+ /* @__PURE__ */ jsx26(
2315
+ Translate8,
2252
2316
  {
2253
- points: svgPathPoints.slice().reverse().map((p) => [p.x, p.y])
2317
+ material: componentMaterials.tinnedLead,
2318
+ offset: { x: x + 0.25 / 2, y, z },
2319
+ children: /* @__PURE__ */ jsx26(Rotate4, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx26(ExtrudeLinear3, { height: 0.25, children: /* @__PURE__ */ jsx26(
2320
+ Polygon3,
2321
+ {
2322
+ points: svgPathPoints.slice().reverse().map((p) => [p.x, p.y])
2323
+ }
2324
+ ) }) })
2254
2325
  }
2255
- ) }) }) }),
2326
+ ),
2256
2327
  /* @__PURE__ */ jsx26(
2257
2328
  Translate8,
2258
2329
  {
@@ -2348,7 +2419,7 @@ var SmdChipLead = (props) => {
2348
2419
  const N = 15;
2349
2420
  const points = Array.from({ length: N }).map((_, i) => i / (N - 1) * bodyDistance).map((x) => [x, calculateSCurve(x, props)]);
2350
2421
  const polygon = getExpandedStroke(points, thickness);
2351
- return /* @__PURE__ */ jsx27(Colorize15, { color: "#fff", children: /* @__PURE__ */ jsx27(Translate9, { offset: { z: 0, y: 0, x: 0, ...props.position }, children: /* @__PURE__ */ jsx27(Rotate5, { rotation: ["90deg", 0, rotation ?? 0], children: /* @__PURE__ */ jsx27(Translate9, { offset: { x: 0, y: 0, z: -width10 / 2 }, children: /* @__PURE__ */ jsx27(ExtrudeLinear4, { height: width10, children: /* @__PURE__ */ jsx27(Polygon4, { points: polygon.map((p) => [p.x, p.y]) }) }) }) }) }) });
2422
+ return /* @__PURE__ */ jsx27(Colorize15, { color: "#c4c7ca", material: componentMaterials.tinnedLead, children: /* @__PURE__ */ jsx27(Translate9, { offset: { z: 0, y: 0, x: 0, ...props.position }, children: /* @__PURE__ */ jsx27(Rotate5, { rotation: ["90deg", 0, rotation ?? 0], children: /* @__PURE__ */ jsx27(Translate9, { offset: { x: 0, y: 0, z: -width10 / 2 }, children: /* @__PURE__ */ jsx27(ExtrudeLinear4, { height: width10, children: /* @__PURE__ */ jsx27(Polygon4, { points: polygon.map((p) => [p.x, p.y]) }) }) }) }) }) });
2352
2423
  };
2353
2424
 
2354
2425
  // lib/Tssop.tsx
@@ -2737,69 +2808,84 @@ var PinHeader = ({
2737
2808
  Cuboid17,
2738
2809
  {
2739
2810
  color: "#222",
2811
+ material: componentMaterials.moldedPlastic,
2740
2812
  size: [bodyLength10, bodyWidth, bodyHeight],
2741
2813
  center: [x, y, flipZ(bodyHeight / 2)]
2742
2814
  }
2743
2815
  ) }),
2744
- /* @__PURE__ */ jsx32(Colorize17, { color: PIN_METAL_COLOR, children: smd ? /* @__PURE__ */ jsx32(
2745
- SmdChipLead,
2816
+ /* @__PURE__ */ jsx32(
2817
+ Colorize17,
2746
2818
  {
2747
- rotation: -Math.PI / 2,
2748
- position: {
2749
- x,
2750
- y: y + 1,
2751
- z: pinThickness / 2
2752
- },
2753
- thickness: pinThickness,
2754
- width: pinThickness,
2755
- height: pinThickness,
2756
- padContactLength: 2,
2757
- bodyDistance: 3
2758
- }
2759
- ) : /* @__PURE__ */ jsxs23(Hull5, { children: [
2760
- /* @__PURE__ */ jsx32(
2761
- Cuboid17,
2762
- {
2763
- color: PIN_METAL_COLOR,
2764
- size: [pinThickness, pinThickness, shortSidePinLength * 0.9],
2765
- center: [x, y, flipZ(bodyHeight * 0.9 + bodyHeight / 2)]
2766
- }
2767
- ),
2768
- /* @__PURE__ */ jsx32(
2769
- Cuboid17,
2770
- {
2771
- color: PIN_METAL_COLOR,
2772
- size: [
2773
- pinThickness / 1.8,
2774
- pinThickness / 1.8,
2775
- shortSidePinLength
2776
- ],
2777
- center: [x, y, flipZ(bodyHeight + bodyHeight / 2)]
2778
- }
2779
- )
2780
- ] }) }),
2781
- /* @__PURE__ */ jsx32(Colorize17, { color: PIN_METAL_COLOR, children: /* @__PURE__ */ jsx32(Translate11, { y: rightangle ? -3.9 : 0, z: rightangle ? 1 : 0, children: /* @__PURE__ */ jsx32(Rotate6, { rotation: rightangle ? [-Math.PI / 2, 0, 0] : [0, 0, 0], children: /* @__PURE__ */ jsxs23(Hull5, { children: [
2782
- /* @__PURE__ */ jsx32(
2783
- Cuboid17,
2784
- {
2785
- color: PIN_METAL_COLOR,
2786
- size: [pinThickness, pinThickness, longSidePinLength * 0.9],
2787
- center: [x, y, flipZ(-longSidePinLength / 2 * 0.9)]
2788
- }
2789
- ),
2790
- /* @__PURE__ */ jsx32(
2791
- Cuboid17,
2792
- {
2793
- color: PIN_METAL_COLOR,
2794
- size: [
2795
- pinThickness / 1.8,
2796
- pinThickness / 1.8,
2797
- longSidePinLength
2798
- ],
2799
- center: [x, y, flipZ(-longSidePinLength / 2)]
2800
- }
2801
- )
2802
- ] }) }) }) })
2819
+ color: PIN_METAL_COLOR,
2820
+ material: componentMaterials.goldContact,
2821
+ children: smd ? /* @__PURE__ */ jsx32(
2822
+ SmdChipLead,
2823
+ {
2824
+ rotation: -Math.PI / 2,
2825
+ position: {
2826
+ x,
2827
+ y: y + 1,
2828
+ z: pinThickness / 2
2829
+ },
2830
+ thickness: pinThickness,
2831
+ width: pinThickness,
2832
+ height: pinThickness,
2833
+ padContactLength: 2,
2834
+ bodyDistance: 3
2835
+ }
2836
+ ) : /* @__PURE__ */ jsxs23(Hull5, { children: [
2837
+ /* @__PURE__ */ jsx32(
2838
+ Cuboid17,
2839
+ {
2840
+ color: PIN_METAL_COLOR,
2841
+ size: [pinThickness, pinThickness, shortSidePinLength * 0.9],
2842
+ center: [x, y, flipZ(bodyHeight * 0.9 + bodyHeight / 2)]
2843
+ }
2844
+ ),
2845
+ /* @__PURE__ */ jsx32(
2846
+ Cuboid17,
2847
+ {
2848
+ color: PIN_METAL_COLOR,
2849
+ size: [
2850
+ pinThickness / 1.8,
2851
+ pinThickness / 1.8,
2852
+ shortSidePinLength
2853
+ ],
2854
+ center: [x, y, flipZ(bodyHeight + bodyHeight / 2)]
2855
+ }
2856
+ )
2857
+ ] })
2858
+ }
2859
+ ),
2860
+ /* @__PURE__ */ jsx32(
2861
+ Colorize17,
2862
+ {
2863
+ color: PIN_METAL_COLOR,
2864
+ material: componentMaterials.goldContact,
2865
+ children: /* @__PURE__ */ jsx32(Translate11, { y: rightangle ? -3.9 : 0, z: rightangle ? 1 : 0, children: /* @__PURE__ */ jsx32(Rotate6, { rotation: rightangle ? [-Math.PI / 2, 0, 0] : [0, 0, 0], children: /* @__PURE__ */ jsxs23(Hull5, { children: [
2866
+ /* @__PURE__ */ jsx32(
2867
+ Cuboid17,
2868
+ {
2869
+ color: PIN_METAL_COLOR,
2870
+ size: [pinThickness, pinThickness, longSidePinLength * 0.9],
2871
+ center: [x, y, flipZ(-longSidePinLength / 2 * 0.9)]
2872
+ }
2873
+ ),
2874
+ /* @__PURE__ */ jsx32(
2875
+ Cuboid17,
2876
+ {
2877
+ color: PIN_METAL_COLOR,
2878
+ size: [
2879
+ pinThickness / 1.8,
2880
+ pinThickness / 1.8,
2881
+ longSidePinLength
2882
+ ],
2883
+ center: [x, y, flipZ(-longSidePinLength / 2)]
2884
+ }
2885
+ )
2886
+ ] }) }) })
2887
+ }
2888
+ )
2803
2889
  ] });
2804
2890
  };
2805
2891
 
@@ -3081,7 +3167,7 @@ var LegacyQFN = ({
3081
3167
  pinPositions.push({ pn, x, y, pw, pl });
3082
3168
  }
3083
3169
  return /* @__PURE__ */ jsxs25(Fragment24, { children: [
3084
- /* @__PURE__ */ jsx35(Colorize19, { color: "grey", children: /* @__PURE__ */ jsx35(
3170
+ /* @__PURE__ */ jsx35(Colorize19, { material: componentMaterials.tinnedLead, color: "grey", children: /* @__PURE__ */ jsx35(
3085
3171
  Cuboid19,
3086
3172
  {
3087
3173
  center: [0, 0, bodyThickness / 2],
@@ -5265,11 +5351,11 @@ var DFN = ({
5265
5351
  }
5266
5352
  );
5267
5353
  return /* @__PURE__ */ jsxs51(Fragment51, { children: [
5268
- /* @__PURE__ */ jsx62(Colorize35, { color: "#25272a", children: pin1MarkWidth > 0 ? /* @__PURE__ */ jsxs51(Subtract8, { children: [
5354
+ /* @__PURE__ */ jsx62(Colorize35, { material: componentMaterials.moldedPlastic, color: "#25272a", children: pin1MarkWidth > 0 ? /* @__PURE__ */ jsxs51(Subtract8, { children: [
5269
5355
  body,
5270
5356
  stripe
5271
5357
  ] }) : body }),
5272
- /* @__PURE__ */ jsx62(Colorize35, { color: "#c7c9cd", children: pinPositions.map(
5358
+ /* @__PURE__ */ jsx62(Colorize35, { material: componentMaterials.tinnedLead, color: "#c7c9cd", children: pinPositions.map(
5273
5359
  (p) => p.pinNumber === 1 && pin1TerminalChamfer > 0 ? /* @__PURE__ */ jsxs51(Hull20, { children: [
5274
5360
  /* @__PURE__ */ jsx62(
5275
5361
  Cuboid36,
@@ -5309,6 +5395,7 @@ var DFN = ({
5309
5395
  thermalPadSize && /* @__PURE__ */ jsx62(
5310
5396
  Cuboid36,
5311
5397
  {
5398
+ material: componentMaterials.tinnedLead,
5312
5399
  color: "#c7c9cd",
5313
5400
  size: [
5314
5401
  thermalPadSize.width,
@@ -7014,99 +7101,114 @@ var JSTZH1_5mm = ({
7014
7101
  const bodyWidth = (numPins - 1) * pitch + 4;
7015
7102
  const startX = -((numPins - 1) * pitch) / 2;
7016
7103
  return /* @__PURE__ */ jsxs72(Fragment71, { children: [
7017
- /* @__PURE__ */ jsx83(Translate35, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx83(Rotate13, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx83(Colorize50, { color: bodyColor, children: /* @__PURE__ */ jsxs72(Subtract14, { children: [
7018
- /* @__PURE__ */ jsx83(
7019
- Cuboid49,
7020
- {
7021
- size: [bodyWidth, bodyDepth, bodyHeight],
7022
- center: [0, 0, bodyHeight / 2]
7023
- }
7024
- ),
7025
- /* @__PURE__ */ jsx83(
7026
- Cuboid49,
7027
- {
7028
- size: [
7029
- bodyWidth - wallThickness * 2,
7030
- bodyDepth - wallThickness * 2,
7031
- hollowHeight
7032
- ],
7033
- center: [0, 0, hollowHeight / 2]
7034
- }
7035
- ),
7036
- /* @__PURE__ */ jsx83(
7037
- Cuboid49,
7038
- {
7039
- size: [bodyWidth, bodyDepth / 3, hollowHeight],
7040
- center: [0, 0, hollowHeight / 6]
7041
- }
7042
- ),
7043
- /* @__PURE__ */ jsx83(
7044
- Cuboid49,
7045
- {
7046
- size: [
7047
- bodyWidth - wallThickness * 2,
7048
- wallThickness / 2,
7049
- hollowHeight
7050
- ],
7051
- center: [
7052
- 0,
7053
- bodyDepth / 2 - wallThickness / 4,
7054
- hollowHeight / 2
7055
- ]
7056
- }
7057
- ),
7058
- /* @__PURE__ */ jsx83(
7059
- Cuboid49,
7060
- {
7061
- size: [
7062
- bodyWidth - wallThickness * 2,
7063
- wallThickness / 2,
7064
- hollowHeight
7065
- ],
7066
- center: [
7067
- 0,
7068
- -bodyDepth / 2 + wallThickness / 4,
7069
- hollowHeight / 2
7070
- ]
7071
- }
7072
- ),
7073
- /* @__PURE__ */ jsx83(
7074
- Cuboid49,
7075
- {
7076
- size: [1, wallThickness + 2, 1],
7077
- center: [-bodyWidth / 4, bodyDepth / 2, bodyHeight / 2]
7078
- }
7079
- ),
7080
- /* @__PURE__ */ jsx83(
7081
- Cuboid49,
7082
- {
7083
- size: [1, wallThickness + 3, 1],
7084
- center: [bodyWidth / 4, bodyDepth / 2, bodyHeight / 2]
7085
- }
7086
- ),
7087
- /* @__PURE__ */ jsx83(
7088
- Cuboid49,
7089
- {
7090
- size: [1, wallThickness + 2, 1],
7091
- center: [-bodyWidth / 4, -bodyDepth / 2, bodyHeight / 2]
7092
- }
7093
- ),
7094
- /* @__PURE__ */ jsx83(
7095
- Cuboid49,
7096
- {
7097
- size: [1, wallThickness + 3, 1],
7098
- center: [bodyWidth / 4, -bodyDepth / 2, bodyHeight / 2]
7099
- }
7100
- )
7101
- ] }) }) }) }),
7102
- showPins && Array.from({ length: numPins }).map((_, i) => /* @__PURE__ */ jsx83(Colorize50, { color: pinColor, children: /* @__PURE__ */ jsx83(
7103
- Cylinder18,
7104
- {
7105
- height: pinLength,
7106
- radius: 0.35,
7107
- center: [startX + i * pitch, 0, 2.5]
7104
+ /* @__PURE__ */ jsx83(Translate35, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx83(Rotate13, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx83(
7105
+ Colorize50,
7106
+ {
7107
+ material: componentMaterials.moldedPlastic,
7108
+ color: bodyColor,
7109
+ children: /* @__PURE__ */ jsxs72(Subtract14, { children: [
7110
+ /* @__PURE__ */ jsx83(
7111
+ Cuboid49,
7112
+ {
7113
+ size: [bodyWidth, bodyDepth, bodyHeight],
7114
+ center: [0, 0, bodyHeight / 2]
7115
+ }
7116
+ ),
7117
+ /* @__PURE__ */ jsx83(
7118
+ Cuboid49,
7119
+ {
7120
+ size: [
7121
+ bodyWidth - wallThickness * 2,
7122
+ bodyDepth - wallThickness * 2,
7123
+ hollowHeight
7124
+ ],
7125
+ center: [0, 0, hollowHeight / 2]
7126
+ }
7127
+ ),
7128
+ /* @__PURE__ */ jsx83(
7129
+ Cuboid49,
7130
+ {
7131
+ size: [bodyWidth, bodyDepth / 3, hollowHeight],
7132
+ center: [0, 0, hollowHeight / 6]
7133
+ }
7134
+ ),
7135
+ /* @__PURE__ */ jsx83(
7136
+ Cuboid49,
7137
+ {
7138
+ size: [
7139
+ bodyWidth - wallThickness * 2,
7140
+ wallThickness / 2,
7141
+ hollowHeight
7142
+ ],
7143
+ center: [
7144
+ 0,
7145
+ bodyDepth / 2 - wallThickness / 4,
7146
+ hollowHeight / 2
7147
+ ]
7148
+ }
7149
+ ),
7150
+ /* @__PURE__ */ jsx83(
7151
+ Cuboid49,
7152
+ {
7153
+ size: [
7154
+ bodyWidth - wallThickness * 2,
7155
+ wallThickness / 2,
7156
+ hollowHeight
7157
+ ],
7158
+ center: [
7159
+ 0,
7160
+ -bodyDepth / 2 + wallThickness / 4,
7161
+ hollowHeight / 2
7162
+ ]
7163
+ }
7164
+ ),
7165
+ /* @__PURE__ */ jsx83(
7166
+ Cuboid49,
7167
+ {
7168
+ size: [1, wallThickness + 2, 1],
7169
+ center: [-bodyWidth / 4, bodyDepth / 2, bodyHeight / 2]
7170
+ }
7171
+ ),
7172
+ /* @__PURE__ */ jsx83(
7173
+ Cuboid49,
7174
+ {
7175
+ size: [1, wallThickness + 3, 1],
7176
+ center: [bodyWidth / 4, bodyDepth / 2, bodyHeight / 2]
7177
+ }
7178
+ ),
7179
+ /* @__PURE__ */ jsx83(
7180
+ Cuboid49,
7181
+ {
7182
+ size: [1, wallThickness + 2, 1],
7183
+ center: [-bodyWidth / 4, -bodyDepth / 2, bodyHeight / 2]
7184
+ }
7185
+ ),
7186
+ /* @__PURE__ */ jsx83(
7187
+ Cuboid49,
7188
+ {
7189
+ size: [1, wallThickness + 3, 1],
7190
+ center: [bodyWidth / 4, -bodyDepth / 2, bodyHeight / 2]
7191
+ }
7192
+ )
7193
+ ] })
7108
7194
  }
7109
- ) }, i)),
7195
+ ) }) }),
7196
+ showPins && Array.from({ length: numPins }).map((_, i) => /* @__PURE__ */ jsx83(
7197
+ Colorize50,
7198
+ {
7199
+ material: componentMaterials.tinnedLead,
7200
+ color: pinColor,
7201
+ children: /* @__PURE__ */ jsx83(
7202
+ Cylinder18,
7203
+ {
7204
+ height: pinLength,
7205
+ radius: 0.35,
7206
+ center: [startX + i * pitch, 0, 2.5]
7207
+ }
7208
+ )
7209
+ },
7210
+ i
7211
+ )),
7110
7212
  showFootprint && Array.from({ length: numPins }).map((_, i) => {
7111
7213
  const isPin1 = i === 0;
7112
7214
  const hole = isPin1 ? {
@@ -7181,120 +7283,135 @@ var JSTPH2_0mm = ({
7181
7283
  const topReliefWidth = 0.8;
7182
7284
  const topReliefDepth = 0.65;
7183
7285
  return /* @__PURE__ */ jsxs73(Fragment72, { children: [
7184
- /* @__PURE__ */ jsx84(Translate36, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx84(Rotate14, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx84(Colorize51, { color: bodyColor, children: /* @__PURE__ */ jsxs73(Subtract15, { children: [
7185
- /* @__PURE__ */ jsx84(
7186
- Cuboid50,
7187
- {
7188
- size: [bodyWidth, bodyDepth, bodyHeight],
7189
- center: [0, 0, bodyHeight / 2]
7190
- }
7191
- ),
7192
- /* @__PURE__ */ jsx84(
7193
- Cuboid50,
7194
- {
7195
- size: [
7196
- bodyWidth - wallThickness * 2,
7197
- bodyDepth - wallThickness * 2,
7198
- hollowHeight
7199
- ],
7200
- center: [0, 0, hollowHeight / 2]
7201
- }
7202
- ),
7203
- /* @__PURE__ */ jsx84(
7204
- Cuboid50,
7205
- {
7206
- size: [bodyWidth, bodyDepth / 3, hollowHeight],
7207
- center: [0, 0, hollowHeight / 6]
7208
- }
7209
- ),
7210
- /* @__PURE__ */ jsx84(
7211
- Cuboid50,
7212
- {
7213
- size: [
7214
- bodyWidth - wallThickness * 2,
7215
- wallThickness / 2,
7216
- hollowHeight
7217
- ],
7218
- center: [
7219
- 0,
7220
- bodyDepth / 2 - wallThickness / 4,
7221
- hollowHeight / 2
7222
- ]
7223
- }
7224
- ),
7225
- /* @__PURE__ */ jsx84(
7226
- Cuboid50,
7227
- {
7228
- size: [
7229
- bodyWidth - wallThickness * 2,
7230
- wallThickness / 2,
7231
- hollowHeight
7232
- ],
7233
- center: [
7234
- 0,
7235
- -bodyDepth / 2 + wallThickness / 4,
7236
- hollowHeight / 2
7237
- ]
7238
- }
7239
- ),
7240
- /* @__PURE__ */ jsx84(
7241
- Cuboid50,
7242
- {
7243
- size: [
7244
- latchWindowWidth,
7245
- bodyDepth + wallThickness,
7246
- latchWindowHeight
7247
- ],
7248
- center: [-bodyWidth / 2 + latchWindowInset, 0, bodyHeight / 2]
7249
- }
7250
- ),
7251
- /* @__PURE__ */ jsx84(
7252
- Cuboid50,
7253
- {
7254
- size: [
7255
- latchWindowWidth,
7256
- bodyDepth + wallThickness,
7257
- latchWindowHeight
7258
- ],
7259
- center: [bodyWidth / 2 - latchWindowInset, 0, bodyHeight / 2]
7260
- }
7261
- ),
7262
- /* @__PURE__ */ jsx84(
7263
- Cuboid50,
7264
- {
7265
- size: [wallThickness * 3, topReliefWidth, topReliefDepth],
7266
- center: [-bodyWidth / 2, 0, topReliefDepth / 2]
7267
- }
7268
- ),
7269
- /* @__PURE__ */ jsx84(Translate36, { offset: [-bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx84(Rotate14, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx84(
7270
- Cylinder19,
7271
- {
7272
- height: wallThickness * 3,
7273
- radius: topReliefWidth / 2
7274
- }
7275
- ) }) }),
7276
- /* @__PURE__ */ jsx84(
7277
- Cuboid50,
7278
- {
7279
- size: [wallThickness * 3, topReliefWidth, topReliefDepth],
7280
- center: [bodyWidth / 2, 0, topReliefDepth / 2]
7281
- }
7282
- ),
7283
- /* @__PURE__ */ jsx84(Translate36, { offset: [bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx84(Rotate14, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx84(
7284
- Cylinder19,
7285
- {
7286
- height: wallThickness * 3,
7287
- radius: topReliefWidth / 2
7288
- }
7289
- ) }) })
7290
- ] }) }) }) }),
7291
- showPins && Array.from({ length: numPins }).map((_, i) => /* @__PURE__ */ jsx84(Colorize51, { color: pinColor, children: /* @__PURE__ */ jsx84(
7292
- Cuboid50,
7293
- {
7294
- size: [pinThickness, pinThickness, pinLength],
7295
- center: [startX + i * pitch, 0, (pinTop - pinTailLength) / 2]
7286
+ /* @__PURE__ */ jsx84(Translate36, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx84(Rotate14, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx84(
7287
+ Colorize51,
7288
+ {
7289
+ color: bodyColor,
7290
+ material: componentMaterials.moldedPlastic,
7291
+ children: /* @__PURE__ */ jsxs73(Subtract15, { children: [
7292
+ /* @__PURE__ */ jsx84(
7293
+ Cuboid50,
7294
+ {
7295
+ size: [bodyWidth, bodyDepth, bodyHeight],
7296
+ center: [0, 0, bodyHeight / 2]
7297
+ }
7298
+ ),
7299
+ /* @__PURE__ */ jsx84(
7300
+ Cuboid50,
7301
+ {
7302
+ size: [
7303
+ bodyWidth - wallThickness * 2,
7304
+ bodyDepth - wallThickness * 2,
7305
+ hollowHeight
7306
+ ],
7307
+ center: [0, 0, hollowHeight / 2]
7308
+ }
7309
+ ),
7310
+ /* @__PURE__ */ jsx84(
7311
+ Cuboid50,
7312
+ {
7313
+ size: [bodyWidth, bodyDepth / 3, hollowHeight],
7314
+ center: [0, 0, hollowHeight / 6]
7315
+ }
7316
+ ),
7317
+ /* @__PURE__ */ jsx84(
7318
+ Cuboid50,
7319
+ {
7320
+ size: [
7321
+ bodyWidth - wallThickness * 2,
7322
+ wallThickness / 2,
7323
+ hollowHeight
7324
+ ],
7325
+ center: [
7326
+ 0,
7327
+ bodyDepth / 2 - wallThickness / 4,
7328
+ hollowHeight / 2
7329
+ ]
7330
+ }
7331
+ ),
7332
+ /* @__PURE__ */ jsx84(
7333
+ Cuboid50,
7334
+ {
7335
+ size: [
7336
+ bodyWidth - wallThickness * 2,
7337
+ wallThickness / 2,
7338
+ hollowHeight
7339
+ ],
7340
+ center: [
7341
+ 0,
7342
+ -bodyDepth / 2 + wallThickness / 4,
7343
+ hollowHeight / 2
7344
+ ]
7345
+ }
7346
+ ),
7347
+ /* @__PURE__ */ jsx84(
7348
+ Cuboid50,
7349
+ {
7350
+ size: [
7351
+ latchWindowWidth,
7352
+ bodyDepth + wallThickness,
7353
+ latchWindowHeight
7354
+ ],
7355
+ center: [-bodyWidth / 2 + latchWindowInset, 0, bodyHeight / 2]
7356
+ }
7357
+ ),
7358
+ /* @__PURE__ */ jsx84(
7359
+ Cuboid50,
7360
+ {
7361
+ size: [
7362
+ latchWindowWidth,
7363
+ bodyDepth + wallThickness,
7364
+ latchWindowHeight
7365
+ ],
7366
+ center: [bodyWidth / 2 - latchWindowInset, 0, bodyHeight / 2]
7367
+ }
7368
+ ),
7369
+ /* @__PURE__ */ jsx84(
7370
+ Cuboid50,
7371
+ {
7372
+ size: [wallThickness * 3, topReliefWidth, topReliefDepth],
7373
+ center: [-bodyWidth / 2, 0, topReliefDepth / 2]
7374
+ }
7375
+ ),
7376
+ /* @__PURE__ */ jsx84(Translate36, { offset: [-bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx84(Rotate14, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx84(
7377
+ Cylinder19,
7378
+ {
7379
+ height: wallThickness * 3,
7380
+ radius: topReliefWidth / 2
7381
+ }
7382
+ ) }) }),
7383
+ /* @__PURE__ */ jsx84(
7384
+ Cuboid50,
7385
+ {
7386
+ size: [wallThickness * 3, topReliefWidth, topReliefDepth],
7387
+ center: [bodyWidth / 2, 0, topReliefDepth / 2]
7388
+ }
7389
+ ),
7390
+ /* @__PURE__ */ jsx84(Translate36, { offset: [bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx84(Rotate14, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx84(
7391
+ Cylinder19,
7392
+ {
7393
+ height: wallThickness * 3,
7394
+ radius: topReliefWidth / 2
7395
+ }
7396
+ ) }) })
7397
+ ] })
7296
7398
  }
7297
- ) }, i)),
7399
+ ) }) }),
7400
+ showPins && Array.from({ length: numPins }).map((_, i) => /* @__PURE__ */ jsx84(
7401
+ Colorize51,
7402
+ {
7403
+ color: pinColor,
7404
+ material: componentMaterials.tinnedLead,
7405
+ children: /* @__PURE__ */ jsx84(
7406
+ Cuboid50,
7407
+ {
7408
+ size: [pinThickness, pinThickness, pinLength],
7409
+ center: [startX + i * pitch, 0, (pinTop - pinTailLength) / 2]
7410
+ }
7411
+ )
7412
+ },
7413
+ i
7414
+ )),
7298
7415
  showFootprint && Array.from({ length: numPins }).map((_, i) => {
7299
7416
  const isPin1 = i === 0;
7300
7417
  const hole = isPin1 ? {
@@ -7367,7 +7484,7 @@ var JSTXH2_5mm = ({
7367
7484
  );
7368
7485
  const lockNotchHeight = 2.4;
7369
7486
  return /* @__PURE__ */ jsxs74(Fragment73, { children: [
7370
- /* @__PURE__ */ jsx85(Translate37, { offset: [0, 0, bodyHeight / 2], children: /* @__PURE__ */ jsx85(Colorize52, { color: bodyColor, children: /* @__PURE__ */ jsxs74(Subtract16, { children: [
7487
+ /* @__PURE__ */ jsx85(Translate37, { offset: [0, 0, bodyHeight / 2], children: /* @__PURE__ */ jsx85(Colorize52, { material: componentMaterials.moldedPlastic, color: bodyColor, children: /* @__PURE__ */ jsxs74(Subtract16, { children: [
7371
7488
  /* @__PURE__ */ jsx85(Cuboid51, { size: [bodyWidth, bodyDepth, bodyHeight] }),
7372
7489
  /* @__PURE__ */ jsx85(Translate37, { offset: [0, 0, (bodyHeight - hollowHeight) / 2 + 0.1], children: /* @__PURE__ */ jsx85(
7373
7490
  Cuboid51,
@@ -7444,7 +7561,15 @@ var JSTXH2_5mm = ({
7444
7561
  `vent_${i}`
7445
7562
  ))
7446
7563
  ] }) }) }),
7447
- showPins && Array.from({ length: numPins }).map((_, i) => /* @__PURE__ */ jsx85(Colorize52, { color: pinColor, children: /* @__PURE__ */ jsx85(Translate37, { offset: [startX + i * pitch, 0, pinLength / 2 - 3.4], children: /* @__PURE__ */ jsx85(Cuboid51, { size: [0.64, 0.64, pinLength] }) }) }, i)),
7564
+ showPins && Array.from({ length: numPins }).map((_, i) => /* @__PURE__ */ jsx85(
7565
+ Colorize52,
7566
+ {
7567
+ material: componentMaterials.tinnedLead,
7568
+ color: pinColor,
7569
+ children: /* @__PURE__ */ jsx85(Translate37, { offset: [startX + i * pitch, 0, pinLength / 2 - 3.4], children: /* @__PURE__ */ jsx85(Cuboid51, { size: [0.64, 0.64, pinLength] }) })
7570
+ },
7571
+ i
7572
+ )),
7448
7573
  showFootprint && (() => {
7449
7574
  try {
7450
7575
  const circuitJson = fp3.string(`jst${numPins}_xh`).circuitJson();
@@ -7499,7 +7624,7 @@ var JstSh = ({ footprint = "jst6_sh" }) => {
7499
7624
  const y = rowY + direction * 1.8, width10 = n + 2, depth = 2.9, height10 = 4.2;
7500
7625
  const pinY = y - direction * 0.25;
7501
7626
  return /* @__PURE__ */ jsxs75(Rotate15, { rotation: [0, 0, angle], children: [
7502
- /* @__PURE__ */ jsx86(Colorize53, { color: "#e4e1d6", children: /* @__PURE__ */ jsxs75(Subtract17, { children: [
7627
+ /* @__PURE__ */ jsx86(Colorize53, { material: componentMaterials.moldedPlastic, color: "#e4e1d6", children: /* @__PURE__ */ jsxs75(Subtract17, { children: [
7503
7628
  /* @__PURE__ */ jsx86(
7504
7629
  Cuboid52,
7505
7630
  {
@@ -7535,7 +7660,7 @@ var JstSh = ({ footprint = "jst6_sh" }) => {
7535
7660
  side
7536
7661
  ))
7537
7662
  ] }) }),
7538
- /* @__PURE__ */ jsxs75(Colorize53, { color: "#c6c7c9", children: [
7663
+ /* @__PURE__ */ jsxs75(Colorize53, { material: componentMaterials.tinnedLead, color: "#c6c7c9", children: [
7539
7664
  signals.map((pad, i) => {
7540
7665
  const tailY = pad.y - direction * pad.height * 0.4;
7541
7666
  return /* @__PURE__ */ jsxs75(Union23, { children: [
@@ -8019,6 +8144,7 @@ var ParametricChip = ({
8019
8144
  {
8020
8145
  size: [bodyLength10, width10, height10],
8021
8146
  offset: [0, 0, height10 / 2],
8147
+ material: componentMaterials.moldedPlastic,
8022
8148
  color
8023
8149
  }
8024
8150
  ),
@@ -8027,6 +8153,7 @@ var ParametricChip = ({
8027
8153
  {
8028
8154
  size: [terminatorWidth9, height10, width10],
8029
8155
  offset: [fullLength10 / 2 - terminatorWidth9 / 2, 0, height10 / 2],
8156
+ material: componentMaterials.tinnedLead,
8030
8157
  color: "#ccc"
8031
8158
  }
8032
8159
  ),
@@ -8035,6 +8162,7 @@ var ParametricChip = ({
8035
8162
  {
8036
8163
  size: [terminatorWidth9, height10, width10],
8037
8164
  offset: [-fullLength10 / 2 + terminatorWidth9 / 2, 0, height10 / 2],
8165
+ material: componentMaterials.tinnedLead,
8038
8166
  color: "#ccc"
8039
8167
  }
8040
8168
  )
@@ -8454,14 +8582,14 @@ var DPAK = ({
8454
8582
  const leadZ = tabThickness / 2;
8455
8583
  const leadThickness = 0.4;
8456
8584
  return /* @__PURE__ */ jsxs83(Fragment81, { children: [
8457
- /* @__PURE__ */ jsx94(Colorize59, { color: tabColor, children: /* @__PURE__ */ jsx94(
8585
+ /* @__PURE__ */ jsx94(Colorize59, { material: componentMaterials.tinnedLead, color: tabColor, children: /* @__PURE__ */ jsx94(
8458
8586
  Cuboid59,
8459
8587
  {
8460
8588
  size: [tabWidth, tabLength, tabThickness],
8461
8589
  center: [tabCenterX, 0, tabThickness / 2]
8462
8590
  }
8463
8591
  ) }),
8464
- /* @__PURE__ */ jsx94(Colorize59, { color, children: /* @__PURE__ */ jsx94(
8592
+ /* @__PURE__ */ jsx94(Colorize59, { material: componentMaterials.moldedPlastic, color, children: /* @__PURE__ */ jsx94(
8465
8593
  Cuboid59,
8466
8594
  {
8467
8595
  size: [bodyWidth, bodyLength10, bodyHeight],
@@ -8469,39 +8597,47 @@ var DPAK = ({
8469
8597
  }
8470
8598
  ) }),
8471
8599
  [-1, 1].map((side) => {
8472
- return /* @__PURE__ */ jsxs83(Colorize59, { color: leadColor, children: [
8473
- /* @__PURE__ */ jsx94(
8474
- Cuboid59,
8475
- {
8476
- size: [leadContactLength, leadWidth, leadThickness],
8477
- center: [
8478
- leadPadX + leadContactLength / 2,
8479
- side * pitch,
8480
- leadThickness / 2
8481
- ]
8482
- }
8483
- ),
8484
- /* @__PURE__ */ jsxs83(Hull28, { children: [
8485
- /* @__PURE__ */ jsx94(
8486
- Cuboid59,
8487
- {
8488
- size: [0.1, leadWidth, leadThickness],
8489
- center: [
8490
- leadPadX + leadContactLength,
8491
- side * pitch,
8492
- leadThickness / 2
8493
- ]
8494
- }
8495
- ),
8496
- /* @__PURE__ */ jsx94(
8497
- Cuboid59,
8498
- {
8499
- size: [0.1, leadWidth, leadThickness],
8500
- center: [bodyFrontX, side * pitch, leadZ + tabThickness / 2]
8501
- }
8502
- )
8503
- ] })
8504
- ] }, `lead-${side}`);
8600
+ return /* @__PURE__ */ jsxs83(
8601
+ Colorize59,
8602
+ {
8603
+ material: componentMaterials.tinnedLead,
8604
+ color: leadColor,
8605
+ children: [
8606
+ /* @__PURE__ */ jsx94(
8607
+ Cuboid59,
8608
+ {
8609
+ size: [leadContactLength, leadWidth, leadThickness],
8610
+ center: [
8611
+ leadPadX + leadContactLength / 2,
8612
+ side * pitch,
8613
+ leadThickness / 2
8614
+ ]
8615
+ }
8616
+ ),
8617
+ /* @__PURE__ */ jsxs83(Hull28, { children: [
8618
+ /* @__PURE__ */ jsx94(
8619
+ Cuboid59,
8620
+ {
8621
+ size: [0.1, leadWidth, leadThickness],
8622
+ center: [
8623
+ leadPadX + leadContactLength,
8624
+ side * pitch,
8625
+ leadThickness / 2
8626
+ ]
8627
+ }
8628
+ ),
8629
+ /* @__PURE__ */ jsx94(
8630
+ Cuboid59,
8631
+ {
8632
+ size: [0.1, leadWidth, leadThickness],
8633
+ center: [bodyFrontX, side * pitch, leadZ + tabThickness / 2]
8634
+ }
8635
+ )
8636
+ ] })
8637
+ ]
8638
+ },
8639
+ `lead-${side}`
8640
+ );
8505
8641
  })
8506
8642
  ] });
8507
8643
  };
@@ -8533,7 +8669,7 @@ var ElectrolyticCapacitor = ({
8533
8669
  const grooveWidth = Math.max(diameter * 0.06, 0.2);
8534
8670
  const grooveDepth = 0.3;
8535
8671
  return /* @__PURE__ */ jsxs84(Fragment82, { children: [
8536
- /* @__PURE__ */ jsx95(Colorize60, { color: baseColor, children: /* @__PURE__ */ jsx95(
8672
+ /* @__PURE__ */ jsx95(Colorize60, { color: baseColor, material: componentMaterials.rubber, children: /* @__PURE__ */ jsx95(
8537
8673
  Cylinder23,
8538
8674
  {
8539
8675
  radius: radius - 0.05,
@@ -8541,7 +8677,7 @@ var ElectrolyticCapacitor = ({
8541
8677
  center: [0, 0, baseHeight / 2]
8542
8678
  }
8543
8679
  ) }),
8544
- /* @__PURE__ */ jsx95(Colorize60, { color: sleeveColor, children: /* @__PURE__ */ jsxs84(Subtract21, { children: [
8680
+ /* @__PURE__ */ jsx95(Colorize60, { color: sleeveColor, material: componentMaterials.sleeve, children: /* @__PURE__ */ jsxs84(Subtract21, { children: [
8545
8681
  /* @__PURE__ */ jsx95(
8546
8682
  RoundedCylinder5,
8547
8683
  {
@@ -8566,14 +8702,22 @@ var ElectrolyticCapacitor = ({
8566
8702
  }
8567
8703
  )
8568
8704
  ] }) }),
8569
- [-1, 1].map((side) => /* @__PURE__ */ jsx95(Colorize60, { color: "#c0c0c0", children: /* @__PURE__ */ jsx95(
8570
- Cylinder23,
8705
+ [-1, 1].map((side) => /* @__PURE__ */ jsx95(
8706
+ Colorize60,
8571
8707
  {
8572
- radius: leadDiameter / 2,
8573
- height: leadLength + baseHeight,
8574
- center: [side * leadPitch / 2, 0, (baseHeight - leadLength) / 2]
8575
- }
8576
- ) }, `lead-${side}`))
8708
+ material: componentMaterials.tinnedLead,
8709
+ color: "#c0c0c0",
8710
+ children: /* @__PURE__ */ jsx95(
8711
+ Cylinder23,
8712
+ {
8713
+ radius: leadDiameter / 2,
8714
+ height: leadLength + baseHeight,
8715
+ center: [side * leadPitch / 2, 0, (baseHeight - leadLength) / 2]
8716
+ }
8717
+ )
8718
+ },
8719
+ `lead-${side}`
8720
+ ))
8577
8721
  ] });
8578
8722
  };
8579
8723
 
@@ -8852,7 +8996,7 @@ var UsbCMidmount = ({
8852
8996
  );
8853
8997
  const tabBottom = -0.9, tabTop = centerZ + 0.1;
8854
8998
  return /* @__PURE__ */ jsxs89(Rotate21, { rotation: [0, 0, angle], children: [
8855
- /* @__PURE__ */ jsx100(Colorize65, { color: "#b8bdc4", children: /* @__PURE__ */ jsx100(Translate44, { offset: [0, centerY, centerZ], children: /* @__PURE__ */ jsxs89(Subtract24, { children: [
8999
+ /* @__PURE__ */ jsx100(Colorize65, { color: "#b8bdc4", material: componentMaterials.brushedMetal, children: /* @__PURE__ */ jsx100(Translate44, { offset: [0, centerY, centerZ], children: /* @__PURE__ */ jsxs89(Subtract24, { children: [
8856
9000
  /* @__PURE__ */ jsx100(Capsule, { width: width10, height: height10, depth }),
8857
9001
  /* @__PURE__ */ jsx100(
8858
9002
  Capsule,
@@ -8863,7 +9007,7 @@ var UsbCMidmount = ({
8863
9007
  }
8864
9008
  )
8865
9009
  ] }) }) }),
8866
- /* @__PURE__ */ jsxs89(Colorize65, { color: "#242529", children: [
9010
+ /* @__PURE__ */ jsxs89(Colorize65, { color: "#242529", material: componentMaterials.moldedPlastic, children: [
8867
9011
  /* @__PURE__ */ jsx100(
8868
9012
  Cuboid65,
8869
9013
  {
@@ -8884,7 +9028,7 @@ var UsbCMidmount = ({
8884
9028
  ) : null
8885
9029
  )
8886
9030
  ] }),
8887
- /* @__PURE__ */ jsxs89(Colorize65, { color: "#d3ad57", children: [
9031
+ /* @__PURE__ */ jsxs89(Colorize65, { color: "#d3ad57", material: componentMaterials.goldContact, children: [
8888
9032
  [-1, 1].flatMap(
8889
9033
  (side) => [-2.75, -2.25, -1.25, -0.25, 0.25, 1.25, 2.25, 2.75].map((x) => /* @__PURE__ */ jsx100(
8890
9034
  Cuboid65,
@@ -8908,7 +9052,7 @@ var UsbCMidmount = ({
8908
9052
  i
8909
9053
  ))
8910
9054
  ] }),
8911
- /* @__PURE__ */ jsx100(Colorize65, { color: "#b8bdc4", children: slots.map((slot, i) => /* @__PURE__ */ jsx100(
9055
+ /* @__PURE__ */ jsx100(Colorize65, { color: "#b8bdc4", material: componentMaterials.brushedMetal, children: slots.map((slot, i) => /* @__PURE__ */ jsx100(
8912
9056
  Cuboid65,
8913
9057
  {
8914
9058
  size: [