jscad-electronics 0.0.207 → 0.0.208
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 +13 -2
- package/dist/index.js +934 -874
- package/dist/index.js.map +1 -1
- package/dist/vanilla.d.ts +13 -2
- package/dist/vanilla.js +95 -40
- 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, 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, TSlotExtrusionModelPropsInput, TSlotGussetModelPropsInput, TSlotInsideCornerModelPropsInput, WormGearModelPropsInput } from '@tscircuit/modelprinter';
|
|
7
7
|
|
|
8
8
|
type VNode = {
|
|
9
9
|
type: any;
|
|
@@ -259,6 +259,17 @@ type PlainBushingProps = PlainBushingModelPropsInput & {
|
|
|
259
259
|
declare function createPlainBushingGeom(input: PlainBushingModelPropsInput): _jscad_modeling_src_geometries_types.Geom3;
|
|
260
260
|
declare function PlainBushing({ color, ...props }: PlainBushingProps): react_jsx_runtime.JSX.Element;
|
|
261
261
|
|
|
262
|
+
type RigidCouplerMesh = ShaftMountMesh;
|
|
263
|
+
/** Geometry is driven by the corresponding modelprinter schema and hole layout. */
|
|
264
|
+
declare function createRigidCouplerMesh(input: RigidCouplerModelPropsInput): RigidCouplerMesh;
|
|
265
|
+
|
|
266
|
+
type RigidCouplerProps = RigidCouplerModelPropsInput & {
|
|
267
|
+
color?: string;
|
|
268
|
+
};
|
|
269
|
+
/** Datum and mounting-hole coordinates follow the modelprinter contract. */
|
|
270
|
+
declare function createRigidCouplerGeom(input: RigidCouplerModelPropsInput): _jscad_modeling_src_geometries_types.Geom3;
|
|
271
|
+
declare function RigidCoupler({ color, ...props }: RigidCouplerProps): react_jsx_runtime.JSX.Element;
|
|
272
|
+
|
|
262
273
|
type ShaftCollarMesh = ShaftMountMesh;
|
|
263
274
|
/** Geometry is driven by the corresponding modelprinter schema and hole layout. */
|
|
264
275
|
declare function createShaftCollarMesh(input: ShaftCollarModelPropsInput): ShaftCollarMesh;
|
|
@@ -369,4 +380,4 @@ declare function createJSCADRenderer(jscad: typeof jscadModeling): {
|
|
|
369
380
|
};
|
|
370
381
|
};
|
|
371
382
|
|
|
372
|
-
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, 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, createShaftCollarGeom, createShaftCollarMesh, createSheetMetalGeom, createSheetMetalMesh, createSpurGearGeom, createSpurGearMesh, createTSlotExtrusionGeom, createTSlotExtrusionMesh, createTSlotGussetGeom, createTSlotGussetMesh, createTSlotInsideCornerGeom, createTSlotInsideCornerMesh, createWormGearGeom, createWormGearMesh, getJscadModelForFootprint, getJscadModelForFootprintWithPads, h };
|
|
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 };
|
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(model23) {
|
|
187
|
+
return model23;
|
|
188
188
|
}
|
|
189
189
|
var ModelRendererRegistry = class {
|
|
190
190
|
models = /* @__PURE__ */ new Map();
|
|
191
|
-
register(
|
|
192
|
-
if (typeof
|
|
191
|
+
register(model23) {
|
|
192
|
+
if (typeof model23.name !== "string" || !/^[a-z]+$/.test(model23.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(model23.name)) {
|
|
198
|
+
throw new Error(`Model renderer "${model23.name}" is already registered`);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
200
|
+
if (model23.pads !== "none" && model23.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 } = model23;
|
|
204
204
|
this.models.set(name, {
|
|
205
205
|
name,
|
|
206
206
|
schema,
|
|
@@ -3038,6 +3038,57 @@ function register14(registry) {
|
|
|
3038
3038
|
registry.register(model14);
|
|
3039
3039
|
}
|
|
3040
3040
|
|
|
3041
|
+
// lib/models/rigidcoupler/register.tsx
|
|
3042
|
+
import { rigidCouplerModelDefinitionSchema } from "@tscircuit/modelprinter";
|
|
3043
|
+
|
|
3044
|
+
// lib/models/rigidcoupler/mesh.ts
|
|
3045
|
+
import "@jscad/modeling";
|
|
3046
|
+
import {
|
|
3047
|
+
rigidCouplerModelPropsSchema,
|
|
3048
|
+
getRigidCouplerDimensions
|
|
3049
|
+
} from "@tscircuit/modelprinter";
|
|
3050
|
+
function createRigidCouplerMesh(input) {
|
|
3051
|
+
const props = rigidCouplerModelPropsSchema.parse(input);
|
|
3052
|
+
const dimensions = getRigidCouplerDimensions(props);
|
|
3053
|
+
assertShaftMountResolution(dimensions.screwHoles);
|
|
3054
|
+
const body = createAnnularSleeve({
|
|
3055
|
+
outerRadius: props.outerDiameter / 2,
|
|
3056
|
+
boreARadius: props.boreDiameter / 2,
|
|
3057
|
+
boreBRadius: props.boreBDiameter / 2,
|
|
3058
|
+
length: props.length,
|
|
3059
|
+
chamfer: props.chamfer,
|
|
3060
|
+
stepZ: dimensions.boreADepth
|
|
3061
|
+
});
|
|
3062
|
+
return finishShaftMountMesh(
|
|
3063
|
+
subtractShaftMountParts(
|
|
3064
|
+
body,
|
|
3065
|
+
...dimensions.screwHoles.map(createMountingHoleCutter)
|
|
3066
|
+
)
|
|
3067
|
+
);
|
|
3068
|
+
}
|
|
3069
|
+
|
|
3070
|
+
// lib/models/rigidcoupler/RigidCoupler.tsx
|
|
3071
|
+
function createRigidCouplerGeom(input) {
|
|
3072
|
+
return indexedMeshToGeom3(createRigidCouplerMesh(input));
|
|
3073
|
+
}
|
|
3074
|
+
function RigidCoupler({
|
|
3075
|
+
color = "#737e8f",
|
|
3076
|
+
...props
|
|
3077
|
+
}) {
|
|
3078
|
+
return /* @__PURE__ */ jsx(Colorize, { color, children: /* @__PURE__ */ jsx(Custom, { geometry: createRigidCouplerGeom(props) }) });
|
|
3079
|
+
}
|
|
3080
|
+
|
|
3081
|
+
// lib/models/rigidcoupler/register.tsx
|
|
3082
|
+
var model15 = defineModelRenderer({
|
|
3083
|
+
name: "rigidcoupler",
|
|
3084
|
+
schema: rigidCouplerModelDefinitionSchema,
|
|
3085
|
+
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(RigidCoupler, { ...props }),
|
|
3086
|
+
pads: "none"
|
|
3087
|
+
});
|
|
3088
|
+
function register15(registry) {
|
|
3089
|
+
registry.register(model15);
|
|
3090
|
+
}
|
|
3091
|
+
|
|
3041
3092
|
// lib/models/shaftcollar/register.tsx
|
|
3042
3093
|
import { shaftCollarModelDefinitionSchema } from "@tscircuit/modelprinter";
|
|
3043
3094
|
|
|
@@ -3074,14 +3125,14 @@ function ShaftCollar({ color = "#737e8f", ...props }) {
|
|
|
3074
3125
|
}
|
|
3075
3126
|
|
|
3076
3127
|
// lib/models/shaftcollar/register.tsx
|
|
3077
|
-
var
|
|
3128
|
+
var model16 = defineModelRenderer({
|
|
3078
3129
|
name: "shaftcollar",
|
|
3079
3130
|
schema: shaftCollarModelDefinitionSchema,
|
|
3080
3131
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(ShaftCollar, { ...props }),
|
|
3081
3132
|
pads: "none"
|
|
3082
3133
|
});
|
|
3083
|
-
function
|
|
3084
|
-
registry.register(
|
|
3134
|
+
function register16(registry) {
|
|
3135
|
+
registry.register(model16);
|
|
3085
3136
|
}
|
|
3086
3137
|
|
|
3087
3138
|
// lib/models/sheetmetal/register.tsx
|
|
@@ -3241,14 +3292,14 @@ function SheetMetal({ color = "#737e8f", ...props }) {
|
|
|
3241
3292
|
}
|
|
3242
3293
|
|
|
3243
3294
|
// lib/models/sheetmetal/register.tsx
|
|
3244
|
-
var
|
|
3295
|
+
var model17 = defineModelRenderer({
|
|
3245
3296
|
name: "sheetmetal",
|
|
3246
3297
|
schema: sheetMetalModelDefinitionSchema,
|
|
3247
3298
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(SheetMetal, { ...props }),
|
|
3248
3299
|
pads: "none"
|
|
3249
3300
|
});
|
|
3250
|
-
function
|
|
3251
|
-
registry.register(
|
|
3301
|
+
function register17(registry) {
|
|
3302
|
+
registry.register(model17);
|
|
3252
3303
|
}
|
|
3253
3304
|
|
|
3254
3305
|
// lib/models/spurgear/register.tsx
|
|
@@ -3263,14 +3314,14 @@ function SpurGear({ color = "#737e8f", ...props }) {
|
|
|
3263
3314
|
}
|
|
3264
3315
|
|
|
3265
3316
|
// lib/models/spurgear/register.tsx
|
|
3266
|
-
var
|
|
3317
|
+
var model18 = defineModelRenderer({
|
|
3267
3318
|
name: "spurgear",
|
|
3268
3319
|
schema: spurGearModelDefinitionSchema,
|
|
3269
3320
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(SpurGear, { ...props }),
|
|
3270
3321
|
pads: "none"
|
|
3271
3322
|
});
|
|
3272
|
-
function
|
|
3273
|
-
registry.register(
|
|
3323
|
+
function register18(registry) {
|
|
3324
|
+
registry.register(model18);
|
|
3274
3325
|
}
|
|
3275
3326
|
|
|
3276
3327
|
// lib/models/tslotextrusion/register.tsx
|
|
@@ -3420,14 +3471,14 @@ function TSlotExtrusion({
|
|
|
3420
3471
|
}
|
|
3421
3472
|
|
|
3422
3473
|
// lib/models/tslotextrusion/register.tsx
|
|
3423
|
-
var
|
|
3474
|
+
var model19 = defineModelRenderer({
|
|
3424
3475
|
name: "tslotextrusion",
|
|
3425
3476
|
schema: tSlotExtrusionModelDefinitionSchema,
|
|
3426
3477
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(TSlotExtrusion, { ...props }),
|
|
3427
3478
|
pads: "none"
|
|
3428
3479
|
});
|
|
3429
|
-
function
|
|
3430
|
-
registry.register(
|
|
3480
|
+
function register19(registry) {
|
|
3481
|
+
registry.register(model19);
|
|
3431
3482
|
}
|
|
3432
3483
|
|
|
3433
3484
|
// lib/models/tslotgusset/register.tsx
|
|
@@ -3480,14 +3531,14 @@ function TSlotGusset({ color = "#8995a3", ...props }) {
|
|
|
3480
3531
|
}
|
|
3481
3532
|
|
|
3482
3533
|
// lib/models/tslotgusset/register.tsx
|
|
3483
|
-
var
|
|
3534
|
+
var model20 = defineModelRenderer({
|
|
3484
3535
|
name: "tslotgusset",
|
|
3485
3536
|
schema: tSlotGussetModelDefinitionSchema,
|
|
3486
3537
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(TSlotGusset, { ...props }),
|
|
3487
3538
|
pads: "none"
|
|
3488
3539
|
});
|
|
3489
|
-
function
|
|
3490
|
-
registry.register(
|
|
3540
|
+
function register20(registry) {
|
|
3541
|
+
registry.register(model20);
|
|
3491
3542
|
}
|
|
3492
3543
|
|
|
3493
3544
|
// lib/models/tslotinsidecorner/register.tsx
|
|
@@ -3567,14 +3618,14 @@ function TSlotInsideCorner({
|
|
|
3567
3618
|
}
|
|
3568
3619
|
|
|
3569
3620
|
// lib/models/tslotinsidecorner/register.tsx
|
|
3570
|
-
var
|
|
3621
|
+
var model21 = defineModelRenderer({
|
|
3571
3622
|
name: "tslotinsidecorner",
|
|
3572
3623
|
schema: tSlotInsideCornerModelDefinitionSchema,
|
|
3573
3624
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(TSlotInsideCorner, { ...props }),
|
|
3574
3625
|
pads: "none"
|
|
3575
3626
|
});
|
|
3576
|
-
function
|
|
3577
|
-
registry.register(
|
|
3627
|
+
function register21(registry) {
|
|
3628
|
+
registry.register(model21);
|
|
3578
3629
|
}
|
|
3579
3630
|
|
|
3580
3631
|
// lib/models/wormgear/register.tsx
|
|
@@ -3766,14 +3817,14 @@ function WormGear({ color = "#737e8f", ...props }) {
|
|
|
3766
3817
|
}
|
|
3767
3818
|
|
|
3768
3819
|
// lib/models/wormgear/register.tsx
|
|
3769
|
-
var
|
|
3820
|
+
var model22 = defineModelRenderer({
|
|
3770
3821
|
name: "wormgear",
|
|
3771
3822
|
schema: wormGearModelDefinitionSchema,
|
|
3772
3823
|
render: ({ fn, ...props }) => /* @__PURE__ */ jsx(WormGear, { ...props }),
|
|
3773
3824
|
pads: "none"
|
|
3774
3825
|
});
|
|
3775
|
-
function
|
|
3776
|
-
registry.register(
|
|
3826
|
+
function register22(registry) {
|
|
3827
|
+
registry.register(model22);
|
|
3777
3828
|
}
|
|
3778
3829
|
|
|
3779
3830
|
// lib/generated/model-renderers.ts
|
|
@@ -3799,6 +3850,7 @@ function registerAllModelRenderers(registry) {
|
|
|
3799
3850
|
register19(registry);
|
|
3800
3851
|
register20(registry);
|
|
3801
3852
|
register21(registry);
|
|
3853
|
+
register22(registry);
|
|
3802
3854
|
}
|
|
3803
3855
|
|
|
3804
3856
|
// lib/default-model-registry.ts
|
|
@@ -11355,10 +11407,10 @@ var SOT143 = ({ footprint = "sot143" }) => {
|
|
|
11355
11407
|
var Footprinter3d = ({ footprint }) => {
|
|
11356
11408
|
const modelFn = mp3.string(footprint.split("_", 1)[0]).params().fn;
|
|
11357
11409
|
if (mp3.getModelNames().includes(modelFn)) {
|
|
11358
|
-
const
|
|
11359
|
-
const renderer = modelRendererRegistry.get(
|
|
11410
|
+
const model23 = mp3.string(footprint).json();
|
|
11411
|
+
const renderer = modelRendererRegistry.get(model23.fn);
|
|
11360
11412
|
if (renderer) {
|
|
11361
|
-
return renderer.render(
|
|
11413
|
+
return renderer.render(model23);
|
|
11362
11414
|
}
|
|
11363
11415
|
}
|
|
11364
11416
|
let normalizedFootprint = footprint;
|
|
@@ -12191,8 +12243,8 @@ function renderNode(node, colorCtx, renderCtx) {
|
|
|
12191
12243
|
}
|
|
12192
12244
|
return (children ?? []).flatMap((c) => renderNode(c, colorCtx, renderCtx));
|
|
12193
12245
|
}
|
|
12194
|
-
function render(root,
|
|
12195
|
-
const geometries = renderNode(root, void 0, { jscad:
|
|
12246
|
+
function render(root, jscad8) {
|
|
12247
|
+
const geometries = renderNode(root, void 0, { jscad: jscad8 });
|
|
12196
12248
|
return {
|
|
12197
12249
|
geometries: geometries.map(
|
|
12198
12250
|
(entry) => entry.material ? { ...entry, geom: { ...entry.geom, material: entry.material } } : entry
|
|
@@ -12284,24 +12336,24 @@ function convertCSGToThreeGeom(csg) {
|
|
|
12284
12336
|
}
|
|
12285
12337
|
|
|
12286
12338
|
// lib/vanilla/index.ts
|
|
12287
|
-
function getJscadModelForFootprint(footprint,
|
|
12339
|
+
function getJscadModelForFootprint(footprint, jscad8) {
|
|
12288
12340
|
const vnode = h(Footprinter3d, { footprint });
|
|
12289
|
-
return render(vnode,
|
|
12341
|
+
return render(vnode, jscad8);
|
|
12290
12342
|
}
|
|
12291
|
-
function getJscadModelForFootprintWithPads(footprint,
|
|
12343
|
+
function getJscadModelForFootprintWithPads(footprint, jscad8) {
|
|
12292
12344
|
const vnode = h(
|
|
12293
12345
|
Fragment,
|
|
12294
12346
|
{},
|
|
12295
12347
|
h(Footprinter3d, { footprint }),
|
|
12296
12348
|
h(ExtrudedPads, { footprint })
|
|
12297
12349
|
);
|
|
12298
|
-
return render(vnode,
|
|
12350
|
+
return render(vnode, jscad8);
|
|
12299
12351
|
}
|
|
12300
|
-
function createJSCADRenderer(
|
|
12352
|
+
function createJSCADRenderer(jscad8) {
|
|
12301
12353
|
function createJSCADRoot(container) {
|
|
12302
12354
|
return {
|
|
12303
12355
|
render(element) {
|
|
12304
|
-
const { geometries } = render(element,
|
|
12356
|
+
const { geometries } = render(element, jscad8);
|
|
12305
12357
|
container.splice(0, container.length, ...geometries);
|
|
12306
12358
|
}
|
|
12307
12359
|
};
|
|
@@ -12326,6 +12378,7 @@ export {
|
|
|
12326
12378
|
NemaMotor,
|
|
12327
12379
|
PanScrew,
|
|
12328
12380
|
PlainBushing,
|
|
12381
|
+
RigidCoupler,
|
|
12329
12382
|
ShaftCollar,
|
|
12330
12383
|
SheetMetal,
|
|
12331
12384
|
SpurGear,
|
|
@@ -12359,6 +12412,8 @@ export {
|
|
|
12359
12412
|
createPanScrewMesh,
|
|
12360
12413
|
createPlainBushingGeom,
|
|
12361
12414
|
createPlainBushingMesh,
|
|
12415
|
+
createRigidCouplerGeom,
|
|
12416
|
+
createRigidCouplerMesh,
|
|
12362
12417
|
createShaftCollarGeom,
|
|
12363
12418
|
createShaftCollarMesh,
|
|
12364
12419
|
createSheetMetalGeom,
|