jscad-electronics 0.0.208 → 0.0.209
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 +972 -854
- package/dist/index.js.map +1 -1
- package/dist/vanilla.d.ts +21 -2
- package/dist/vanilla.js +140 -27
- 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, CableGrommetModelPropsInput, ClampingShaftCollarModelPropsInput, CompressionSpringModelPropsInput, FlangedBushingModelPropsInput, FlatHeadScrewModelPropsInput, SpurGearModelPropsInput, HelicalGearModelPropsInput, HexBoltModelPropsInput, HexNutModelPropsInput, HexSocketBoltModelPropsInput, NemaMotorModelPropsInput, PanScrewModelPropsInput, PlainBushingModelPropsInput, RigidCouplerModelPropsInput, ShaftCollarModelPropsInput, SheetMetalModelPropsInput, TSlotExtrusionModelPropsInput, TSlotGussetModelPropsInput, TSlotInsideCornerModelPropsInput, WormGearModelPropsInput } from '@tscircuit/modelprinter';
|
|
6
|
+
import { ButtonScrewModelPropsInput, CableGrommetModelPropsInput, ClampingShaftCollarModelPropsInput, CompressionSpringModelPropsInput, FlangedBushingModelPropsInput, FlatHeadScrewModelPropsInput, SpurGearModelPropsInput, HelicalGearModelPropsInput, HexBoltModelPropsInput, HexNutModelPropsInput, HexSocketBoltModelPropsInput, NemaMotorModelPropsInput, PanScrewModelPropsInput, PlainBushingModelPropsInput, RigidCouplerModelPropsInput, ShaftCollarModelPropsInput, SheetMetalModelPropsInput, ThreadedRodModelPropsInput, TSlotExtrusionModelPropsInput, TSlotGussetModelPropsInput, TSlotInsideCornerModelPropsInput, WormGearModelPropsInput } from '@tscircuit/modelprinter';
|
|
7
7
|
|
|
8
8
|
type VNode = {
|
|
9
9
|
type: any;
|
|
@@ -307,6 +307,25 @@ type SpurGearProps = SpurGearModelPropsInput & {
|
|
|
307
307
|
declare function createSpurGearGeom(input: SpurGearModelPropsInput): _jscad_modeling_src_geometries_types.Geom3;
|
|
308
308
|
declare function SpurGear({ color, ...props }: SpurGearProps): react_jsx_runtime.JSX.Element;
|
|
309
309
|
|
|
310
|
+
/** Indexed counterclockwise triangles in millimeters. */
|
|
311
|
+
interface ThreadedRodMesh {
|
|
312
|
+
positions: number[];
|
|
313
|
+
indices: number[];
|
|
314
|
+
}
|
|
315
|
+
/** Renderer resolution affects tessellation only, never model specifications. */
|
|
316
|
+
interface ThreadedRodMeshOptions {
|
|
317
|
+
radialSegments?: number;
|
|
318
|
+
segmentsPerPitch?: number;
|
|
319
|
+
}
|
|
320
|
+
/** Full single-start external thread, phase +X at z=0, flat chamfered ends. */
|
|
321
|
+
declare function createThreadedRodMesh(input: ThreadedRodModelPropsInput, options?: ThreadedRodMeshOptions): ThreadedRodMesh;
|
|
322
|
+
|
|
323
|
+
type ThreadedRodProps = ThreadedRodModelPropsInput & {
|
|
324
|
+
color?: string;
|
|
325
|
+
};
|
|
326
|
+
declare function createThreadedRodGeom(input: ThreadedRodModelPropsInput, resolution?: ThreadedRodMeshOptions): _jscad_modeling_src_geometries_types.Geom3;
|
|
327
|
+
declare function ThreadedRod({ color, ...props }: ThreadedRodProps): react_jsx_runtime.JSX.Element;
|
|
328
|
+
|
|
310
329
|
interface TSlotExtrusionMesh {
|
|
311
330
|
positions: number[];
|
|
312
331
|
indices: number[];
|
|
@@ -380,4 +399,4 @@ declare function createJSCADRenderer(jscad: typeof jscadModeling): {
|
|
|
380
399
|
};
|
|
381
400
|
};
|
|
382
401
|
|
|
383
|
-
export { ButtonScrew, type ButtonScrewMesh, type ButtonScrewMeshOptions, type ButtonScrewProps, CableGrommet, type CableGrommetMesh, type CableGrommetMeshOptions, type CableGrommetProps, ClampingShaftCollar, type ClampingShaftCollarMesh, type ClampingShaftCollarProps, type ColoredGeom, CompressionSpring, type CompressionSpringMesh, type CompressionSpringMeshOptions, type CompressionSpringProps, 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, RigidCoupler, type RigidCouplerMesh, type RigidCouplerProps, ShaftCollar, type ShaftCollarMesh, type ShaftCollarProps, SheetMetal, type SheetMetalMesh, type SheetMetalProps, SpurGear, type SpurGearMesh, type SpurGearProps, TSlotExtrusion, type TSlotExtrusionMesh, type TSlotExtrusionProps, TSlotGusset, type TSlotGussetMesh, type TSlotGussetProps, TSlotInsideCorner, type TSlotInsideCornerMesh, type TSlotInsideCornerProps, type VNode, WormGear, type WormGearMesh, type WormGearProps, convertCSGToThreeGeom, createButtonScrewGeom, createButtonScrewMesh, createCableGrommetGeom, createCableGrommetMesh, createClampingShaftCollarGeom, createClampingShaftCollarMesh, createCompressionSpringGeom, createCompressionSpringMesh, createFlangedBushingGeom, createFlangedBushingMesh, createFlatHeadScrewGeom, createFlatHeadScrewMesh, createHelicalGearGeom, createHelicalGearMesh, createHexBoltGeom, createHexBoltMesh, createHexNutGeom, createHexNutMesh, createHexSocketBoltGeom, createHexSocketBoltMesh, createJSCADRenderer, createPanScrewGeom, createPanScrewMesh, createPlainBushingGeom, createPlainBushingMesh, createRigidCouplerGeom, createRigidCouplerMesh, createShaftCollarGeom, createShaftCollarMesh, createSheetMetalGeom, createSheetMetalMesh, createSpurGearGeom, createSpurGearMesh, createTSlotExtrusionGeom, createTSlotExtrusionMesh, createTSlotGussetGeom, createTSlotGussetMesh, createTSlotInsideCornerGeom, createTSlotInsideCornerMesh, createWormGearGeom, createWormGearMesh, getJscadModelForFootprint, getJscadModelForFootprintWithPads, h };
|
|
402
|
+
export { ButtonScrew, type ButtonScrewMesh, type ButtonScrewMeshOptions, type ButtonScrewProps, CableGrommet, type CableGrommetMesh, type CableGrommetMeshOptions, type CableGrommetProps, ClampingShaftCollar, type ClampingShaftCollarMesh, type ClampingShaftCollarProps, type ColoredGeom, CompressionSpring, type CompressionSpringMesh, type CompressionSpringMeshOptions, type CompressionSpringProps, 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, RigidCoupler, type RigidCouplerMesh, type RigidCouplerProps, ShaftCollar, type ShaftCollarMesh, type ShaftCollarProps, SheetMetal, type SheetMetalMesh, type SheetMetalProps, SpurGear, type SpurGearMesh, type SpurGearProps, TSlotExtrusion, type TSlotExtrusionMesh, type TSlotExtrusionProps, TSlotGusset, type TSlotGussetMesh, type TSlotGussetProps, TSlotInsideCorner, type TSlotInsideCornerMesh, type TSlotInsideCornerProps, ThreadedRod, type ThreadedRodMesh, type ThreadedRodMeshOptions, type ThreadedRodProps, type VNode, WormGear, type WormGearMesh, type WormGearProps, convertCSGToThreeGeom, createButtonScrewGeom, createButtonScrewMesh, createCableGrommetGeom, createCableGrommetMesh, createClampingShaftCollarGeom, createClampingShaftCollarMesh, createCompressionSpringGeom, createCompressionSpringMesh, createFlangedBushingGeom, createFlangedBushingMesh, createFlatHeadScrewGeom, createFlatHeadScrewMesh, createHelicalGearGeom, createHelicalGearMesh, createHexBoltGeom, createHexBoltMesh, createHexNutGeom, createHexNutMesh, createHexSocketBoltGeom, createHexSocketBoltMesh, createJSCADRenderer, createPanScrewGeom, createPanScrewMesh, createPlainBushingGeom, createPlainBushingMesh, createRigidCouplerGeom, createRigidCouplerMesh, createShaftCollarGeom, createShaftCollarMesh, createSheetMetalGeom, createSheetMetalMesh, createSpurGearGeom, createSpurGearMesh, createTSlotExtrusionGeom, createTSlotExtrusionMesh, createTSlotGussetGeom, createTSlotGussetMesh, createTSlotInsideCornerGeom, createTSlotInsideCornerMesh, createThreadedRodGeom, createThreadedRodMesh, 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(model24) {
|
|
187
|
+
return model24;
|
|
188
188
|
}
|
|
189
189
|
var ModelRendererRegistry = class {
|
|
190
190
|
models = /* @__PURE__ */ new Map();
|
|
191
|
-
register(
|
|
192
|
-
if (typeof
|
|
191
|
+
register(model24) {
|
|
192
|
+
if (typeof model24.name !== "string" || !/^[a-z]+$/.test(model24.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(model24.name)) {
|
|
198
|
+
throw new Error(`Model renderer "${model24.name}" is already registered`);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
200
|
+
if (model24.pads !== "none" && model24.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 } = model24;
|
|
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, resolution4) {
|
|
358
|
+
return indexedMeshToGeom3(createButtonScrewMesh(input, resolution4));
|
|
359
359
|
}
|
|
360
360
|
function ButtonScrew({ color = "#737e8f", ...props }) {
|
|
361
361
|
return /* @__PURE__ */ jsx(Colorize, { color, children: /* @__PURE__ */ jsx(Custom, { geometry: createButtonScrewGeom(props) }) });
|
|
@@ -2336,8 +2336,8 @@ function createHexNutMesh(input, options = {}) {
|
|
|
2336
2336
|
}
|
|
2337
2337
|
|
|
2338
2338
|
// lib/models/hexnut/HexNut.tsx
|
|
2339
|
-
function createHexNutGeom(input,
|
|
2340
|
-
return indexedMeshToGeom3(createHexNutMesh(input,
|
|
2339
|
+
function createHexNutGeom(input, resolution4) {
|
|
2340
|
+
return indexedMeshToGeom3(createHexNutMesh(input, resolution4));
|
|
2341
2341
|
}
|
|
2342
2342
|
function HexNut({ color = "#737e8f", ...props }) {
|
|
2343
2343
|
return /* @__PURE__ */ jsx(Colorize, { color, children: /* @__PURE__ */ jsx(Custom, { geometry: createHexNutGeom(props) }) });
|
|
@@ -3324,6 +3324,115 @@ function register18(registry) {
|
|
|
3324
3324
|
registry.register(model18);
|
|
3325
3325
|
}
|
|
3326
3326
|
|
|
3327
|
+
// lib/models/threadedrod/register.tsx
|
|
3328
|
+
import { threadedRodModelDefinitionSchema } from "@tscircuit/modelprinter";
|
|
3329
|
+
|
|
3330
|
+
// lib/models/threadedrod/mesh.ts
|
|
3331
|
+
import {
|
|
3332
|
+
threadedRodModelPropsSchema,
|
|
3333
|
+
getThreadedRodDimensions
|
|
3334
|
+
} from "@tscircuit/modelprinter";
|
|
3335
|
+
function resolution3(options) {
|
|
3336
|
+
const radial = options.radialSegments ?? 96;
|
|
3337
|
+
const axial = options.segmentsPerPitch ?? 32;
|
|
3338
|
+
if (!Number.isInteger(radial) || radial < 24 || radial > 192 || radial % 12 !== 0 || !Number.isInteger(axial) || axial < 8 || axial > 64)
|
|
3339
|
+
throw new Error(
|
|
3340
|
+
"Mesh resolution limit: radial segments must be a multiple of 12 in [24,192], pitch segments an integer in [8,64]"
|
|
3341
|
+
);
|
|
3342
|
+
return { radial, axial };
|
|
3343
|
+
}
|
|
3344
|
+
function surface3(segments) {
|
|
3345
|
+
const positions = [], indices = [];
|
|
3346
|
+
const ring = (z, radius) => {
|
|
3347
|
+
const start = positions.length / 3;
|
|
3348
|
+
for (let i = 0; i < segments; i++) {
|
|
3349
|
+
const angle = i * 2 * Math.PI / segments;
|
|
3350
|
+
const r = radius(angle);
|
|
3351
|
+
positions.push(r * Math.cos(angle), r * Math.sin(angle), z);
|
|
3352
|
+
}
|
|
3353
|
+
return start;
|
|
3354
|
+
};
|
|
3355
|
+
const connect = (a, b) => {
|
|
3356
|
+
for (let i = 0; i < segments; i++) {
|
|
3357
|
+
const n = (i + 1) % segments;
|
|
3358
|
+
indices.push(a + i, a + n, b + n, a + i, b + n, b + i);
|
|
3359
|
+
}
|
|
3360
|
+
};
|
|
3361
|
+
const cap = (start, z, up) => {
|
|
3362
|
+
const center = positions.length / 3;
|
|
3363
|
+
positions.push(0, 0, z);
|
|
3364
|
+
for (let i = 0; i < segments; i++) {
|
|
3365
|
+
const n = (i + 1) % segments;
|
|
3366
|
+
indices.push(center, start + (up ? i : n), start + (up ? n : i));
|
|
3367
|
+
}
|
|
3368
|
+
};
|
|
3369
|
+
return { positions, indices, ring, connect, cap };
|
|
3370
|
+
}
|
|
3371
|
+
function threadDistance3(z, angle, pitch, hand = 1) {
|
|
3372
|
+
const phase = ((z / pitch - hand * angle / (2 * Math.PI)) % 1 + 1) % 1;
|
|
3373
|
+
return Math.min(phase, 1 - phase);
|
|
3374
|
+
}
|
|
3375
|
+
function createThreadedRodMesh(input, options = {}) {
|
|
3376
|
+
const props = threadedRodModelPropsSchema.parse(input);
|
|
3377
|
+
const d = getThreadedRodDimensions(input);
|
|
3378
|
+
const { radial, axial } = resolution3(options);
|
|
3379
|
+
const steps = Math.max(2, Math.ceil(d.length / d.threadPitch * axial));
|
|
3380
|
+
if (steps > 24e3 || !Number.isFinite(steps) || Math.min(d.minorDiameter, d.endDiameter) < d.diameter * 1e-8)
|
|
3381
|
+
throw new Error(
|
|
3382
|
+
"Mesh resolution limit: excessive turns or vanishing end/root radius"
|
|
3383
|
+
);
|
|
3384
|
+
const m = surface3(radial);
|
|
3385
|
+
const levels = new Set(
|
|
3386
|
+
Array.from({ length: steps + 1 }, (_, i) => d.length * i / steps)
|
|
3387
|
+
);
|
|
3388
|
+
levels.add(props.chamfer);
|
|
3389
|
+
levels.add(d.length - props.chamfer);
|
|
3390
|
+
const radius = d.diameter / 2, depth = (d.diameter - d.minorDiameter) / 2;
|
|
3391
|
+
let previous = -1;
|
|
3392
|
+
for (const z of [...levels].sort((a, b) => a - b)) {
|
|
3393
|
+
const current = m.ring(z, (angle) => {
|
|
3394
|
+
const groove = Math.min(
|
|
3395
|
+
depth,
|
|
3396
|
+
Math.max(
|
|
3397
|
+
0,
|
|
3398
|
+
(threadDistance3(
|
|
3399
|
+
z,
|
|
3400
|
+
angle,
|
|
3401
|
+
d.threadPitch,
|
|
3402
|
+
props.threadHand === "right" ? 1 : -1
|
|
3403
|
+
) - 1 / 16) * d.threadPitch * Math.sqrt(3)
|
|
3404
|
+
)
|
|
3405
|
+
);
|
|
3406
|
+
const chamfer = radius - Math.max(0, props.chamfer - Math.min(z, d.length - z));
|
|
3407
|
+
return Math.min(radius - groove, chamfer);
|
|
3408
|
+
});
|
|
3409
|
+
if (previous < 0) m.cap(current, z, false);
|
|
3410
|
+
else m.connect(previous, current);
|
|
3411
|
+
previous = current;
|
|
3412
|
+
}
|
|
3413
|
+
m.cap(previous, d.length, true);
|
|
3414
|
+
return { positions: m.positions, indices: m.indices };
|
|
3415
|
+
}
|
|
3416
|
+
|
|
3417
|
+
// lib/models/threadedrod/ThreadedRod.tsx
|
|
3418
|
+
function createThreadedRodGeom(input, resolution4) {
|
|
3419
|
+
return indexedMeshToGeom3(createThreadedRodMesh(input, resolution4));
|
|
3420
|
+
}
|
|
3421
|
+
function ThreadedRod({ color = "#737e8f", ...props }) {
|
|
3422
|
+
return /* @__PURE__ */ jsx(Colorize, { color, children: /* @__PURE__ */ jsx(Custom, { geometry: createThreadedRodGeom(props) }) });
|
|
3423
|
+
}
|
|
3424
|
+
|
|
3425
|
+
// lib/models/threadedrod/register.tsx
|
|
3426
|
+
var model19 = defineModelRenderer({
|
|
3427
|
+
name: "threadedrod",
|
|
3428
|
+
schema: threadedRodModelDefinitionSchema,
|
|
3429
|
+
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(ThreadedRod, { ...props }),
|
|
3430
|
+
pads: "none"
|
|
3431
|
+
});
|
|
3432
|
+
function register19(registry) {
|
|
3433
|
+
registry.register(model19);
|
|
3434
|
+
}
|
|
3435
|
+
|
|
3327
3436
|
// lib/models/tslotextrusion/register.tsx
|
|
3328
3437
|
import { tSlotExtrusionModelDefinitionSchema } from "@tscircuit/modelprinter";
|
|
3329
3438
|
|
|
@@ -3471,14 +3580,14 @@ function TSlotExtrusion({
|
|
|
3471
3580
|
}
|
|
3472
3581
|
|
|
3473
3582
|
// lib/models/tslotextrusion/register.tsx
|
|
3474
|
-
var
|
|
3583
|
+
var model20 = defineModelRenderer({
|
|
3475
3584
|
name: "tslotextrusion",
|
|
3476
3585
|
schema: tSlotExtrusionModelDefinitionSchema,
|
|
3477
3586
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(TSlotExtrusion, { ...props }),
|
|
3478
3587
|
pads: "none"
|
|
3479
3588
|
});
|
|
3480
|
-
function
|
|
3481
|
-
registry.register(
|
|
3589
|
+
function register20(registry) {
|
|
3590
|
+
registry.register(model20);
|
|
3482
3591
|
}
|
|
3483
3592
|
|
|
3484
3593
|
// lib/models/tslotgusset/register.tsx
|
|
@@ -3531,14 +3640,14 @@ function TSlotGusset({ color = "#8995a3", ...props }) {
|
|
|
3531
3640
|
}
|
|
3532
3641
|
|
|
3533
3642
|
// lib/models/tslotgusset/register.tsx
|
|
3534
|
-
var
|
|
3643
|
+
var model21 = defineModelRenderer({
|
|
3535
3644
|
name: "tslotgusset",
|
|
3536
3645
|
schema: tSlotGussetModelDefinitionSchema,
|
|
3537
3646
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(TSlotGusset, { ...props }),
|
|
3538
3647
|
pads: "none"
|
|
3539
3648
|
});
|
|
3540
|
-
function
|
|
3541
|
-
registry.register(
|
|
3649
|
+
function register21(registry) {
|
|
3650
|
+
registry.register(model21);
|
|
3542
3651
|
}
|
|
3543
3652
|
|
|
3544
3653
|
// lib/models/tslotinsidecorner/register.tsx
|
|
@@ -3618,14 +3727,14 @@ function TSlotInsideCorner({
|
|
|
3618
3727
|
}
|
|
3619
3728
|
|
|
3620
3729
|
// lib/models/tslotinsidecorner/register.tsx
|
|
3621
|
-
var
|
|
3730
|
+
var model22 = defineModelRenderer({
|
|
3622
3731
|
name: "tslotinsidecorner",
|
|
3623
3732
|
schema: tSlotInsideCornerModelDefinitionSchema,
|
|
3624
3733
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(TSlotInsideCorner, { ...props }),
|
|
3625
3734
|
pads: "none"
|
|
3626
3735
|
});
|
|
3627
|
-
function
|
|
3628
|
-
registry.register(
|
|
3736
|
+
function register22(registry) {
|
|
3737
|
+
registry.register(model22);
|
|
3629
3738
|
}
|
|
3630
3739
|
|
|
3631
3740
|
// lib/models/wormgear/register.tsx
|
|
@@ -3817,14 +3926,14 @@ function WormGear({ color = "#737e8f", ...props }) {
|
|
|
3817
3926
|
}
|
|
3818
3927
|
|
|
3819
3928
|
// lib/models/wormgear/register.tsx
|
|
3820
|
-
var
|
|
3929
|
+
var model23 = defineModelRenderer({
|
|
3821
3930
|
name: "wormgear",
|
|
3822
3931
|
schema: wormGearModelDefinitionSchema,
|
|
3823
3932
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(WormGear, { ...props }),
|
|
3824
3933
|
pads: "none"
|
|
3825
3934
|
});
|
|
3826
|
-
function
|
|
3827
|
-
registry.register(
|
|
3935
|
+
function register23(registry) {
|
|
3936
|
+
registry.register(model23);
|
|
3828
3937
|
}
|
|
3829
3938
|
|
|
3830
3939
|
// lib/generated/model-renderers.ts
|
|
@@ -3851,6 +3960,7 @@ function registerAllModelRenderers(registry) {
|
|
|
3851
3960
|
register20(registry);
|
|
3852
3961
|
register21(registry);
|
|
3853
3962
|
register22(registry);
|
|
3963
|
+
register23(registry);
|
|
3854
3964
|
}
|
|
3855
3965
|
|
|
3856
3966
|
// lib/default-model-registry.ts
|
|
@@ -11407,10 +11517,10 @@ var SOT143 = ({ footprint = "sot143" }) => {
|
|
|
11407
11517
|
var Footprinter3d = ({ footprint }) => {
|
|
11408
11518
|
const modelFn = mp3.string(footprint.split("_", 1)[0]).params().fn;
|
|
11409
11519
|
if (mp3.getModelNames().includes(modelFn)) {
|
|
11410
|
-
const
|
|
11411
|
-
const renderer = modelRendererRegistry.get(
|
|
11520
|
+
const model24 = mp3.string(footprint).json();
|
|
11521
|
+
const renderer = modelRendererRegistry.get(model24.fn);
|
|
11412
11522
|
if (renderer) {
|
|
11413
|
-
return renderer.render(
|
|
11523
|
+
return renderer.render(model24);
|
|
11414
11524
|
}
|
|
11415
11525
|
}
|
|
11416
11526
|
let normalizedFootprint = footprint;
|
|
@@ -12385,6 +12495,7 @@ export {
|
|
|
12385
12495
|
TSlotExtrusion,
|
|
12386
12496
|
TSlotGusset,
|
|
12387
12497
|
TSlotInsideCorner,
|
|
12498
|
+
ThreadedRod,
|
|
12388
12499
|
WormGear,
|
|
12389
12500
|
convertCSGToThreeGeom,
|
|
12390
12501
|
createButtonScrewGeom,
|
|
@@ -12426,6 +12537,8 @@ export {
|
|
|
12426
12537
|
createTSlotGussetMesh,
|
|
12427
12538
|
createTSlotInsideCornerGeom,
|
|
12428
12539
|
createTSlotInsideCornerMesh,
|
|
12540
|
+
createThreadedRodGeom,
|
|
12541
|
+
createThreadedRodMesh,
|
|
12429
12542
|
createWormGearGeom,
|
|
12430
12543
|
createWormGearMesh,
|
|
12431
12544
|
getJscadModelForFootprint,
|