jscad-electronics 0.0.198 → 0.0.199

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/vanilla.d.ts CHANGED
@@ -3,7 +3,7 @@ import { BufferGeometry } from 'three';
3
3
  import * as jscadModeling from '@jscad/modeling';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as _jscad_modeling_src_geometries_types from '@jscad/modeling/src/geometries/types';
6
- import { FlangedBushingModelPropsInput, FlatHeadScrewModelPropsInput, SpurGearModelPropsInput, HelicalGearModelPropsInput, HexBoltModelPropsInput, HexSocketBoltModelPropsInput, NemaMotorModelPropsInput, PanScrewModelPropsInput, PlainBushingModelPropsInput, SheetMetalModelPropsInput, WormGearModelPropsInput } from '@tscircuit/modelprinter';
6
+ import { ButtonScrewModelPropsInput, FlangedBushingModelPropsInput, FlatHeadScrewModelPropsInput, SpurGearModelPropsInput, HelicalGearModelPropsInput, HexBoltModelPropsInput, HexSocketBoltModelPropsInput, NemaMotorModelPropsInput, PanScrewModelPropsInput, PlainBushingModelPropsInput, SheetMetalModelPropsInput, WormGearModelPropsInput } from '@tscircuit/modelprinter';
7
7
 
8
8
  type VNode = {
9
9
  type: any;
@@ -26,6 +26,25 @@ type RenderResult = {
26
26
 
27
27
  declare function convertCSGToThreeGeom(csg: any): BufferGeometry;
28
28
 
29
+ /** Indexed counterclockwise triangles in millimeters. */
30
+ interface ButtonScrewMesh {
31
+ positions: number[];
32
+ indices: number[];
33
+ }
34
+ /** Renderer resolution affects tessellation only, never model specifications. */
35
+ interface ButtonScrewMeshOptions {
36
+ radialSegments?: number;
37
+ segmentsPerPitch?: number;
38
+ }
39
+ /** Closed nominal surface: bearing z=0, tip -length, blind hex socket above. */
40
+ declare function createButtonScrewMesh(input: ButtonScrewModelPropsInput, options?: ButtonScrewMeshOptions): ButtonScrewMesh;
41
+
42
+ type ButtonScrewProps = ButtonScrewModelPropsInput & {
43
+ color?: string;
44
+ };
45
+ declare function createButtonScrewGeom(input: ButtonScrewModelPropsInput, resolution?: ButtonScrewMeshOptions): _jscad_modeling_src_geometries_types.Geom3;
46
+ declare function ButtonScrew({ color, ...props }: ButtonScrewProps): react_jsx_runtime.JSX.Element;
47
+
29
48
  /** Shared ring vertices and outward counterclockwise triangles, in millimeters. */
30
49
  interface FlangedBushingMesh {
31
50
  positions: number[];
@@ -225,4 +244,4 @@ declare function createJSCADRenderer(jscad: typeof jscadModeling): {
225
244
  };
226
245
  };
227
246
 
228
- export { type ColoredGeom, FlangedBushing, type FlangedBushingMesh, type FlangedBushingProps, FlatHeadScrew, type FlatHeadScrewMesh, type FlatHeadScrewMeshOptions, type FlatHeadScrewProps, Fragment, HelicalGear, type HelicalGearMesh, type HelicalGearProps, HexBolt, type HexBoltMesh, type HexBoltMeshOptions, type HexBoltProps, HexSocketBolt, type HexSocketBoltMesh, type HexSocketBoltProps, NEMA17, NEMA23, NEMA8, type NemaFrameMotorProps, NemaMotor, type NemaMotorProps, PanScrew, type PanScrewMesh, type PanScrewMeshOptions, type PanScrewProps, PlainBushing, type PlainBushingMesh, type PlainBushingProps, type RenderResult, SheetMetal, type SheetMetalMesh, type SheetMetalProps, SpurGear, type SpurGearMesh, type SpurGearProps, type VNode, WormGear, type WormGearMesh, type WormGearProps, convertCSGToThreeGeom, createFlangedBushingGeom, createFlangedBushingMesh, createFlatHeadScrewGeom, createFlatHeadScrewMesh, createHelicalGearGeom, createHelicalGearMesh, createHexBoltGeom, createHexBoltMesh, createHexSocketBoltGeom, createHexSocketBoltMesh, createJSCADRenderer, createPanScrewGeom, createPanScrewMesh, createPlainBushingGeom, createPlainBushingMesh, createSheetMetalGeom, createSheetMetalMesh, createSpurGearGeom, createSpurGearMesh, createWormGearGeom, createWormGearMesh, getJscadModelForFootprint, getJscadModelForFootprintWithPads, h };
247
+ export { ButtonScrew, type ButtonScrewMesh, type ButtonScrewMeshOptions, type ButtonScrewProps, type ColoredGeom, FlangedBushing, type FlangedBushingMesh, type FlangedBushingProps, FlatHeadScrew, type FlatHeadScrewMesh, type FlatHeadScrewMeshOptions, type FlatHeadScrewProps, Fragment, HelicalGear, type HelicalGearMesh, type HelicalGearProps, HexBolt, type HexBoltMesh, type HexBoltMeshOptions, type HexBoltProps, HexSocketBolt, type HexSocketBoltMesh, type HexSocketBoltProps, NEMA17, NEMA23, NEMA8, type NemaFrameMotorProps, NemaMotor, type NemaMotorProps, PanScrew, type PanScrewMesh, type PanScrewMeshOptions, type PanScrewProps, PlainBushing, type PlainBushingMesh, type PlainBushingProps, type RenderResult, SheetMetal, type SheetMetalMesh, type SheetMetalProps, SpurGear, type SpurGearMesh, type SpurGearProps, type VNode, WormGear, type WormGearMesh, type WormGearProps, convertCSGToThreeGeom, createButtonScrewGeom, createButtonScrewMesh, createFlangedBushingGeom, createFlangedBushingMesh, createFlatHeadScrewGeom, createFlatHeadScrewMesh, createHelicalGearGeom, createHelicalGearMesh, createHexBoltGeom, createHexBoltMesh, createHexSocketBoltGeom, createHexSocketBoltMesh, createJSCADRenderer, createPanScrewGeom, createPanScrewMesh, createPlainBushingGeom, createPlainBushingMesh, createSheetMetalGeom, createSheetMetalMesh, createSpurGearGeom, createSpurGearMesh, createWormGearGeom, createWormGearMesh, getJscadModelForFootprint, getJscadModelForFootprintWithPads, h };
package/dist/vanilla.js CHANGED
@@ -179,28 +179,28 @@ var FootprintPlatedHole = ({
179
179
  throw new Error("Shape not supported: " + hole.shape);
180
180
  };
181
181
 
182
- // lib/models/flangedbushing/register.tsx
183
- import { flangedBushingModelDefinitionSchema } from "@tscircuit/modelprinter";
182
+ // lib/models/buttonscrew/register.tsx
183
+ import { buttonScrewModelDefinitionSchema } from "@tscircuit/modelprinter";
184
184
 
185
185
  // lib/model-registry.ts
186
- function defineModelRenderer(model13) {
187
- return model13;
186
+ function defineModelRenderer(model14) {
187
+ return model14;
188
188
  }
189
189
  var ModelRendererRegistry = class {
190
190
  models = /* @__PURE__ */ new Map();
191
- register(model13) {
192
- if (typeof model13.name !== "string" || !/^[a-z]+$/.test(model13.name)) {
191
+ register(model14) {
192
+ if (typeof model14.name !== "string" || !/^[a-z]+$/.test(model14.name)) {
193
193
  throw new Error(
194
194
  "Model renderer names must contain only lowercase letters"
195
195
  );
196
196
  }
197
- if (this.models.has(model13.name)) {
198
- throw new Error(`Model renderer "${model13.name}" is already registered`);
197
+ if (this.models.has(model14.name)) {
198
+ throw new Error(`Model renderer "${model14.name}" is already registered`);
199
199
  }
200
- if (model13.pads !== "none" && model13.pads !== "footprinter") {
200
+ if (model14.pads !== "none" && model14.pads !== "footprinter") {
201
201
  throw new Error('Model renderer pads must be "none" or "footprinter"');
202
202
  }
203
- const { name, schema, render: render2, pads } = model13;
203
+ const { name, schema, render: render2, pads } = model14;
204
204
  this.models.set(name, {
205
205
  name,
206
206
  schema,
@@ -226,6 +226,118 @@ var ModelRendererRegistry = class {
226
226
  }
227
227
  };
228
228
 
229
+ // lib/models/buttonscrew/mesh.ts
230
+ import {
231
+ buttonScrewModelPropsSchema,
232
+ getButtonScrewDimensions
233
+ } from "@tscircuit/modelprinter";
234
+ function resolution(options) {
235
+ const radial = options.radialSegments ?? 96;
236
+ const axial = options.segmentsPerPitch ?? 32;
237
+ if (!Number.isInteger(radial) || radial < 24 || radial > 192 || radial % 12 !== 0 || !Number.isInteger(axial) || axial < 8 || axial > 64)
238
+ throw new Error(
239
+ "Mesh resolution limit: radial segments must be a multiple of 12 in [24,192], pitch segments an integer in [8,64]"
240
+ );
241
+ return { radial, axial };
242
+ }
243
+ function surface(segments) {
244
+ const positions = [], indices = [];
245
+ const ring = (z, radius) => {
246
+ const start = positions.length / 3;
247
+ for (let i = 0; i < segments; i++) {
248
+ const angle = i * 2 * Math.PI / segments;
249
+ const r = radius(angle);
250
+ positions.push(r * Math.cos(angle), r * Math.sin(angle), z);
251
+ }
252
+ return start;
253
+ };
254
+ const connect = (a, b) => {
255
+ for (let i = 0; i < segments; i++) {
256
+ const n = (i + 1) % segments;
257
+ indices.push(a + i, a + n, b + n, a + i, b + n, b + i);
258
+ }
259
+ };
260
+ const cap = (start, z, up) => {
261
+ const center = positions.length / 3;
262
+ positions.push(0, 0, z);
263
+ for (let i = 0; i < segments; i++) {
264
+ const n = (i + 1) % segments;
265
+ indices.push(center, start + (up ? i : n), start + (up ? n : i));
266
+ }
267
+ };
268
+ return { positions, indices, ring, connect, cap };
269
+ }
270
+ function hexRadius(angle, acrossFlats) {
271
+ const period = Math.PI / 3;
272
+ const distance2 = ((angle - Math.PI / 2 + period / 2) % period + period) % period - period / 2;
273
+ return acrossFlats / 2 / Math.cos(distance2);
274
+ }
275
+ function threadDistance(z, angle, pitch, hand = 1) {
276
+ const phase = ((z / pitch - hand * angle / (2 * Math.PI)) % 1 + 1) % 1;
277
+ return Math.min(phase, 1 - phase);
278
+ }
279
+ function createButtonScrewMesh(input, options = {}) {
280
+ const props = buttonScrewModelPropsSchema.parse(input);
281
+ const d = getButtonScrewDimensions(input);
282
+ const { radial, axial } = resolution(options);
283
+ const steps = Math.max(2, Math.ceil(props.length / d.threadPitch * axial));
284
+ if (steps > 24e3 || !Number.isFinite(steps))
285
+ throw new Error("Mesh resolution limit: too many thread turns");
286
+ const m = surface(radial);
287
+ const radius = d.diameter / 2;
288
+ const depth = (d.diameter - d.threadMinorDiameter) / 2;
289
+ const fillet = d.underHeadRadius;
290
+ const levels = new Set(
291
+ props.showThreads ? Array.from(
292
+ { length: steps + 1 },
293
+ (_, i) => -props.length + props.length * i / steps
294
+ ) : [-props.length, 0]
295
+ );
296
+ levels.add(-props.length + d.tipChamfer);
297
+ levels.add(-d.threadPitch);
298
+ for (let i = 0; i <= 16; i++)
299
+ levels.add(-fillet + fillet * Math.sin(i * Math.PI / 32));
300
+ let previous = -1;
301
+ const shaftLevels = [...levels].sort((a, b) => a - b).filter((z, index, sorted) => index === 0 || z - sorted[index - 1] > 1e-10);
302
+ for (const z of shaftLevels) {
303
+ const current = m.ring(z, (angle) => {
304
+ const envelope = z >= -fillet ? radius + fillet - Math.sqrt(Math.max(0, fillet ** 2 - (z + fillet) ** 2)) : radius;
305
+ const groove = Math.min(
306
+ depth,
307
+ Math.max(
308
+ 0,
309
+ (threadDistance(z + props.length, angle, d.threadPitch) - 1 / 16) * d.threadPitch * Math.sqrt(3)
310
+ )
311
+ );
312
+ const threaded = envelope - (props.showThreads ? groove * Math.min(1, -z / d.threadPitch) : 0);
313
+ const tip = z + props.length < d.tipChamfer ? radius - (d.tipChamfer - (z + props.length)) : Infinity;
314
+ return Math.min(threaded, tip);
315
+ });
316
+ if (previous < 0) m.cap(current, z, false);
317
+ else m.connect(previous, current);
318
+ previous = current;
319
+ }
320
+ const add = (z, radiusAt) => {
321
+ const current = m.ring(z, radiusAt);
322
+ m.connect(previous, current);
323
+ previous = current;
324
+ };
325
+ add(0, () => d.headDiameter / 2);
326
+ for (let i = 1; i <= 24; i++) {
327
+ const z = d.headHeight * i / 24;
328
+ add(
329
+ z,
330
+ () => d.crownArcCenterR + Math.sqrt(
331
+ Math.max(0, d.crownRadius ** 2 - (z - d.crownArcCenterZ) ** 2)
332
+ )
333
+ );
334
+ }
335
+ add(d.topZ, (angle) => hexRadius(angle, d.socketWidth));
336
+ add(d.topZ - d.socketDepth, (angle) => hexRadius(angle, d.socketWidth));
337
+ m.cap(previous, d.topZ - d.socketDepth, true);
338
+ return { positions: m.positions, indices: m.indices };
339
+ }
340
+
229
341
  // lib/mechanical/indexedMeshToGeom3.ts
230
342
  import jscad from "@jscad/modeling";
231
343
  function indexedMeshToGeom3(mesh) {
@@ -241,6 +353,28 @@ function indexedMeshToGeom3(mesh) {
241
353
  return jscad.geometries.geom3.fromPoints(polygons);
242
354
  }
243
355
 
356
+ // lib/models/buttonscrew/ButtonScrew.tsx
357
+ function createButtonScrewGeom(input, resolution2) {
358
+ return indexedMeshToGeom3(createButtonScrewMesh(input, resolution2));
359
+ }
360
+ function ButtonScrew({ color = "#737e8f", ...props }) {
361
+ return /* @__PURE__ */ jsx(Colorize, { color, children: /* @__PURE__ */ jsx(Custom, { geometry: createButtonScrewGeom(props) }) });
362
+ }
363
+
364
+ // lib/models/buttonscrew/register.tsx
365
+ var model = defineModelRenderer({
366
+ name: "buttonscrew",
367
+ schema: buttonScrewModelDefinitionSchema,
368
+ render: ({ fn, ...props }) => /* @__PURE__ */ jsx(ButtonScrew, { ...props }),
369
+ pads: "none"
370
+ });
371
+ function register(registry) {
372
+ registry.register(model);
373
+ }
374
+
375
+ // lib/models/flangedbushing/register.tsx
376
+ import { flangedBushingModelDefinitionSchema } from "@tscircuit/modelprinter";
377
+
244
378
  // lib/models/flangedbushing/mesh.ts
245
379
  import {
246
380
  flangedBushingModelPropsSchema,
@@ -291,14 +425,14 @@ function FlangedBushing({
291
425
  }
292
426
 
293
427
  // lib/models/flangedbushing/register.tsx
294
- var model = defineModelRenderer({
428
+ var model2 = defineModelRenderer({
295
429
  name: "flangedbushing",
296
430
  schema: flangedBushingModelDefinitionSchema,
297
431
  render: ({ fn, ...props }) => /* @__PURE__ */ jsx(FlangedBushing, { ...props }),
298
432
  pads: "none"
299
433
  });
300
- function register(registry) {
301
- registry.register(model);
434
+ function register2(registry) {
435
+ registry.register(model2);
302
436
  }
303
437
 
304
438
  // lib/models/flatheadscrew/register.tsx
@@ -407,14 +541,14 @@ function createFlatHeadScrewMesh(input, options = {}) {
407
541
  filletCenterZ + p.underHeadRadius * Math.sin(angle)
408
542
  );
409
543
  }
410
- const hexRadius = (theta) => p.socketAcrossFlats / 2 / Math.max(
544
+ const hexRadius2 = (theta) => p.socketAcrossFlats / 2 / Math.max(
411
545
  Math.abs(Math.sin(theta)),
412
546
  Math.abs(Math.sin(theta + 2 * Math.PI / 3)),
413
547
  Math.abs(Math.sin(theta + 4 * Math.PI / 3))
414
548
  );
415
549
  add(() => p.headDiameter / 2, 0);
416
- add(hexRadius, 0);
417
- add(hexRadius, -p.socketDepth);
550
+ add(hexRadius2, 0);
551
+ add(hexRadius2, -p.socketDepth);
418
552
  cap(previous, -p.socketDepth, true);
419
553
  return { positions, indices };
420
554
  }
@@ -431,14 +565,14 @@ function FlatHeadScrew({
431
565
  }
432
566
 
433
567
  // lib/models/flatheadscrew/register.tsx
434
- var model2 = defineModelRenderer({
568
+ var model3 = defineModelRenderer({
435
569
  name: "flatheadscrew",
436
570
  schema: flatHeadScrewModelDefinitionSchema,
437
571
  render: ({ fn, ...props }) => /* @__PURE__ */ jsx(FlatHeadScrew, { ...props }),
438
572
  pads: "none"
439
573
  });
440
- function register2(registry) {
441
- registry.register(model2);
574
+ function register3(registry) {
575
+ registry.register(model3);
442
576
  }
443
577
 
444
578
  // lib/models/flexscreen/register.tsx
@@ -1116,14 +1250,14 @@ var FlexScreen = (props) => {
1116
1250
  };
1117
1251
 
1118
1252
  // lib/models/flexscreen/register.tsx
1119
- var model3 = defineModelRenderer({
1253
+ var model4 = defineModelRenderer({
1120
1254
  name: "flexscreen",
1121
1255
  schema: flexScreenModelDefinitionSchema,
1122
1256
  render: ({ fn, ...props }) => /* @__PURE__ */ jsx(FlexScreen, { ...props }),
1123
1257
  pads: "footprinter"
1124
1258
  });
1125
- function register3(registry) {
1126
- registry.register(model3);
1259
+ function register4(registry) {
1260
+ registry.register(model4);
1127
1261
  }
1128
1262
 
1129
1263
  // lib/models/helicalgear/register.tsx
@@ -1329,14 +1463,14 @@ function HelicalGear({ color = "#737e8f", ...props }) {
1329
1463
  }
1330
1464
 
1331
1465
  // lib/models/helicalgear/register.tsx
1332
- var model4 = defineModelRenderer({
1466
+ var model5 = defineModelRenderer({
1333
1467
  name: "helicalgear",
1334
1468
  schema: helicalGearModelDefinitionSchema,
1335
1469
  render: ({ fn, ...props }) => /* @__PURE__ */ jsx(HelicalGear, { ...props }),
1336
1470
  pads: "none"
1337
1471
  });
1338
- function register4(registry) {
1339
- registry.register(model4);
1472
+ function register5(registry) {
1473
+ registry.register(model5);
1340
1474
  }
1341
1475
 
1342
1476
  // lib/models/hexbolt/register.tsx
@@ -1445,20 +1579,20 @@ function createHexBoltMesh(input, options = {}) {
1445
1579
  filletCenterZ + p.underHeadRadius * Math.sin(angle)
1446
1580
  );
1447
1581
  }
1448
- const hexRadius = (theta) => p.headAcrossFlats / 2 / Math.max(
1582
+ const hexRadius2 = (theta) => p.headAcrossFlats / 2 / Math.max(
1449
1583
  Math.abs(Math.sin(theta)),
1450
1584
  Math.abs(Math.sin(theta + 2 * Math.PI / 3)),
1451
1585
  Math.abs(Math.sin(theta + 4 * Math.PI / 3))
1452
1586
  );
1453
- add(hexRadius, 0);
1587
+ add(hexRadius2, 0);
1454
1588
  const slope = Math.tan(p.headChamferAngle * Math.PI / 180);
1455
1589
  const start = p.headHeight - (p.headCornerDiameter - p.headChamferDiameter) / 2 * slope;
1456
- add(hexRadius, start);
1590
+ add(hexRadius2, start);
1457
1591
  for (let i = 1; i <= 12; i++) {
1458
1592
  const z = start + (p.headHeight - start) * i / 12;
1459
1593
  add(
1460
1594
  (theta) => Math.min(
1461
- hexRadius(theta),
1595
+ hexRadius2(theta),
1462
1596
  p.headChamferDiameter / 2 + (p.headHeight - z) / slope
1463
1597
  ),
1464
1598
  z
@@ -1477,14 +1611,14 @@ function HexBolt({ color = "#737e8f", ...props }) {
1477
1611
  }
1478
1612
 
1479
1613
  // lib/models/hexbolt/register.tsx
1480
- var model5 = defineModelRenderer({
1614
+ var model6 = defineModelRenderer({
1481
1615
  name: "hexbolt",
1482
1616
  schema: hexBoltModelDefinitionSchema,
1483
1617
  render: ({ fn, ...props }) => /* @__PURE__ */ jsx(HexBolt, { ...props }),
1484
1618
  pads: "none"
1485
1619
  });
1486
- function register5(registry) {
1487
- registry.register(model5);
1620
+ function register6(registry) {
1621
+ registry.register(model6);
1488
1622
  }
1489
1623
 
1490
1624
  // lib/models/hexsocketbolt/register.tsx
@@ -1576,10 +1710,10 @@ var createHexSocketBoltMesh = (input) => {
1576
1710
  addRing(bevel, () => headDiameter / 2);
1577
1711
  addRing(headHeight - bevel, () => headDiameter / 2);
1578
1712
  addRing(headHeight, () => headDiameter / 2 - bevel);
1579
- const hexRadius = (angle, acrossFlats) => acrossFlats / 2 / Math.cos((angle + Math.PI / 6) % (Math.PI / 3) - Math.PI / 6);
1580
- addRing(headHeight, (angle) => hexRadius(angle, socketWidth + bevel));
1581
- addRing(headHeight - bevel / 2, (angle) => hexRadius(angle, socketWidth));
1582
- addRing(headHeight - socketDepth, (angle) => hexRadius(angle, socketWidth));
1713
+ const hexRadius2 = (angle, acrossFlats) => acrossFlats / 2 / Math.cos((angle + Math.PI / 6) % (Math.PI / 3) - Math.PI / 6);
1714
+ addRing(headHeight, (angle) => hexRadius2(angle, socketWidth + bevel));
1715
+ addRing(headHeight - bevel / 2, (angle) => hexRadius2(angle, socketWidth));
1716
+ addRing(headHeight - socketDepth, (angle) => hexRadius2(angle, socketWidth));
1583
1717
  cap(previous, headHeight - socketDepth, true);
1584
1718
  return { positions, indices };
1585
1719
  };
@@ -1596,14 +1730,14 @@ function HexSocketBolt({
1596
1730
  }
1597
1731
 
1598
1732
  // lib/models/hexsocketbolt/register.tsx
1599
- var model6 = defineModelRenderer({
1733
+ var model7 = defineModelRenderer({
1600
1734
  name: "hexsocketbolt",
1601
1735
  schema: hexSocketBoltModelDefinitionSchema,
1602
1736
  render: ({ fn, ...props }) => /* @__PURE__ */ jsx(HexSocketBolt, { ...props }),
1603
1737
  pads: "none"
1604
1738
  });
1605
- function register6(registry) {
1606
- registry.register(model6);
1739
+ function register7(registry) {
1740
+ registry.register(model7);
1607
1741
  }
1608
1742
 
1609
1743
  // lib/models/nema/register.tsx
@@ -1872,14 +2006,14 @@ var NEMA17 = (props) => /* @__PURE__ */ jsx(NemaMotor, { ...props, nemaSize: 17
1872
2006
  var NEMA23 = (props) => /* @__PURE__ */ jsx(NemaMotor, { ...props, nemaSize: 23 });
1873
2007
 
1874
2008
  // lib/models/nema/register.tsx
1875
- var model7 = defineModelRenderer({
2009
+ var model8 = defineModelRenderer({
1876
2010
  name: "nema",
1877
2011
  schema: nemaMotorModelDefinitionSchema,
1878
2012
  render: ({ fn, ...props }) => /* @__PURE__ */ jsx(NemaMotor, { ...props }),
1879
2013
  pads: "none"
1880
2014
  });
1881
- function register7(registry) {
1882
- registry.register(model7);
2015
+ function register8(registry) {
2016
+ registry.register(model8);
1883
2017
  }
1884
2018
 
1885
2019
  // lib/models/panscrew/register.tsx
@@ -2091,14 +2225,14 @@ function PanScrew({ color = "#737e8f", ...props }) {
2091
2225
  }
2092
2226
 
2093
2227
  // lib/models/panscrew/register.tsx
2094
- var model8 = defineModelRenderer({
2228
+ var model9 = defineModelRenderer({
2095
2229
  name: "panscrew",
2096
2230
  schema: panScrewModelDefinitionSchema,
2097
2231
  render: ({ fn, ...props }) => /* @__PURE__ */ jsx(PanScrew, { ...props }),
2098
2232
  pads: "none"
2099
2233
  });
2100
- function register8(registry) {
2101
- registry.register(model8);
2234
+ function register9(registry) {
2235
+ registry.register(model9);
2102
2236
  }
2103
2237
 
2104
2238
  // lib/models/plainbushing/register.tsx
@@ -2161,14 +2295,14 @@ function PlainBushing({
2161
2295
  }
2162
2296
 
2163
2297
  // lib/models/plainbushing/register.tsx
2164
- var model9 = defineModelRenderer({
2298
+ var model10 = defineModelRenderer({
2165
2299
  name: "plainbushing",
2166
2300
  schema: plainBushingModelDefinitionSchema,
2167
2301
  render: ({ fn, ...props }) => /* @__PURE__ */ jsx(PlainBushing, { ...props }),
2168
2302
  pads: "none"
2169
2303
  });
2170
- function register9(registry) {
2171
- registry.register(model9);
2304
+ function register10(registry) {
2305
+ registry.register(model10);
2172
2306
  }
2173
2307
 
2174
2308
  // lib/models/sheetmetal/register.tsx
@@ -2328,14 +2462,14 @@ function SheetMetal({ color = "#737e8f", ...props }) {
2328
2462
  }
2329
2463
 
2330
2464
  // lib/models/sheetmetal/register.tsx
2331
- var model10 = defineModelRenderer({
2465
+ var model11 = defineModelRenderer({
2332
2466
  name: "sheetmetal",
2333
2467
  schema: sheetMetalModelDefinitionSchema,
2334
2468
  render: ({ fn, ...props }) => /* @__PURE__ */ jsx(SheetMetal, { ...props }),
2335
2469
  pads: "none"
2336
2470
  });
2337
- function register10(registry) {
2338
- registry.register(model10);
2471
+ function register11(registry) {
2472
+ registry.register(model11);
2339
2473
  }
2340
2474
 
2341
2475
  // lib/models/spurgear/register.tsx
@@ -2350,14 +2484,14 @@ function SpurGear({ color = "#737e8f", ...props }) {
2350
2484
  }
2351
2485
 
2352
2486
  // lib/models/spurgear/register.tsx
2353
- var model11 = defineModelRenderer({
2487
+ var model12 = defineModelRenderer({
2354
2488
  name: "spurgear",
2355
2489
  schema: spurGearModelDefinitionSchema,
2356
2490
  render: ({ fn, ...props }) => /* @__PURE__ */ jsx(SpurGear, { ...props }),
2357
2491
  pads: "none"
2358
2492
  });
2359
- function register11(registry) {
2360
- registry.register(model11);
2493
+ function register12(registry) {
2494
+ registry.register(model12);
2361
2495
  }
2362
2496
 
2363
2497
  // lib/models/wormgear/register.tsx
@@ -2549,14 +2683,14 @@ function WormGear({ color = "#737e8f", ...props }) {
2549
2683
  }
2550
2684
 
2551
2685
  // lib/models/wormgear/register.tsx
2552
- var model12 = defineModelRenderer({
2686
+ var model13 = defineModelRenderer({
2553
2687
  name: "wormgear",
2554
2688
  schema: wormGearModelDefinitionSchema,
2555
2689
  render: ({ fn, ...props }) => /* @__PURE__ */ jsx(WormGear, { ...props }),
2556
2690
  pads: "none"
2557
2691
  });
2558
- function register12(registry) {
2559
- registry.register(model12);
2692
+ function register13(registry) {
2693
+ registry.register(model13);
2560
2694
  }
2561
2695
 
2562
2696
  // lib/generated/model-renderers.ts
@@ -2573,6 +2707,7 @@ function registerAllModelRenderers(registry) {
2573
2707
  register10(registry);
2574
2708
  register11(registry);
2575
2709
  register12(registry);
2710
+ register13(registry);
2576
2711
  }
2577
2712
 
2578
2713
  // lib/default-model-registry.ts
@@ -10129,10 +10264,10 @@ var SOT143 = ({ footprint = "sot143" }) => {
10129
10264
  var Footprinter3d = ({ footprint }) => {
10130
10265
  const modelFn = mp3.string(footprint.split("_", 1)[0]).params().fn;
10131
10266
  if (mp3.getModelNames().includes(modelFn)) {
10132
- const model13 = mp3.string(footprint).json();
10133
- const renderer = modelRendererRegistry.get(model13.fn);
10267
+ const model14 = mp3.string(footprint).json();
10268
+ const renderer = modelRendererRegistry.get(model14.fn);
10134
10269
  if (renderer) {
10135
- return renderer.render(model13);
10270
+ return renderer.render(model14);
10136
10271
  }
10137
10272
  }
10138
10273
  let normalizedFootprint = footprint;
@@ -11083,6 +11218,7 @@ function createJSCADRenderer(jscad4) {
11083
11218
  return { createJSCADRoot };
11084
11219
  }
11085
11220
  export {
11221
+ ButtonScrew,
11086
11222
  FlangedBushing,
11087
11223
  FlatHeadScrew,
11088
11224
  Fragment,
@@ -11099,6 +11235,8 @@ export {
11099
11235
  SpurGear,
11100
11236
  WormGear,
11101
11237
  convertCSGToThreeGeom,
11238
+ createButtonScrewGeom,
11239
+ createButtonScrewMesh,
11102
11240
  createFlangedBushingGeom,
11103
11241
  createFlangedBushingMesh,
11104
11242
  createFlatHeadScrewGeom,