jscad-electronics 0.0.199 → 0.0.200
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.d.ts +21 -2
- package/dist/index.js +1038 -899
- package/dist/index.js.map +1 -1
- package/dist/vanilla.d.ts +21 -2
- package/dist/vanilla.js +179 -45
- package/dist/vanilla.js.map +1 -1
- package/package.json +1 -1
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 { ButtonScrewModelPropsInput, FlangedBushingModelPropsInput, FlatHeadScrewModelPropsInput, SpurGearModelPropsInput, HelicalGearModelPropsInput, HexBoltModelPropsInput, HexSocketBoltModelPropsInput, NemaMotorModelPropsInput, PanScrewModelPropsInput, PlainBushingModelPropsInput, SheetMetalModelPropsInput, WormGearModelPropsInput } from '@tscircuit/modelprinter';
|
|
6
|
+
import { ButtonScrewModelPropsInput, FlangedBushingModelPropsInput, FlatHeadScrewModelPropsInput, SpurGearModelPropsInput, HelicalGearModelPropsInput, HexBoltModelPropsInput, HexNutModelPropsInput, HexSocketBoltModelPropsInput, NemaMotorModelPropsInput, PanScrewModelPropsInput, PlainBushingModelPropsInput, SheetMetalModelPropsInput, WormGearModelPropsInput } from '@tscircuit/modelprinter';
|
|
7
7
|
|
|
8
8
|
type VNode = {
|
|
9
9
|
type: any;
|
|
@@ -123,6 +123,25 @@ type HexBoltProps = HexBoltModelPropsInput & {
|
|
|
123
123
|
declare function createHexBoltGeom(input: HexBoltModelPropsInput, options?: HexBoltMeshOptions): _jscad_modeling_src_geometries_types.Geom3;
|
|
124
124
|
declare function HexBolt({ color, ...props }: HexBoltProps): react_jsx_runtime.JSX.Element;
|
|
125
125
|
|
|
126
|
+
/** Indexed counterclockwise triangles in millimeters. */
|
|
127
|
+
interface HexNutMesh {
|
|
128
|
+
positions: number[];
|
|
129
|
+
indices: number[];
|
|
130
|
+
}
|
|
131
|
+
/** Renderer resolution affects tessellation only, never model specifications. */
|
|
132
|
+
interface HexNutMeshOptions {
|
|
133
|
+
radialSegments?: number;
|
|
134
|
+
segmentsPerPitch?: number;
|
|
135
|
+
}
|
|
136
|
+
/** Closed annular surface with a through internal thread and both conical mouths. */
|
|
137
|
+
declare function createHexNutMesh(input: HexNutModelPropsInput, options?: HexNutMeshOptions): HexNutMesh;
|
|
138
|
+
|
|
139
|
+
type HexNutProps = HexNutModelPropsInput & {
|
|
140
|
+
color?: string;
|
|
141
|
+
};
|
|
142
|
+
declare function createHexNutGeom(input: HexNutModelPropsInput, resolution?: HexNutMeshOptions): _jscad_modeling_src_geometries_types.Geom3;
|
|
143
|
+
declare function HexNut({ color, ...props }: HexNutProps): react_jsx_runtime.JSX.Element;
|
|
144
|
+
|
|
126
145
|
/** Indexed triangles, counterclockwise from outside; millimeters, Z up. */
|
|
127
146
|
interface HexSocketBoltMesh {
|
|
128
147
|
positions: number[];
|
|
@@ -244,4 +263,4 @@ declare function createJSCADRenderer(jscad: typeof jscadModeling): {
|
|
|
244
263
|
};
|
|
245
264
|
};
|
|
246
265
|
|
|
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 };
|
|
266
|
+
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, HexNut, type HexNutMesh, type HexNutMeshOptions, type HexNutProps, 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, createHexNutGeom, createHexNutMesh, createHexSocketBoltGeom, createHexSocketBoltMesh, createJSCADRenderer, createPanScrewGeom, createPanScrewMesh, createPlainBushingGeom, createPlainBushingMesh, createSheetMetalGeom, createSheetMetalMesh, createSpurGearGeom, createSpurGearMesh, createWormGearGeom, createWormGearMesh, getJscadModelForFootprint, getJscadModelForFootprintWithPads, h };
|
package/dist/vanilla.js
CHANGED
|
@@ -183,24 +183,24 @@ var FootprintPlatedHole = ({
|
|
|
183
183
|
import { buttonScrewModelDefinitionSchema } from "@tscircuit/modelprinter";
|
|
184
184
|
|
|
185
185
|
// lib/model-registry.ts
|
|
186
|
-
function defineModelRenderer(
|
|
187
|
-
return
|
|
186
|
+
function defineModelRenderer(model15) {
|
|
187
|
+
return model15;
|
|
188
188
|
}
|
|
189
189
|
var ModelRendererRegistry = class {
|
|
190
190
|
models = /* @__PURE__ */ new Map();
|
|
191
|
-
register(
|
|
192
|
-
if (typeof
|
|
191
|
+
register(model15) {
|
|
192
|
+
if (typeof model15.name !== "string" || !/^[a-z]+$/.test(model15.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(
|
|
198
|
-
throw new Error(`Model renderer "${
|
|
197
|
+
if (this.models.has(model15.name)) {
|
|
198
|
+
throw new Error(`Model renderer "${model15.name}" is already registered`);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
200
|
+
if (model15.pads !== "none" && model15.pads !== "footprinter") {
|
|
201
201
|
throw new Error('Model renderer pads must be "none" or "footprinter"');
|
|
202
202
|
}
|
|
203
|
-
const { name, schema, render: render2, pads } =
|
|
203
|
+
const { name, schema, render: render2, pads } = model15;
|
|
204
204
|
this.models.set(name, {
|
|
205
205
|
name,
|
|
206
206
|
schema,
|
|
@@ -354,8 +354,8 @@ function indexedMeshToGeom3(mesh) {
|
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
// lib/models/buttonscrew/ButtonScrew.tsx
|
|
357
|
-
function createButtonScrewGeom(input,
|
|
358
|
-
return indexedMeshToGeom3(createButtonScrewMesh(input,
|
|
357
|
+
function createButtonScrewGeom(input, resolution3) {
|
|
358
|
+
return indexedMeshToGeom3(createButtonScrewMesh(input, resolution3));
|
|
359
359
|
}
|
|
360
360
|
function ButtonScrew({ color = "#737e8f", ...props }) {
|
|
361
361
|
return /* @__PURE__ */ jsx(Colorize, { color, children: /* @__PURE__ */ jsx(Custom, { geometry: createButtonScrewGeom(props) }) });
|
|
@@ -541,14 +541,14 @@ function createFlatHeadScrewMesh(input, options = {}) {
|
|
|
541
541
|
filletCenterZ + p.underHeadRadius * Math.sin(angle)
|
|
542
542
|
);
|
|
543
543
|
}
|
|
544
|
-
const
|
|
544
|
+
const hexRadius3 = (theta) => p.socketAcrossFlats / 2 / Math.max(
|
|
545
545
|
Math.abs(Math.sin(theta)),
|
|
546
546
|
Math.abs(Math.sin(theta + 2 * Math.PI / 3)),
|
|
547
547
|
Math.abs(Math.sin(theta + 4 * Math.PI / 3))
|
|
548
548
|
);
|
|
549
549
|
add(() => p.headDiameter / 2, 0);
|
|
550
|
-
add(
|
|
551
|
-
add(
|
|
550
|
+
add(hexRadius3, 0);
|
|
551
|
+
add(hexRadius3, -p.socketDepth);
|
|
552
552
|
cap(previous, -p.socketDepth, true);
|
|
553
553
|
return { positions, indices };
|
|
554
554
|
}
|
|
@@ -1579,20 +1579,20 @@ function createHexBoltMesh(input, options = {}) {
|
|
|
1579
1579
|
filletCenterZ + p.underHeadRadius * Math.sin(angle)
|
|
1580
1580
|
);
|
|
1581
1581
|
}
|
|
1582
|
-
const
|
|
1582
|
+
const hexRadius3 = (theta) => p.headAcrossFlats / 2 / Math.max(
|
|
1583
1583
|
Math.abs(Math.sin(theta)),
|
|
1584
1584
|
Math.abs(Math.sin(theta + 2 * Math.PI / 3)),
|
|
1585
1585
|
Math.abs(Math.sin(theta + 4 * Math.PI / 3))
|
|
1586
1586
|
);
|
|
1587
|
-
add(
|
|
1587
|
+
add(hexRadius3, 0);
|
|
1588
1588
|
const slope = Math.tan(p.headChamferAngle * Math.PI / 180);
|
|
1589
1589
|
const start = p.headHeight - (p.headCornerDiameter - p.headChamferDiameter) / 2 * slope;
|
|
1590
|
-
add(
|
|
1590
|
+
add(hexRadius3, start);
|
|
1591
1591
|
for (let i = 1; i <= 12; i++) {
|
|
1592
1592
|
const z = start + (p.headHeight - start) * i / 12;
|
|
1593
1593
|
add(
|
|
1594
1594
|
(theta) => Math.min(
|
|
1595
|
-
|
|
1595
|
+
hexRadius3(theta),
|
|
1596
1596
|
p.headChamferDiameter / 2 + (p.headHeight - z) / slope
|
|
1597
1597
|
),
|
|
1598
1598
|
z
|
|
@@ -1621,6 +1621,136 @@ function register6(registry) {
|
|
|
1621
1621
|
registry.register(model6);
|
|
1622
1622
|
}
|
|
1623
1623
|
|
|
1624
|
+
// lib/models/hexnut/register.tsx
|
|
1625
|
+
import { hexNutModelDefinitionSchema } from "@tscircuit/modelprinter";
|
|
1626
|
+
|
|
1627
|
+
// lib/models/hexnut/mesh.ts
|
|
1628
|
+
import {
|
|
1629
|
+
hexNutModelPropsSchema,
|
|
1630
|
+
getHexNutDimensions
|
|
1631
|
+
} from "@tscircuit/modelprinter";
|
|
1632
|
+
function resolution2(options) {
|
|
1633
|
+
const radial = options.radialSegments ?? 96;
|
|
1634
|
+
const axial = options.segmentsPerPitch ?? 32;
|
|
1635
|
+
if (!Number.isInteger(radial) || radial < 24 || radial > 192 || radial % 12 !== 0 || !Number.isInteger(axial) || axial < 8 || axial > 64)
|
|
1636
|
+
throw new Error(
|
|
1637
|
+
"Mesh resolution limit: radial segments must be a multiple of 12 in [24,192], pitch segments an integer in [8,64]"
|
|
1638
|
+
);
|
|
1639
|
+
return { radial, axial };
|
|
1640
|
+
}
|
|
1641
|
+
function surface2(segments) {
|
|
1642
|
+
const positions = [], indices = [];
|
|
1643
|
+
const ring = (z, radius) => {
|
|
1644
|
+
const start = positions.length / 3;
|
|
1645
|
+
for (let i = 0; i < segments; i++) {
|
|
1646
|
+
const angle = i * 2 * Math.PI / segments;
|
|
1647
|
+
const r = radius(angle);
|
|
1648
|
+
positions.push(r * Math.cos(angle), r * Math.sin(angle), z);
|
|
1649
|
+
}
|
|
1650
|
+
return start;
|
|
1651
|
+
};
|
|
1652
|
+
const connect = (a, b) => {
|
|
1653
|
+
for (let i = 0; i < segments; i++) {
|
|
1654
|
+
const n = (i + 1) % segments;
|
|
1655
|
+
indices.push(a + i, a + n, b + n, a + i, b + n, b + i);
|
|
1656
|
+
}
|
|
1657
|
+
};
|
|
1658
|
+
const cap = (start, z, up) => {
|
|
1659
|
+
const center = positions.length / 3;
|
|
1660
|
+
positions.push(0, 0, z);
|
|
1661
|
+
for (let i = 0; i < segments; i++) {
|
|
1662
|
+
const n = (i + 1) % segments;
|
|
1663
|
+
indices.push(center, start + (up ? i : n), start + (up ? n : i));
|
|
1664
|
+
}
|
|
1665
|
+
};
|
|
1666
|
+
return { positions, indices, ring, connect, cap };
|
|
1667
|
+
}
|
|
1668
|
+
function hexRadius2(angle, acrossFlats) {
|
|
1669
|
+
const period = Math.PI / 3;
|
|
1670
|
+
const distance2 = ((angle - Math.PI / 2 + period / 2) % period + period) % period - period / 2;
|
|
1671
|
+
return acrossFlats / 2 / Math.cos(distance2);
|
|
1672
|
+
}
|
|
1673
|
+
function threadDistance2(z, angle, pitch, hand = 1) {
|
|
1674
|
+
const phase = ((z / pitch - hand * angle / (2 * Math.PI)) % 1 + 1) % 1;
|
|
1675
|
+
return Math.min(phase, 1 - phase);
|
|
1676
|
+
}
|
|
1677
|
+
function createHexNutMesh(input, options = {}) {
|
|
1678
|
+
const props = hexNutModelPropsSchema.parse(input);
|
|
1679
|
+
const d = getHexNutDimensions(input);
|
|
1680
|
+
const { radial, axial } = resolution2(options);
|
|
1681
|
+
const steps = Math.max(2, Math.ceil(d.height / d.threadPitch * axial));
|
|
1682
|
+
if (steps > 24e3 || !Number.isFinite(steps))
|
|
1683
|
+
throw new Error("Mesh resolution limit: too many thread turns");
|
|
1684
|
+
const m = surface2(radial);
|
|
1685
|
+
const outer = (z, angle) => Math.min(
|
|
1686
|
+
hexRadius2(angle, d.acrossFlats),
|
|
1687
|
+
d.faceDiameter / 2 + Math.min(z, d.height - z) * Math.sqrt(3)
|
|
1688
|
+
);
|
|
1689
|
+
const outerLevels = [
|
|
1690
|
+
0,
|
|
1691
|
+
d.outerChamferDepth,
|
|
1692
|
+
d.height - d.outerChamferDepth,
|
|
1693
|
+
d.height
|
|
1694
|
+
];
|
|
1695
|
+
for (let index = 0; index < radial; index++) {
|
|
1696
|
+
const angle = index * 2 * Math.PI / radial;
|
|
1697
|
+
const height10 = (hexRadius2(angle, d.acrossFlats) - d.faceDiameter / 2) / Math.sqrt(3);
|
|
1698
|
+
if (height10 > 1e-9 && height10 < d.outerChamferDepth - 1e-9)
|
|
1699
|
+
outerLevels.push(height10, d.height - height10);
|
|
1700
|
+
}
|
|
1701
|
+
const outerZ = outerLevels.sort((a, b) => a - b).filter((z, index, sorted) => index === 0 || z - sorted[index - 1] > 1e-10);
|
|
1702
|
+
const first = m.ring(0, (angle) => outer(0, angle));
|
|
1703
|
+
let previous = first;
|
|
1704
|
+
for (const z of outerZ.slice(1)) {
|
|
1705
|
+
const current = m.ring(z, (angle) => outer(z, angle));
|
|
1706
|
+
m.connect(previous, current);
|
|
1707
|
+
previous = current;
|
|
1708
|
+
}
|
|
1709
|
+
const levels = new Set(
|
|
1710
|
+
props.showThreads ? Array.from({ length: steps + 1 }, (_, i) => d.height * i / steps) : [0, d.height]
|
|
1711
|
+
);
|
|
1712
|
+
levels.add(d.boreChamferDepth);
|
|
1713
|
+
levels.add(d.height - d.boreChamferDepth);
|
|
1714
|
+
const minor = d.boreMinorDiameter / 2;
|
|
1715
|
+
const depth = (d.diameter - d.boreMinorDiameter) / 2;
|
|
1716
|
+
for (const z of [...levels].sort((a, b) => b - a)) {
|
|
1717
|
+
const current = m.ring(z, (angle) => {
|
|
1718
|
+
const groove = Math.min(
|
|
1719
|
+
depth,
|
|
1720
|
+
Math.max(
|
|
1721
|
+
0,
|
|
1722
|
+
(threadDistance2(z, angle, d.threadPitch) - 1 / 8) * d.threadPitch * Math.sqrt(3)
|
|
1723
|
+
)
|
|
1724
|
+
);
|
|
1725
|
+
const threaded = minor + (props.showThreads ? groove : 0);
|
|
1726
|
+
return Math.max(threaded, d.mouthDiameter / 2 - Math.min(z, d.height - z));
|
|
1727
|
+
});
|
|
1728
|
+
m.connect(previous, current);
|
|
1729
|
+
previous = current;
|
|
1730
|
+
}
|
|
1731
|
+
m.connect(previous, first);
|
|
1732
|
+
return { positions: m.positions, indices: m.indices };
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
// lib/models/hexnut/HexNut.tsx
|
|
1736
|
+
function createHexNutGeom(input, resolution3) {
|
|
1737
|
+
return indexedMeshToGeom3(createHexNutMesh(input, resolution3));
|
|
1738
|
+
}
|
|
1739
|
+
function HexNut({ color = "#737e8f", ...props }) {
|
|
1740
|
+
return /* @__PURE__ */ jsx(Colorize, { color, children: /* @__PURE__ */ jsx(Custom, { geometry: createHexNutGeom(props) }) });
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
// lib/models/hexnut/register.tsx
|
|
1744
|
+
var model7 = defineModelRenderer({
|
|
1745
|
+
name: "hexnut",
|
|
1746
|
+
schema: hexNutModelDefinitionSchema,
|
|
1747
|
+
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(HexNut, { ...props }),
|
|
1748
|
+
pads: "none"
|
|
1749
|
+
});
|
|
1750
|
+
function register7(registry) {
|
|
1751
|
+
registry.register(model7);
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1624
1754
|
// lib/models/hexsocketbolt/register.tsx
|
|
1625
1755
|
import { hexSocketBoltModelDefinitionSchema } from "@tscircuit/modelprinter";
|
|
1626
1756
|
|
|
@@ -1710,10 +1840,10 @@ var createHexSocketBoltMesh = (input) => {
|
|
|
1710
1840
|
addRing(bevel, () => headDiameter / 2);
|
|
1711
1841
|
addRing(headHeight - bevel, () => headDiameter / 2);
|
|
1712
1842
|
addRing(headHeight, () => headDiameter / 2 - bevel);
|
|
1713
|
-
const
|
|
1714
|
-
addRing(headHeight, (angle) =>
|
|
1715
|
-
addRing(headHeight - bevel / 2, (angle) =>
|
|
1716
|
-
addRing(headHeight - socketDepth, (angle) =>
|
|
1843
|
+
const hexRadius3 = (angle, acrossFlats) => acrossFlats / 2 / Math.cos((angle + Math.PI / 6) % (Math.PI / 3) - Math.PI / 6);
|
|
1844
|
+
addRing(headHeight, (angle) => hexRadius3(angle, socketWidth + bevel));
|
|
1845
|
+
addRing(headHeight - bevel / 2, (angle) => hexRadius3(angle, socketWidth));
|
|
1846
|
+
addRing(headHeight - socketDepth, (angle) => hexRadius3(angle, socketWidth));
|
|
1717
1847
|
cap(previous, headHeight - socketDepth, true);
|
|
1718
1848
|
return { positions, indices };
|
|
1719
1849
|
};
|
|
@@ -1730,14 +1860,14 @@ function HexSocketBolt({
|
|
|
1730
1860
|
}
|
|
1731
1861
|
|
|
1732
1862
|
// lib/models/hexsocketbolt/register.tsx
|
|
1733
|
-
var
|
|
1863
|
+
var model8 = defineModelRenderer({
|
|
1734
1864
|
name: "hexsocketbolt",
|
|
1735
1865
|
schema: hexSocketBoltModelDefinitionSchema,
|
|
1736
1866
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(HexSocketBolt, { ...props }),
|
|
1737
1867
|
pads: "none"
|
|
1738
1868
|
});
|
|
1739
|
-
function
|
|
1740
|
-
registry.register(
|
|
1869
|
+
function register8(registry) {
|
|
1870
|
+
registry.register(model8);
|
|
1741
1871
|
}
|
|
1742
1872
|
|
|
1743
1873
|
// lib/models/nema/register.tsx
|
|
@@ -2006,14 +2136,14 @@ var NEMA17 = (props) => /* @__PURE__ */ jsx(NemaMotor, { ...props, nemaSize: 17
|
|
|
2006
2136
|
var NEMA23 = (props) => /* @__PURE__ */ jsx(NemaMotor, { ...props, nemaSize: 23 });
|
|
2007
2137
|
|
|
2008
2138
|
// lib/models/nema/register.tsx
|
|
2009
|
-
var
|
|
2139
|
+
var model9 = defineModelRenderer({
|
|
2010
2140
|
name: "nema",
|
|
2011
2141
|
schema: nemaMotorModelDefinitionSchema,
|
|
2012
2142
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(NemaMotor, { ...props }),
|
|
2013
2143
|
pads: "none"
|
|
2014
2144
|
});
|
|
2015
|
-
function
|
|
2016
|
-
registry.register(
|
|
2145
|
+
function register9(registry) {
|
|
2146
|
+
registry.register(model9);
|
|
2017
2147
|
}
|
|
2018
2148
|
|
|
2019
2149
|
// lib/models/panscrew/register.tsx
|
|
@@ -2225,14 +2355,14 @@ function PanScrew({ color = "#737e8f", ...props }) {
|
|
|
2225
2355
|
}
|
|
2226
2356
|
|
|
2227
2357
|
// lib/models/panscrew/register.tsx
|
|
2228
|
-
var
|
|
2358
|
+
var model10 = defineModelRenderer({
|
|
2229
2359
|
name: "panscrew",
|
|
2230
2360
|
schema: panScrewModelDefinitionSchema,
|
|
2231
2361
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(PanScrew, { ...props }),
|
|
2232
2362
|
pads: "none"
|
|
2233
2363
|
});
|
|
2234
|
-
function
|
|
2235
|
-
registry.register(
|
|
2364
|
+
function register10(registry) {
|
|
2365
|
+
registry.register(model10);
|
|
2236
2366
|
}
|
|
2237
2367
|
|
|
2238
2368
|
// lib/models/plainbushing/register.tsx
|
|
@@ -2295,14 +2425,14 @@ function PlainBushing({
|
|
|
2295
2425
|
}
|
|
2296
2426
|
|
|
2297
2427
|
// lib/models/plainbushing/register.tsx
|
|
2298
|
-
var
|
|
2428
|
+
var model11 = defineModelRenderer({
|
|
2299
2429
|
name: "plainbushing",
|
|
2300
2430
|
schema: plainBushingModelDefinitionSchema,
|
|
2301
2431
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(PlainBushing, { ...props }),
|
|
2302
2432
|
pads: "none"
|
|
2303
2433
|
});
|
|
2304
|
-
function
|
|
2305
|
-
registry.register(
|
|
2434
|
+
function register11(registry) {
|
|
2435
|
+
registry.register(model11);
|
|
2306
2436
|
}
|
|
2307
2437
|
|
|
2308
2438
|
// lib/models/sheetmetal/register.tsx
|
|
@@ -2462,14 +2592,14 @@ function SheetMetal({ color = "#737e8f", ...props }) {
|
|
|
2462
2592
|
}
|
|
2463
2593
|
|
|
2464
2594
|
// lib/models/sheetmetal/register.tsx
|
|
2465
|
-
var
|
|
2595
|
+
var model12 = defineModelRenderer({
|
|
2466
2596
|
name: "sheetmetal",
|
|
2467
2597
|
schema: sheetMetalModelDefinitionSchema,
|
|
2468
2598
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(SheetMetal, { ...props }),
|
|
2469
2599
|
pads: "none"
|
|
2470
2600
|
});
|
|
2471
|
-
function
|
|
2472
|
-
registry.register(
|
|
2601
|
+
function register12(registry) {
|
|
2602
|
+
registry.register(model12);
|
|
2473
2603
|
}
|
|
2474
2604
|
|
|
2475
2605
|
// lib/models/spurgear/register.tsx
|
|
@@ -2484,14 +2614,14 @@ function SpurGear({ color = "#737e8f", ...props }) {
|
|
|
2484
2614
|
}
|
|
2485
2615
|
|
|
2486
2616
|
// lib/models/spurgear/register.tsx
|
|
2487
|
-
var
|
|
2617
|
+
var model13 = defineModelRenderer({
|
|
2488
2618
|
name: "spurgear",
|
|
2489
2619
|
schema: spurGearModelDefinitionSchema,
|
|
2490
2620
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(SpurGear, { ...props }),
|
|
2491
2621
|
pads: "none"
|
|
2492
2622
|
});
|
|
2493
|
-
function
|
|
2494
|
-
registry.register(
|
|
2623
|
+
function register13(registry) {
|
|
2624
|
+
registry.register(model13);
|
|
2495
2625
|
}
|
|
2496
2626
|
|
|
2497
2627
|
// lib/models/wormgear/register.tsx
|
|
@@ -2683,14 +2813,14 @@ function WormGear({ color = "#737e8f", ...props }) {
|
|
|
2683
2813
|
}
|
|
2684
2814
|
|
|
2685
2815
|
// lib/models/wormgear/register.tsx
|
|
2686
|
-
var
|
|
2816
|
+
var model14 = defineModelRenderer({
|
|
2687
2817
|
name: "wormgear",
|
|
2688
2818
|
schema: wormGearModelDefinitionSchema,
|
|
2689
2819
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(WormGear, { ...props }),
|
|
2690
2820
|
pads: "none"
|
|
2691
2821
|
});
|
|
2692
|
-
function
|
|
2693
|
-
registry.register(
|
|
2822
|
+
function register14(registry) {
|
|
2823
|
+
registry.register(model14);
|
|
2694
2824
|
}
|
|
2695
2825
|
|
|
2696
2826
|
// lib/generated/model-renderers.ts
|
|
@@ -2708,6 +2838,7 @@ function registerAllModelRenderers(registry) {
|
|
|
2708
2838
|
register11(registry);
|
|
2709
2839
|
register12(registry);
|
|
2710
2840
|
register13(registry);
|
|
2841
|
+
register14(registry);
|
|
2711
2842
|
}
|
|
2712
2843
|
|
|
2713
2844
|
// lib/default-model-registry.ts
|
|
@@ -10264,10 +10395,10 @@ var SOT143 = ({ footprint = "sot143" }) => {
|
|
|
10264
10395
|
var Footprinter3d = ({ footprint }) => {
|
|
10265
10396
|
const modelFn = mp3.string(footprint.split("_", 1)[0]).params().fn;
|
|
10266
10397
|
if (mp3.getModelNames().includes(modelFn)) {
|
|
10267
|
-
const
|
|
10268
|
-
const renderer = modelRendererRegistry.get(
|
|
10398
|
+
const model15 = mp3.string(footprint).json();
|
|
10399
|
+
const renderer = modelRendererRegistry.get(model15.fn);
|
|
10269
10400
|
if (renderer) {
|
|
10270
|
-
return renderer.render(
|
|
10401
|
+
return renderer.render(model15);
|
|
10271
10402
|
}
|
|
10272
10403
|
}
|
|
10273
10404
|
let normalizedFootprint = footprint;
|
|
@@ -11224,6 +11355,7 @@ export {
|
|
|
11224
11355
|
Fragment,
|
|
11225
11356
|
HelicalGear,
|
|
11226
11357
|
HexBolt,
|
|
11358
|
+
HexNut,
|
|
11227
11359
|
HexSocketBolt,
|
|
11228
11360
|
NEMA17,
|
|
11229
11361
|
NEMA23,
|
|
@@ -11245,6 +11377,8 @@ export {
|
|
|
11245
11377
|
createHelicalGearMesh,
|
|
11246
11378
|
createHexBoltGeom,
|
|
11247
11379
|
createHexBoltMesh,
|
|
11380
|
+
createHexNutGeom,
|
|
11381
|
+
createHexNutMesh,
|
|
11248
11382
|
createHexSocketBoltGeom,
|
|
11249
11383
|
createHexSocketBoltMesh,
|
|
11250
11384
|
createJSCADRenderer,
|