jscad-electronics 0.0.237 → 0.0.239
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 +96 -9
- package/dist/index.js +1244 -589
- package/dist/index.js.map +1 -1
- package/dist/model-contracts.json +3 -3
- package/dist/vanilla.d.ts +111 -10
- package/dist/vanilla.js +1229 -459
- package/dist/vanilla.js.map +1 -1
- package/package.json +9 -11
package/dist/index.js
CHANGED
|
@@ -56,6 +56,504 @@ var A01005 = ({ color = "#333" }) => {
|
|
|
56
56
|
] });
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
+
// lib/named-edges.ts
|
|
60
|
+
import jscad from "@jscad/modeling";
|
|
61
|
+
function listJscadNamedEdges(model108) {
|
|
62
|
+
return listJscadReferenceFeatures(model108).filter((name) => {
|
|
63
|
+
const { geometry } = model108.referenceFeatures[name];
|
|
64
|
+
return jscad.geometries.geom2.isA(geometry) || jscad.geometries.path2.isA(geometry);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function listJscadReferenceFeatures(model108) {
|
|
68
|
+
return Object.keys(model108.referenceFeatures);
|
|
69
|
+
}
|
|
70
|
+
function readJscadReferenceFeature(model108, name) {
|
|
71
|
+
if (!Object.hasOwn(model108.referenceFeatures, name))
|
|
72
|
+
throw new Error(`JSCAD model does not define named feature "${name}"`);
|
|
73
|
+
return model108.referenceFeatures[name];
|
|
74
|
+
}
|
|
75
|
+
function readJscadNamedEdge(model108, name) {
|
|
76
|
+
const { geometry: feature, matrix } = readJscadReferenceFeature(model108, name);
|
|
77
|
+
if (matrix.length !== 16 || !matrix.every(Number.isFinite))
|
|
78
|
+
throw new Error(
|
|
79
|
+
`Named JSCAD feature "${name}" requires a finite 4x4 matrix`
|
|
80
|
+
);
|
|
81
|
+
let points;
|
|
82
|
+
let closed;
|
|
83
|
+
if (jscad.geometries.path2.isA(feature)) {
|
|
84
|
+
const path = jscad.geometries.path2.clone(feature);
|
|
85
|
+
points = jscad.geometries.path2.toPoints(path);
|
|
86
|
+
closed = path.isClosed;
|
|
87
|
+
} else if (jscad.geometries.geom2.isA(feature)) {
|
|
88
|
+
const outlines = jscad.geometries.geom2.toOutlines(
|
|
89
|
+
jscad.geometries.geom2.clone(feature)
|
|
90
|
+
);
|
|
91
|
+
if (outlines.length !== 1)
|
|
92
|
+
throw new Error(
|
|
93
|
+
`Named JSCAD edge "${name}" must identify one contour; name its boundaries separately`
|
|
94
|
+
);
|
|
95
|
+
points = outlines[0];
|
|
96
|
+
closed = true;
|
|
97
|
+
} else {
|
|
98
|
+
throw new Error(
|
|
99
|
+
`Named JSCAD edge "${name}" is not a geom2 or path2 feature`
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
if (points.length < 2)
|
|
103
|
+
throw new Error(`Named JSCAD edge "${name}" has no measurable path`);
|
|
104
|
+
return {
|
|
105
|
+
points: points.map(([x, y]) => {
|
|
106
|
+
const point = jscad.maths.vec3.transform(
|
|
107
|
+
jscad.maths.vec3.create(),
|
|
108
|
+
[x, y, 0],
|
|
109
|
+
matrix
|
|
110
|
+
);
|
|
111
|
+
return { x: point[0], y: point[1], z: point[2] };
|
|
112
|
+
}),
|
|
113
|
+
closed
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// node_modules/@tscircuit/jscad/lib/cleanup-subtraction.ts
|
|
118
|
+
import insertTjunctions from "@jscad/modeling/src/operations/modifiers/insertTjunctions.js";
|
|
119
|
+
function cleanupSubtraction(kernel, geometry) {
|
|
120
|
+
const { geom3 } = kernel.geometries;
|
|
121
|
+
if (!geometry.polygons.length) return geometry;
|
|
122
|
+
const source = structuredClone(geometry);
|
|
123
|
+
const polygons = geom3.toPolygons(source);
|
|
124
|
+
const extent = Math.max(...kernel.measurements.measureDimensions(source));
|
|
125
|
+
if (!Number.isFinite(extent) || extent <= 0)
|
|
126
|
+
throw new Error("Subtraction requires finite nonempty geometry");
|
|
127
|
+
const epsilon = Math.max(extent * 1e-10, 1e-12);
|
|
128
|
+
source.polygons = polygons.map((polygon4) => ({
|
|
129
|
+
...polygon4,
|
|
130
|
+
vertices: polygon4.vertices.map((point) => {
|
|
131
|
+
if (!point.every(Number.isFinite))
|
|
132
|
+
throw new Error("Subtraction requires finite coordinates");
|
|
133
|
+
return point.map((value) => Math.round(value / epsilon) * epsilon);
|
|
134
|
+
})
|
|
135
|
+
}));
|
|
136
|
+
const triangles = insertTjunctions(source.polygons).flatMap((polygon4) => {
|
|
137
|
+
if (polygon4.vertices.length === 3) return [polygon4];
|
|
138
|
+
const center = [0, 0, 0];
|
|
139
|
+
for (const point of polygon4.vertices)
|
|
140
|
+
for (let axis = 0; axis < 3; axis++)
|
|
141
|
+
center[axis] += point[axis] / polygon4.vertices.length;
|
|
142
|
+
return polygon4.vertices.map((point, index) => {
|
|
143
|
+
const triangle = kernel.geometries.poly3.create([
|
|
144
|
+
center,
|
|
145
|
+
point,
|
|
146
|
+
polygon4.vertices[(index + 1) % polygon4.vertices.length]
|
|
147
|
+
]);
|
|
148
|
+
if (polygon4.color) triangle.color = polygon4.color;
|
|
149
|
+
return triangle;
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
const cleaned = geom3.create(triangles);
|
|
153
|
+
return {
|
|
154
|
+
...geometry,
|
|
155
|
+
polygons: cleaned.polygons,
|
|
156
|
+
transforms: cleaned.transforms
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// node_modules/@tscircuit/jscad/lib/with-references.ts
|
|
161
|
+
import modeling from "@jscad/modeling";
|
|
162
|
+
var metadata = /* @__PURE__ */ Symbol.for("@tscircuit/jscad/references/v1");
|
|
163
|
+
var cache = /* @__PURE__ */ new WeakMap();
|
|
164
|
+
var snapshot = (value) => structuredClone(value);
|
|
165
|
+
var assertName = (name) => {
|
|
166
|
+
if (typeof name !== "string" || !name.trim())
|
|
167
|
+
throw new Error("Reference name must be nonempty");
|
|
168
|
+
};
|
|
169
|
+
function withReferences(kernel = modeling) {
|
|
170
|
+
if (cache.has(kernel)) return cache.get(kernel);
|
|
171
|
+
const k = kernel;
|
|
172
|
+
const { mat4 } = k.maths;
|
|
173
|
+
const identity = () => Array.from(mat4.create());
|
|
174
|
+
const multiply = (a, b) => Array.from(mat4.multiply(mat4.create(), a, b));
|
|
175
|
+
const isGeometry = (g) => g && (k.geometries.geom2.isA(g) || k.geometries.path2.isA(g) || k.geometries.geom3.isA(g));
|
|
176
|
+
const inputs = (args) => args.flat(Infinity).filter(isGeometry);
|
|
177
|
+
const read = (g) => g?.[metadata] ?? /* @__PURE__ */ Object.create(null);
|
|
178
|
+
const merge = (geometries9) => {
|
|
179
|
+
const refs = /* @__PURE__ */ Object.create(null);
|
|
180
|
+
for (const g of geometries9)
|
|
181
|
+
for (const [name, ref] of Object.entries(read(g))) {
|
|
182
|
+
if (Object.hasOwn(refs, name) && refs[name] !== ref)
|
|
183
|
+
throw new Error(`Duplicate reference: ${name}`);
|
|
184
|
+
refs[name] = ref;
|
|
185
|
+
}
|
|
186
|
+
return refs;
|
|
187
|
+
};
|
|
188
|
+
const attach = (g, refs) => {
|
|
189
|
+
if (!Object.keys(refs).length) return g;
|
|
190
|
+
if (Array.isArray(g)) return g.map((item) => attach(item, refs));
|
|
191
|
+
return isGeometry(g) ? Object.assign({}, g, { [metadata]: refs }) : g;
|
|
192
|
+
};
|
|
193
|
+
const moved = (refs, matrix) => Object.fromEntries(
|
|
194
|
+
Object.entries(refs).map(([name, ref]) => [
|
|
195
|
+
name,
|
|
196
|
+
{ geometry: ref.geometry, matrix: multiply(matrix, ref.matrix) }
|
|
197
|
+
])
|
|
198
|
+
);
|
|
199
|
+
const add = (refs, name, ref) => {
|
|
200
|
+
assertName(name);
|
|
201
|
+
if (Object.hasOwn(refs, name))
|
|
202
|
+
throw new Error(`Duplicate reference: ${name}`);
|
|
203
|
+
refs[name] = ref;
|
|
204
|
+
};
|
|
205
|
+
const planar = (g) => {
|
|
206
|
+
if (!k.geometries.geom2.isA(g) && !k.geometries.path2.isA(g))
|
|
207
|
+
throw new Error("References require native planar geometry");
|
|
208
|
+
};
|
|
209
|
+
const references2 = {
|
|
210
|
+
name(name, geometry) {
|
|
211
|
+
planar(geometry);
|
|
212
|
+
const refs = merge([geometry]);
|
|
213
|
+
add(refs, name, { geometry: snapshot(geometry), matrix: identity() });
|
|
214
|
+
return attach(geometry, refs);
|
|
215
|
+
},
|
|
216
|
+
nameOutlines(geometry, names) {
|
|
217
|
+
if (!k.geometries.geom2.isA(geometry))
|
|
218
|
+
throw new Error("nameOutlines requires a native Geom2");
|
|
219
|
+
const refs = merge([geometry]);
|
|
220
|
+
const outlines = k.geometries.geom2.toOutlines(
|
|
221
|
+
snapshot(geometry)
|
|
222
|
+
);
|
|
223
|
+
const area = (points) => points.reduce((sum, p, i) => {
|
|
224
|
+
const q = points[(i + 1) % points.length];
|
|
225
|
+
return sum + p[0] * q[1] - p[1] * q[0];
|
|
226
|
+
}, 0);
|
|
227
|
+
for (const [role, name] of Object.entries(names)) {
|
|
228
|
+
if (name === void 0) continue;
|
|
229
|
+
if (role !== "outer" && role !== "hole")
|
|
230
|
+
throw new Error(`Unknown outline role: ${role}`);
|
|
231
|
+
const matches = outlines.filter(
|
|
232
|
+
(points) => role === "outer" ? area(points) > 0 : area(points) < 0
|
|
233
|
+
);
|
|
234
|
+
if (matches.length !== 1)
|
|
235
|
+
throw new Error(
|
|
236
|
+
`Expected exactly one ${role} outline, found ${matches.length}`
|
|
237
|
+
);
|
|
238
|
+
add(refs, name, {
|
|
239
|
+
geometry: k.geometries.path2.fromPoints({ closed: true }, matches[0]),
|
|
240
|
+
matrix: identity()
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
return attach(geometry, refs);
|
|
244
|
+
},
|
|
245
|
+
reference(name, geometry) {
|
|
246
|
+
return attach(
|
|
247
|
+
k.geometries.geom3.create(),
|
|
248
|
+
read(references2.name(name, geometry))
|
|
249
|
+
);
|
|
250
|
+
},
|
|
251
|
+
get(geometry, name) {
|
|
252
|
+
const ref = read(geometry)[name];
|
|
253
|
+
if (!Object.hasOwn(read(geometry), name))
|
|
254
|
+
throw new Error(`Unknown reference: ${name}`);
|
|
255
|
+
return snapshot(ref);
|
|
256
|
+
},
|
|
257
|
+
list(geometry) {
|
|
258
|
+
return Object.keys(read(geometry));
|
|
259
|
+
},
|
|
260
|
+
collect(geometries9) {
|
|
261
|
+
return snapshot(merge(inputs([geometries9])));
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
const wrapped = { ...k, references: references2 };
|
|
265
|
+
for (const namespace of [
|
|
266
|
+
"booleans",
|
|
267
|
+
"hulls",
|
|
268
|
+
"expansions",
|
|
269
|
+
"modifiers",
|
|
270
|
+
"extrusions",
|
|
271
|
+
"colors"
|
|
272
|
+
]) {
|
|
273
|
+
wrapped[namespace] = { ...k[namespace] };
|
|
274
|
+
for (const [name, fn] of Object.entries(k[namespace]))
|
|
275
|
+
if (typeof fn === "function") {
|
|
276
|
+
wrapped[namespace][name] = (...args) => {
|
|
277
|
+
const refs = merge(inputs(args));
|
|
278
|
+
let result = fn(...args);
|
|
279
|
+
if (namespace === "booleans" && name === "subtract" && k.geometries.geom3.isA(result)) {
|
|
280
|
+
result = cleanupSubtraction(kernel, result);
|
|
281
|
+
}
|
|
282
|
+
return attach(result, refs);
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
const transformResult = (fn, args, offset, boundsBased = false) => {
|
|
287
|
+
const gs = inputs(args.slice(offset));
|
|
288
|
+
if (!gs.some((g) => Object.keys(read(g)).length)) return fn(...args);
|
|
289
|
+
const maps = gs.map((g) => read(g));
|
|
290
|
+
const before = boundsBased ? gs.map((g) => k.measurements.measureBoundingBox(snapshot(g))[0]) : [];
|
|
291
|
+
const matrix = boundsBased ? null : fn(...args.slice(0, offset), k.geometries.geom3.create()).transforms;
|
|
292
|
+
const result = fn(...args);
|
|
293
|
+
const results = Array.isArray(result) ? result : [result];
|
|
294
|
+
const output = results.map((g, i) => {
|
|
295
|
+
let m = matrix;
|
|
296
|
+
if (boundsBased) {
|
|
297
|
+
const after = k.measurements.measureBoundingBox(snapshot(g))[0];
|
|
298
|
+
m = mat4.fromTranslation(
|
|
299
|
+
mat4.create(),
|
|
300
|
+
after.map((n, axis) => n - before[i][axis])
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
return attach(g, moved(maps[i], Array.from(m)));
|
|
304
|
+
});
|
|
305
|
+
return Array.isArray(result) ? output : output[0];
|
|
306
|
+
};
|
|
307
|
+
wrapped.transforms = { ...k.transforms };
|
|
308
|
+
for (const [name, fn] of Object.entries(k.transforms)) {
|
|
309
|
+
const boundsBased = /^(center|align)/.test(name);
|
|
310
|
+
const offset = /^center[XYZ]$|^mirror[XYZ]$/.test(name) ? 0 : 1;
|
|
311
|
+
wrapped.transforms[name] = (...args) => transformResult(fn, args, offset, boundsBased);
|
|
312
|
+
}
|
|
313
|
+
wrapped.geometries = { ...k.geometries };
|
|
314
|
+
for (const ns of ["geom2", "geom3", "path2"]) {
|
|
315
|
+
wrapped.geometries[ns] = {
|
|
316
|
+
...k.geometries[ns],
|
|
317
|
+
transform: (matrix, g) => attach(k.geometries[ns].transform(matrix, g), moved(read(g), matrix))
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
wrapped.extrusions.extrudeLinear = (options, ...objects) => {
|
|
321
|
+
const gs = inputs(objects);
|
|
322
|
+
const { topOutlineName, bottomOutlineName } = options ?? {};
|
|
323
|
+
if (topOutlineName === void 0 && bottomOutlineName === void 0) {
|
|
324
|
+
const refs2 = gs.map(read);
|
|
325
|
+
const result = k.extrusions.extrudeLinear(options, ...objects);
|
|
326
|
+
return Array.isArray(result) ? result.map((g, i) => attach(g, refs2[i])) : attach(result, refs2[0] ?? {});
|
|
327
|
+
}
|
|
328
|
+
if (gs.length !== 1)
|
|
329
|
+
throw new Error("Named extrusion outlines require exactly one profile");
|
|
330
|
+
const profile5 = gs[0];
|
|
331
|
+
planar(profile5);
|
|
332
|
+
if (k.geometries.path2.isA(profile5) && !profile5.isClosed)
|
|
333
|
+
throw new Error("Named extrusion outlines require a closed path");
|
|
334
|
+
const { height: height10 = 1, twistAngle = 0, twistSteps = 1 } = options;
|
|
335
|
+
if (!Number.isFinite(height10) || !Number.isFinite(twistAngle) || !Number.isInteger(twistSteps) || twistSteps < 1)
|
|
336
|
+
throw new Error(
|
|
337
|
+
"Invalid named extrusion height, twistAngle or twistSteps"
|
|
338
|
+
);
|
|
339
|
+
const refs = merge(gs);
|
|
340
|
+
const source = snapshot(profile5);
|
|
341
|
+
const top = multiply(
|
|
342
|
+
Array.from(mat4.fromTranslation(mat4.create(), [0, 0, height10])),
|
|
343
|
+
Array.from(mat4.fromZRotation(mat4.create(), twistAngle))
|
|
344
|
+
);
|
|
345
|
+
for (const [prefix, matrix] of [
|
|
346
|
+
[bottomOutlineName, identity()],
|
|
347
|
+
[topOutlineName, top]
|
|
348
|
+
]) {
|
|
349
|
+
if (prefix === void 0) continue;
|
|
350
|
+
add(refs, prefix, { geometry: source, matrix });
|
|
351
|
+
for (const [name, ref] of Object.entries(read(profile5)))
|
|
352
|
+
add(refs, `${prefix}.${name}`, {
|
|
353
|
+
geometry: ref.geometry,
|
|
354
|
+
matrix: multiply(matrix, ref.matrix)
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
return attach(k.extrusions.extrudeLinear(options, ...objects), refs);
|
|
358
|
+
};
|
|
359
|
+
cache.set(kernel, wrapped);
|
|
360
|
+
cache.set(wrapped, wrapped);
|
|
361
|
+
return wrapped;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// node_modules/@tscircuit/jscad/lib/geom3-to-indexed-mesh.ts
|
|
365
|
+
import jscad2 from "@jscad/modeling";
|
|
366
|
+
var edgeKey = (a, b) => a < b ? `${a},${b}` : `${b},${a}`;
|
|
367
|
+
function geom3ToIndexedMesh(input) {
|
|
368
|
+
const generalize8 = jscad2.modifiers.generalize;
|
|
369
|
+
input = structuredClone(input);
|
|
370
|
+
const inputExtent = Math.max(...jscad2.measurements.measureDimensions(input));
|
|
371
|
+
if (!Number.isFinite(inputExtent) || inputExtent <= 0)
|
|
372
|
+
throw new Error("Expected finite nonempty geometry");
|
|
373
|
+
const weldTolerance = Math.max(inputExtent * 1e-10, 1e-12);
|
|
374
|
+
const cells = /* @__PURE__ */ new Map();
|
|
375
|
+
const weld = (v) => {
|
|
376
|
+
if (v.length !== 3 || v.some((value) => !Number.isFinite(value)))
|
|
377
|
+
throw new Error("Expected finite mesh coordinates");
|
|
378
|
+
const cell = v.map((value) => Math.floor(value / weldTolerance));
|
|
379
|
+
for (let x = -1; x <= 1; x++)
|
|
380
|
+
for (let y = -1; y <= 1; y++)
|
|
381
|
+
for (let z = -1; z <= 1; z++) {
|
|
382
|
+
const entries2 = cells.get(
|
|
383
|
+
`${cell[0] + x},${cell[1] + y},${cell[2] + z}`
|
|
384
|
+
);
|
|
385
|
+
const existing = entries2?.find(
|
|
386
|
+
(point3) => Math.hypot(...v.map((value, axis) => value - point3[axis])) <= weldTolerance
|
|
387
|
+
);
|
|
388
|
+
if (existing) return existing;
|
|
389
|
+
}
|
|
390
|
+
const point2 = [v[0], v[1], v[2]], key = cell.join(","), entries = cells.get(key);
|
|
391
|
+
if (entries) entries.push(point2);
|
|
392
|
+
else cells.set(key, [point2]);
|
|
393
|
+
return point2;
|
|
394
|
+
};
|
|
395
|
+
const welded = jscad2.geometries.geom3.fromPoints(
|
|
396
|
+
jscad2.geometries.geom3.toPolygons(input).map((poly) => poly.vertices.map(weld))
|
|
397
|
+
);
|
|
398
|
+
const geom = generalize8({ snap: true, triangulate: true }, welded);
|
|
399
|
+
const extent = Math.max(...jscad2.measurements.measureDimensions(geom));
|
|
400
|
+
if (!Number.isFinite(extent) || extent <= 0)
|
|
401
|
+
throw new Error("Expected finite nonempty geometry");
|
|
402
|
+
const epsilon = Math.max(extent * 1e-10, 1e-12);
|
|
403
|
+
const snapTolerance = Math.max(
|
|
404
|
+
2 * jscad2.measurements.measureEpsilon(geom),
|
|
405
|
+
epsilon
|
|
406
|
+
);
|
|
407
|
+
const positions = [], indices = [];
|
|
408
|
+
const lookup = /* @__PURE__ */ new Map();
|
|
409
|
+
const point = (index) => [
|
|
410
|
+
positions[index * 3],
|
|
411
|
+
positions[index * 3 + 1],
|
|
412
|
+
positions[index * 3 + 2]
|
|
413
|
+
];
|
|
414
|
+
const vertex = (v) => {
|
|
415
|
+
if (v.length !== 3 || v.some((value) => !Number.isFinite(value)))
|
|
416
|
+
throw new Error("Expected finite mesh coordinates");
|
|
417
|
+
const key = v.map((x) => Math.round(x / epsilon)).join(",");
|
|
418
|
+
let index = lookup.get(key);
|
|
419
|
+
if (index === void 0) {
|
|
420
|
+
index = positions.length / 3;
|
|
421
|
+
positions.push(...v);
|
|
422
|
+
lookup.set(key, index);
|
|
423
|
+
}
|
|
424
|
+
return index;
|
|
425
|
+
};
|
|
426
|
+
const area = ([a, b, c]) => {
|
|
427
|
+
const pa = point(a), pb = point(b), pc = point(c);
|
|
428
|
+
const u = pb.map((x, i) => x - pa[i]), v = pc.map((x, i) => x - pa[i]);
|
|
429
|
+
return Math.hypot(
|
|
430
|
+
u[1] * v[2] - u[2] * v[1],
|
|
431
|
+
u[2] * v[0] - u[0] * v[2],
|
|
432
|
+
u[0] * v[1] - u[1] * v[0]
|
|
433
|
+
);
|
|
434
|
+
};
|
|
435
|
+
const triangles = [];
|
|
436
|
+
const edges = /* @__PURE__ */ new Map();
|
|
437
|
+
for (const poly of jscad2.geometries.geom3.toPolygons(geom)) {
|
|
438
|
+
for (let i = 1; i < poly.vertices.length - 1; i++) {
|
|
439
|
+
const triangle = [
|
|
440
|
+
vertex(poly.vertices[0]),
|
|
441
|
+
vertex(poly.vertices[i]),
|
|
442
|
+
vertex(poly.vertices[i + 1])
|
|
443
|
+
];
|
|
444
|
+
if (area(triangle) <= epsilon * epsilon) continue;
|
|
445
|
+
triangles.push(triangle);
|
|
446
|
+
triangle.forEach((a, i2) => {
|
|
447
|
+
const b = triangle[(i2 + 1) % 3], key = edgeKey(a, b), entry = edges.get(key);
|
|
448
|
+
if (entry) entry.count++;
|
|
449
|
+
else edges.set(key, { a, b, count: 1 });
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
const unmatched = [...edges.values()].filter(({ count }) => count === 1);
|
|
454
|
+
const candidates = [...new Set(unmatched.flatMap(({ a, b }) => [a, b]))];
|
|
455
|
+
const sorted = [0, 1, 2].map(
|
|
456
|
+
(axis) => [...candidates].sort(
|
|
457
|
+
(a, b) => positions[a * 3 + axis] - positions[b * 3 + axis]
|
|
458
|
+
)
|
|
459
|
+
);
|
|
460
|
+
const subdivisions = /* @__PURE__ */ new Map();
|
|
461
|
+
for (const { a, b } of unmatched) {
|
|
462
|
+
const pa = point(a), pb = point(b), direction = pb.map((x, i) => x - pa[i]), length32 = Math.hypot(...direction);
|
|
463
|
+
if (length32 <= epsilon) continue;
|
|
464
|
+
const axis = direction.reduce(
|
|
465
|
+
(best, x, i) => Math.abs(x) > Math.abs(direction[best]) ? i : best,
|
|
466
|
+
0
|
|
467
|
+
);
|
|
468
|
+
const unit = direction.map((x) => x / length32), low = Math.min(pa[axis], pb[axis]), high = Math.max(pa[axis], pb[axis]);
|
|
469
|
+
const byAxis = sorted[axis];
|
|
470
|
+
let left = 0, right = byAxis.length;
|
|
471
|
+
while (left < right) {
|
|
472
|
+
const mid = left + right >>> 1;
|
|
473
|
+
if (positions[byAxis[mid] * 3 + axis] < low) left = mid + 1;
|
|
474
|
+
else right = mid;
|
|
475
|
+
}
|
|
476
|
+
const splits = [];
|
|
477
|
+
for (let i = left; i < byAxis.length; i++) {
|
|
478
|
+
const index = byAxis[i], p = point(index);
|
|
479
|
+
if (p[axis] > high) break;
|
|
480
|
+
if (index === a || index === b) continue;
|
|
481
|
+
const delta = p.map((x, j) => x - pa[j]), along = delta.reduce((sum, x, j) => sum + x * unit[j], 0);
|
|
482
|
+
if (along <= epsilon || along >= length32 - epsilon) continue;
|
|
483
|
+
const distance2 = Math.hypot(...delta.map((x, j) => x - along * unit[j]));
|
|
484
|
+
if (distance2 <= snapTolerance) splits.push({ index, t: along / length32 });
|
|
485
|
+
}
|
|
486
|
+
if (splits.length)
|
|
487
|
+
subdivisions.set(
|
|
488
|
+
edgeKey(a, b),
|
|
489
|
+
splits.sort((x, y) => x.t - y.t).map(({ index }) => index)
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
for (const triangle of triangles) {
|
|
493
|
+
const boundary = triangle.flatMap((a, i) => {
|
|
494
|
+
const b = triangle[(i + 1) % 3], splits = subdivisions.get(edgeKey(a, b));
|
|
495
|
+
if (!splits) return [a];
|
|
496
|
+
const edge = edges.get(edgeKey(a, b));
|
|
497
|
+
return [a, ...edge.a === a ? splits : [...splits].reverse()];
|
|
498
|
+
});
|
|
499
|
+
if (boundary.length === 3) {
|
|
500
|
+
indices.push(...triangle);
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
const origin = point(boundary[0]);
|
|
504
|
+
const center = origin.map(
|
|
505
|
+
(value, axis) => value + boundary.reduce(
|
|
506
|
+
(sum, index) => sum + (point(index)[axis] - value) / boundary.length,
|
|
507
|
+
0
|
|
508
|
+
)
|
|
509
|
+
);
|
|
510
|
+
const middle = vertex(center);
|
|
511
|
+
for (let i = 0; i < boundary.length; i++) {
|
|
512
|
+
const part = [
|
|
513
|
+
middle,
|
|
514
|
+
boundary[i],
|
|
515
|
+
boundary[(i + 1) % boundary.length]
|
|
516
|
+
];
|
|
517
|
+
if (area(part) <= epsilon * epsilon)
|
|
518
|
+
throw new Error("Unable to preserve a degenerate mesh boundary");
|
|
519
|
+
indices.push(...part);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
const compactPositions = [], compactIndices = [], remap = /* @__PURE__ */ new Map();
|
|
523
|
+
for (const original of indices) {
|
|
524
|
+
let index = remap.get(original);
|
|
525
|
+
if (index === void 0) {
|
|
526
|
+
index = compactPositions.length / 3;
|
|
527
|
+
compactPositions.push(...point(original));
|
|
528
|
+
remap.set(original, index);
|
|
529
|
+
}
|
|
530
|
+
compactIndices.push(index);
|
|
531
|
+
}
|
|
532
|
+
if (!compactIndices.length)
|
|
533
|
+
throw new Error("Expected finite nonempty geometry");
|
|
534
|
+
return { positions: compactPositions, indices: compactIndices };
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
// node_modules/@tscircuit/jscad/lib/index.ts
|
|
538
|
+
var jscad3 = withReferences();
|
|
539
|
+
var {
|
|
540
|
+
booleans,
|
|
541
|
+
colors,
|
|
542
|
+
curves,
|
|
543
|
+
expansions,
|
|
544
|
+
extrusions,
|
|
545
|
+
geometries,
|
|
546
|
+
hulls,
|
|
547
|
+
maths,
|
|
548
|
+
measurements,
|
|
549
|
+
modifiers,
|
|
550
|
+
primitives,
|
|
551
|
+
text,
|
|
552
|
+
transforms,
|
|
553
|
+
utils,
|
|
554
|
+
references
|
|
555
|
+
} = jscad3;
|
|
556
|
+
|
|
59
557
|
// lib/A0201.tsx
|
|
60
558
|
import { Cuboid as Cuboid2 } from "jscad-fiber";
|
|
61
559
|
import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -748,7 +1246,7 @@ var Crystal = ({
|
|
|
748
1246
|
] });
|
|
749
1247
|
};
|
|
750
1248
|
|
|
751
|
-
// .model-contracts/generations/
|
|
1249
|
+
// .model-contracts/generations/ad649bc7a403a3e6e9b12ce32ac0b3d0fa61c6bf-v2/node_modules/zod/v3/external.js
|
|
752
1250
|
var external_exports = {};
|
|
753
1251
|
__export(external_exports, {
|
|
754
1252
|
BRAND: () => BRAND,
|
|
@@ -860,7 +1358,7 @@ __export(external_exports, {
|
|
|
860
1358
|
void: () => voidType
|
|
861
1359
|
});
|
|
862
1360
|
|
|
863
|
-
// .model-contracts/generations/
|
|
1361
|
+
// .model-contracts/generations/ad649bc7a403a3e6e9b12ce32ac0b3d0fa61c6bf-v2/node_modules/zod/v3/helpers/util.js
|
|
864
1362
|
var util;
|
|
865
1363
|
(function(util2) {
|
|
866
1364
|
util2.assertEqual = (_) => {
|
|
@@ -994,7 +1492,7 @@ var getParsedType = (data) => {
|
|
|
994
1492
|
}
|
|
995
1493
|
};
|
|
996
1494
|
|
|
997
|
-
// .model-contracts/generations/
|
|
1495
|
+
// .model-contracts/generations/ad649bc7a403a3e6e9b12ce32ac0b3d0fa61c6bf-v2/node_modules/zod/v3/ZodError.js
|
|
998
1496
|
var ZodIssueCode = util.arrayToEnum([
|
|
999
1497
|
"invalid_type",
|
|
1000
1498
|
"invalid_literal",
|
|
@@ -1112,7 +1610,7 @@ ZodError.create = (issues) => {
|
|
|
1112
1610
|
return error;
|
|
1113
1611
|
};
|
|
1114
1612
|
|
|
1115
|
-
// .model-contracts/generations/
|
|
1613
|
+
// .model-contracts/generations/ad649bc7a403a3e6e9b12ce32ac0b3d0fa61c6bf-v2/node_modules/zod/v3/locales/en.js
|
|
1116
1614
|
var errorMap = (issue, _ctx) => {
|
|
1117
1615
|
let message;
|
|
1118
1616
|
switch (issue.code) {
|
|
@@ -1215,7 +1713,7 @@ var errorMap = (issue, _ctx) => {
|
|
|
1215
1713
|
};
|
|
1216
1714
|
var en_default = errorMap;
|
|
1217
1715
|
|
|
1218
|
-
// .model-contracts/generations/
|
|
1716
|
+
// .model-contracts/generations/ad649bc7a403a3e6e9b12ce32ac0b3d0fa61c6bf-v2/node_modules/zod/v3/errors.js
|
|
1219
1717
|
var overrideErrorMap = en_default;
|
|
1220
1718
|
function setErrorMap(map) {
|
|
1221
1719
|
overrideErrorMap = map;
|
|
@@ -1224,7 +1722,7 @@ function getErrorMap() {
|
|
|
1224
1722
|
return overrideErrorMap;
|
|
1225
1723
|
}
|
|
1226
1724
|
|
|
1227
|
-
// .model-contracts/generations/
|
|
1725
|
+
// .model-contracts/generations/ad649bc7a403a3e6e9b12ce32ac0b3d0fa61c6bf-v2/node_modules/zod/v3/helpers/parseUtil.js
|
|
1228
1726
|
var makeIssue = (params) => {
|
|
1229
1727
|
const { data, path, errorMaps, issueData } = params;
|
|
1230
1728
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -1334,14 +1832,14 @@ var isDirty = (x) => x.status === "dirty";
|
|
|
1334
1832
|
var isValid = (x) => x.status === "valid";
|
|
1335
1833
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
1336
1834
|
|
|
1337
|
-
// .model-contracts/generations/
|
|
1835
|
+
// .model-contracts/generations/ad649bc7a403a3e6e9b12ce32ac0b3d0fa61c6bf-v2/node_modules/zod/v3/helpers/errorUtil.js
|
|
1338
1836
|
var errorUtil;
|
|
1339
1837
|
(function(errorUtil2) {
|
|
1340
1838
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
1341
1839
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
1342
1840
|
})(errorUtil || (errorUtil = {}));
|
|
1343
1841
|
|
|
1344
|
-
// .model-contracts/generations/
|
|
1842
|
+
// .model-contracts/generations/ad649bc7a403a3e6e9b12ce32ac0b3d0fa61c6bf-v2/node_modules/zod/v3/types.js
|
|
1345
1843
|
var ParseInputLazyPath = class {
|
|
1346
1844
|
constructor(parent, value, path, key) {
|
|
1347
1845
|
this._cachedPath = [];
|
|
@@ -4789,7 +5287,7 @@ var coerce = {
|
|
|
4789
5287
|
};
|
|
4790
5288
|
var NEVER = INVALID;
|
|
4791
5289
|
|
|
4792
|
-
// .model-contracts/generations/
|
|
5290
|
+
// .model-contracts/generations/ad649bc7a403a3e6e9b12ce32ac0b3d0fa61c6bf-v2/node_modules/@tscircuit/mm/dist/index.js
|
|
4793
5291
|
var unitToMm = {
|
|
4794
5292
|
in: 25.4,
|
|
4795
5293
|
inch: 25.4,
|
|
@@ -4816,7 +5314,7 @@ var mm = (n) => {
|
|
|
4816
5314
|
throw new Error(`Unsupported unit: ${unit}`);
|
|
4817
5315
|
};
|
|
4818
5316
|
|
|
4819
|
-
// .model-contracts/generations/
|
|
5317
|
+
// .model-contracts/generations/ad649bc7a403a3e6e9b12ce32ac0b3d0fa61c6bf-v2/index.js
|
|
4820
5318
|
function normalizeNemaMotorModelString(value) {
|
|
4821
5319
|
if (!/^nema(?:8|17|23|34)(?:_|$)/i.test(value)) return value;
|
|
4822
5320
|
return value.replace(/(^|_)jst([0-9]+)_(ph|sh)(?=_|$)/gi, "$1jst$3$2").replace(/(^|_)jst[_-](ph|sh)[_-]([0-9]+)(?=_|$)/gi, "$1jst$2$3").replace(/(^|_)none(?=_|$)/gi, "$1nowires").replace(/(^|_)stubs(?=_|$)/gi, "$1wirestubs");
|
|
@@ -5371,6 +5869,76 @@ var jstMotorWireConnectionSchema = external_exports.string().refine((value) => {
|
|
|
5371
5869
|
const connector = getJstMotorConnector(value);
|
|
5372
5870
|
return connector !== void 0 && connector.pinCount >= 2 && connector.pinCount <= connector.maxPinCount;
|
|
5373
5871
|
}, "Expected jst-ph-N (2\u201316 pins) or jst-sh-N (2\u201315 pins)");
|
|
5872
|
+
function isInsideNemaFace(x, y, p) {
|
|
5873
|
+
const h = p.width / 2;
|
|
5874
|
+
x = Math.abs(x);
|
|
5875
|
+
y = Math.abs(y);
|
|
5876
|
+
if (x > h || y > h) return false;
|
|
5877
|
+
const chamfer = p.chamfer;
|
|
5878
|
+
if (!p.stepped) return x + y <= 2 * h - chamfer;
|
|
5879
|
+
const c = chamfer / Math.SQRT2;
|
|
5880
|
+
if (c === 0) return true;
|
|
5881
|
+
const recess = p.recessRadius;
|
|
5882
|
+
const fillet = p.filletRadius;
|
|
5883
|
+
const k = h - c + recess;
|
|
5884
|
+
if (x > h - c && y > h - c)
|
|
5885
|
+
return x <= k && y <= k && Math.hypot(x - k, y - k) >= recess;
|
|
5886
|
+
if (y > h - fillet && x > h - c - fillet)
|
|
5887
|
+
return Math.hypot(x - (h - c - fillet), y - (h - fillet)) <= fillet;
|
|
5888
|
+
if (x > h - fillet && y > h - c - fillet)
|
|
5889
|
+
return Math.hypot(x - (h - fillet), y - (h - c - fillet)) <= fillet;
|
|
5890
|
+
return true;
|
|
5891
|
+
}
|
|
5892
|
+
var segmentDistance = (x, y, ax, ay, bx, by) => {
|
|
5893
|
+
const dx = bx - ax;
|
|
5894
|
+
const dy = by - ay;
|
|
5895
|
+
const t = Math.max(
|
|
5896
|
+
0,
|
|
5897
|
+
Math.min(1, ((x - ax) * dx + (y - ay) * dy) / (dx * dx + dy * dy || 1))
|
|
5898
|
+
);
|
|
5899
|
+
return Math.hypot(x - ax - t * dx, y - ay - t * dy);
|
|
5900
|
+
};
|
|
5901
|
+
var arcDistance = (x, y, cx, cy, r, start, end) => {
|
|
5902
|
+
const angle = (Math.atan2(y - cy, x - cx) + 2 * Math.PI) % (2 * Math.PI);
|
|
5903
|
+
if (angle >= start && angle <= end)
|
|
5904
|
+
return Math.abs(Math.hypot(x - cx, y - cy) - r);
|
|
5905
|
+
return Math.min(
|
|
5906
|
+
Math.hypot(x - cx - r * Math.cos(start), y - cy - r * Math.sin(start)),
|
|
5907
|
+
Math.hypot(x - cx - r * Math.cos(end), y - cy - r * Math.sin(end))
|
|
5908
|
+
);
|
|
5909
|
+
};
|
|
5910
|
+
var boundaryDistance = (x, y, p) => {
|
|
5911
|
+
const h = p.width / 2;
|
|
5912
|
+
x = Math.abs(x);
|
|
5913
|
+
y = Math.abs(y);
|
|
5914
|
+
const chamfer = p.chamfer;
|
|
5915
|
+
if (!p.stepped || chamfer === 0)
|
|
5916
|
+
return Math.min(
|
|
5917
|
+
Math.abs(h - x),
|
|
5918
|
+
Math.abs(h - y),
|
|
5919
|
+
Math.abs(2 * h - chamfer - x - y) / Math.SQRT2
|
|
5920
|
+
);
|
|
5921
|
+
const c = chamfer / Math.SQRT2;
|
|
5922
|
+
const recess = p.recessRadius;
|
|
5923
|
+
const fillet = p.filletRadius;
|
|
5924
|
+
const a = h - c - fillet;
|
|
5925
|
+
const k = h - c + recess;
|
|
5926
|
+
return Math.min(
|
|
5927
|
+
segmentDistance(x, y, -a, h, a, h),
|
|
5928
|
+
segmentDistance(x, y, h, -a, h, a),
|
|
5929
|
+
segmentDistance(x, y, h - c, h - fillet, h - c, k),
|
|
5930
|
+
segmentDistance(x, y, k, h - c, h - fillet, h - c),
|
|
5931
|
+
arcDistance(x, y, a, h - fillet, fillet, 0, Math.PI / 2),
|
|
5932
|
+
arcDistance(x, y, k, k, recess, Math.PI, 3 * Math.PI / 2),
|
|
5933
|
+
arcDistance(x, y, h - fillet, a, fillet, 0, Math.PI / 2)
|
|
5934
|
+
);
|
|
5935
|
+
};
|
|
5936
|
+
function fitsNemaCircle(x, y, radius, p) {
|
|
5937
|
+
return isInsideNemaFace(x, y, p) && boundaryDistance(x, y, p) > radius;
|
|
5938
|
+
}
|
|
5939
|
+
function clearsNemaCircle(x, y, radius, p) {
|
|
5940
|
+
return !isInsideNemaFace(x, y, p) && boundaryDistance(x, y, p) > radius;
|
|
5941
|
+
}
|
|
5374
5942
|
var hexSocketBoltDimensions = {
|
|
5375
5943
|
M2: {
|
|
5376
5944
|
diameter: 2,
|
|
@@ -5521,7 +6089,15 @@ var nemaMotorDimensions = {
|
|
|
5521
6089
|
bodyCornerChamfer: 6
|
|
5522
6090
|
},
|
|
5523
6091
|
23: {
|
|
5524
|
-
|
|
6092
|
+
// Representative side-tab rear pattern from STEPPERONLINE's ST-M10 adapter.
|
|
6093
|
+
// The adapter's R5/R2.5 profile is a visual reference, not a frame guarantee:
|
|
6094
|
+
// https://www.omc-stepperonline.com/image/catalog/dimensions/ST-M10_Dimension.svg
|
|
6095
|
+
backFaceHoleSpacing: 50,
|
|
6096
|
+
backFaceHoleSpacingY: 32,
|
|
6097
|
+
rearCornerChamfer: 9 * Math.SQRT2,
|
|
6098
|
+
rearCornerRecessRadius: 5,
|
|
6099
|
+
rearCornerFilletRadius: 2.5,
|
|
6100
|
+
backFaceScrewSize: "M3",
|
|
5525
6101
|
backFaceHoleDepth: 4.5,
|
|
5526
6102
|
bodyWidth: 56.4,
|
|
5527
6103
|
bodyLength: 51,
|
|
@@ -5541,7 +6117,10 @@ var nemaMotorDimensions = {
|
|
|
5541
6117
|
frontCapLength: 5,
|
|
5542
6118
|
rearCapLength: 5,
|
|
5543
6119
|
faceCornerChamfer: 2,
|
|
5544
|
-
bodyCornerChamfer:
|
|
6120
|
+
bodyCornerChamfer: 9 * Math.SQRT2,
|
|
6121
|
+
bodyCornerRecessRadius: 5,
|
|
6122
|
+
bodyCornerFilletRadius: 2.5,
|
|
6123
|
+
chamferedBodyCornerChamfer: 15
|
|
5545
6124
|
},
|
|
5546
6125
|
34: {
|
|
5547
6126
|
// Illustrative rear details; independent of the mounting flange.
|
|
@@ -5577,6 +6156,9 @@ var shape3 = {
|
|
|
5577
6156
|
backFaceHoles: external_exports.boolean().optional(),
|
|
5578
6157
|
backFaceScrews: external_exports.boolean().optional(),
|
|
5579
6158
|
backFaceHoleSpacing: positiveModelLengthSchema.optional(),
|
|
6159
|
+
/** Axis overrides; the legacy scalar still sets a square pattern when supplied. */
|
|
6160
|
+
backFaceHoleSpacingX: positiveModelLengthSchema.optional(),
|
|
6161
|
+
backFaceHoleSpacingY: positiveModelLengthSchema.optional(),
|
|
5580
6162
|
backFaceHoleDiameter: positiveModelLengthSchema.optional(),
|
|
5581
6163
|
backFaceHoleDepth: positiveModelLengthSchema.optional(),
|
|
5582
6164
|
backFaceScrewSize: metricBoltSizeSchema.optional(),
|
|
@@ -5613,8 +6195,14 @@ var shape3 = {
|
|
|
5613
6195
|
rearCapLength: positiveModelLengthSchema.optional(),
|
|
5614
6196
|
faceCornerChamfer: nonnegativeModelLengthSchema.optional(),
|
|
5615
6197
|
bodyCornerChamfer: nonnegativeModelLengthSchema.optional(),
|
|
6198
|
+
bodyCornerRecessRadius: nonnegativeModelLengthSchema.optional(),
|
|
6199
|
+
bodyCornerFilletRadius: nonnegativeModelLengthSchema.optional(),
|
|
5616
6200
|
/** Rear outline is independent of the front mounting flange. */
|
|
5617
6201
|
rearCornerChamfer: nonnegativeModelLengthSchema.optional(),
|
|
6202
|
+
rearCornerRecessRadius: nonnegativeModelLengthSchema.optional(),
|
|
6203
|
+
rearCornerFilletRadius: nonnegativeModelLengthSchema.optional(),
|
|
6204
|
+
rearChamfered: external_exports.boolean().optional(),
|
|
6205
|
+
rearStepped: external_exports.boolean().optional(),
|
|
5618
6206
|
chamfered: external_exports.boolean().optional(),
|
|
5619
6207
|
stepped: external_exports.boolean().optional()
|
|
5620
6208
|
};
|
|
@@ -5639,7 +6227,11 @@ var resolve = (p, ctx) => {
|
|
|
5639
6227
|
);
|
|
5640
6228
|
const corner = select(
|
|
5641
6229
|
["chamfered", "stepped"],
|
|
5642
|
-
p.nemaSize === 34 ? "stepped" : "chamfered"
|
|
6230
|
+
p.nemaSize === 23 || p.nemaSize === 34 ? "stepped" : "chamfered"
|
|
6231
|
+
);
|
|
6232
|
+
const rearCorner = select(
|
|
6233
|
+
["rearChamfered", "rearStepped"],
|
|
6234
|
+
p.chamfered === true ? "rearChamfered" : p.nemaSize === 23 || corner === "stepped" ? "rearStepped" : "rearChamfered"
|
|
5643
6235
|
);
|
|
5644
6236
|
const wireSpecified = p.noWires !== void 0 || p.wireStubs !== void 0 || p.wireConnection !== void 0;
|
|
5645
6237
|
const wireSelections = Number(p.noWires === true) + Number(p.wireStubs === true) + Number(p.wireConnection !== void 0);
|
|
@@ -5649,8 +6241,13 @@ var resolve = (p, ctx) => {
|
|
|
5649
6241
|
message: "Select exactly one of noWires, wireStubs or a JST wireConnection"
|
|
5650
6242
|
});
|
|
5651
6243
|
const d = nemaMotorDimensions[p.nemaSize];
|
|
6244
|
+
const bodyCornerChamfer = p.bodyCornerChamfer ?? (corner === "chamfered" && "chamferedBodyCornerChamfer" in d ? d.chamferedBodyCornerChamfer : d.bodyCornerChamfer);
|
|
6245
|
+
const defaultBodyRadius = Math.min(4, bodyCornerChamfer / Math.SQRT2 / 4);
|
|
5652
6246
|
const backFaceScrewSize = p.backFaceScrewSize ?? d.backFaceScrewSize;
|
|
5653
6247
|
const screw = hexSocketBoltDimensions[backFaceScrewSize];
|
|
6248
|
+
const backFaceHoleSpacing = p.backFaceHoleSpacing ?? ("backFaceHoleSpacing" in d ? d.backFaceHoleSpacing : p.mountingHoleSpacing ?? d.mountingHoleSpacing);
|
|
6249
|
+
const rearCornerChamfer = p.rearCornerChamfer ?? (p.nemaSize === 23 && rearCorner === "rearChamfered" ? p.faceCornerChamfer ?? d.faceCornerChamfer : "rearCornerChamfer" in d ? d.rearCornerChamfer : back === "backFacePlain" && (p.mountingHoleThrough ?? d.mountingHoleThrough) ? p.bodyCornerChamfer ?? d.bodyCornerChamfer : p.faceCornerChamfer ?? d.faceCornerChamfer);
|
|
6250
|
+
const defaultRearRadius = Math.min(4, rearCornerChamfer / Math.SQRT2 / 4);
|
|
5654
6251
|
return {
|
|
5655
6252
|
nemaSize: p.nemaSize,
|
|
5656
6253
|
noWires: p.noWires === true,
|
|
@@ -5663,7 +6260,9 @@ var resolve = (p, ctx) => {
|
|
|
5663
6260
|
backFacePlain: back === "backFacePlain",
|
|
5664
6261
|
backFaceHoles: back === "backFaceHoles",
|
|
5665
6262
|
backFaceScrews: back === "backFaceScrews",
|
|
5666
|
-
backFaceHoleSpacing
|
|
6263
|
+
backFaceHoleSpacing,
|
|
6264
|
+
backFaceHoleSpacingX: p.backFaceHoleSpacingX ?? backFaceHoleSpacing,
|
|
6265
|
+
backFaceHoleSpacingY: p.backFaceHoleSpacingY ?? p.backFaceHoleSpacing ?? ("backFaceHoleSpacingY" in d ? d.backFaceHoleSpacingY : backFaceHoleSpacing),
|
|
5667
6266
|
backFaceHoleDiameter: p.backFaceHoleDiameter ?? screw.diameter,
|
|
5668
6267
|
backFaceHoleDepth: p.backFaceHoleDepth ?? d.backFaceHoleDepth,
|
|
5669
6268
|
backFaceScrewSize,
|
|
@@ -5685,24 +6284,43 @@ var resolve = (p, ctx) => {
|
|
|
5685
6284
|
frontCapLength: p.frontCapLength ?? d.frontCapLength,
|
|
5686
6285
|
rearCapLength: p.rearCapLength ?? d.rearCapLength,
|
|
5687
6286
|
faceCornerChamfer: p.faceCornerChamfer ?? d.faceCornerChamfer,
|
|
5688
|
-
bodyCornerChamfer
|
|
6287
|
+
bodyCornerChamfer,
|
|
6288
|
+
bodyCornerRecessRadius: p.bodyCornerRecessRadius ?? ("bodyCornerRecessRadius" in d ? d.bodyCornerRecessRadius : defaultBodyRadius),
|
|
6289
|
+
bodyCornerFilletRadius: p.bodyCornerFilletRadius ?? ("bodyCornerFilletRadius" in d ? d.bodyCornerFilletRadius : defaultBodyRadius),
|
|
5689
6290
|
chamfered: corner === "chamfered",
|
|
5690
6291
|
stepped: corner === "stepped",
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
6292
|
+
rearCornerChamfer,
|
|
6293
|
+
rearStepped: rearCorner === "rearStepped",
|
|
6294
|
+
rearChamfered: rearCorner === "rearChamfered",
|
|
6295
|
+
rearCornerRecessRadius: p.rearCornerRecessRadius ?? ("rearCornerRecessRadius" in d ? d.rearCornerRecessRadius : defaultRearRadius),
|
|
6296
|
+
rearCornerFilletRadius: p.rearCornerFilletRadius ?? ("rearCornerFilletRadius" in d ? d.rearCornerFilletRadius : defaultRearRadius)
|
|
5694
6297
|
};
|
|
5695
6298
|
};
|
|
5696
6299
|
var validate3 = (p, ctx) => {
|
|
5697
6300
|
const issue = (message) => ctx.addIssue({ code: "custom", message });
|
|
6301
|
+
if (p.stepped && p.bodyCornerRecessRadius + p.bodyCornerFilletRadius > p.bodyCornerChamfer / Math.SQRT2)
|
|
6302
|
+
issue("Body recess and fillet radii must fit within the corner shoulder");
|
|
5698
6303
|
const rearChamfer = p.rearCornerChamfer ?? (p.backFacePlain && p.mountingHoleThrough ? p.bodyCornerChamfer : p.faceCornerChamfer);
|
|
5699
|
-
const rearEdge = p.
|
|
6304
|
+
const rearEdge = p.rearStepped ? rearChamfer / Math.SQRT2 : rearChamfer;
|
|
6305
|
+
if (p.rearStepped && p.rearCornerRecessRadius + p.rearCornerFilletRadius > rearEdge)
|
|
6306
|
+
issue("Rear recess and fillet radii must fit within the corner shoulder");
|
|
5700
6307
|
if (!p.backFacePlain) {
|
|
5701
6308
|
const screw = hexSocketBoltDimensions[p.backFaceScrewSize];
|
|
5702
6309
|
const radius = (p.backFaceScrews ? Math.max(p.backFaceHoleDiameter, screw.headDiameter) : p.backFaceHoleDiameter) / 2;
|
|
5703
|
-
if (p.
|
|
6310
|
+
if (p.backFaceHoleSpacingX <= 2 * radius || p.backFaceHoleSpacingY <= 2 * radius)
|
|
5704
6311
|
issue("Rear holes and screw heads must not overlap each other");
|
|
5705
|
-
if (
|
|
6312
|
+
if (!fitsNemaCircle(
|
|
6313
|
+
p.backFaceHoleSpacingX / 2,
|
|
6314
|
+
p.backFaceHoleSpacingY / 2,
|
|
6315
|
+
radius,
|
|
6316
|
+
{
|
|
6317
|
+
width: p.bodyWidth,
|
|
6318
|
+
chamfer: p.rearCornerChamfer,
|
|
6319
|
+
stepped: p.rearStepped,
|
|
6320
|
+
recessRadius: p.rearCornerRecessRadius,
|
|
6321
|
+
filletRadius: p.rearCornerFilletRadius
|
|
6322
|
+
}
|
|
6323
|
+
))
|
|
5706
6324
|
issue("Rear holes and screw heads must fit entirely inside the rear face");
|
|
5707
6325
|
if (p.backFaceHoleDepth >= p.rearCapLength)
|
|
5708
6326
|
issue("Rear hole depth must be less than the rear cap length");
|
|
@@ -5733,7 +6351,13 @@ var validate3 = (p, ctx) => {
|
|
|
5733
6351
|
issue("Mounting holes must clear the pilot");
|
|
5734
6352
|
if (!p.mountingHoleThrough && p.mountingHoleDepth >= p.frontCapLength)
|
|
5735
6353
|
issue("Blind mounting hole depth must be less than the front cap length");
|
|
5736
|
-
if (p.mountingHoleThrough && (p.
|
|
6354
|
+
if (p.mountingHoleThrough && !clearsNemaCircle(p.mountingHoleSpacing / 2, p.mountingHoleSpacing / 2, r, {
|
|
6355
|
+
width: p.bodyWidth,
|
|
6356
|
+
chamfer: p.bodyCornerChamfer,
|
|
6357
|
+
stepped: p.stepped,
|
|
6358
|
+
recessRadius: p.bodyCornerRecessRadius,
|
|
6359
|
+
filletRadius: p.bodyCornerFilletRadius
|
|
6360
|
+
}))
|
|
5737
6361
|
issue("Body must clear through front mounting holes");
|
|
5738
6362
|
if (p.shaftLength <= p.pilotLength)
|
|
5739
6363
|
issue("Shaft tip must extend beyond the pilot");
|
|
@@ -5752,6 +6376,8 @@ var lengths2 = {
|
|
|
5752
6376
|
bodylength: "bodyLength",
|
|
5753
6377
|
bodywidth: "bodyWidth",
|
|
5754
6378
|
backholespacing: "backFaceHoleSpacing",
|
|
6379
|
+
backholespacingx: "backFaceHoleSpacingX",
|
|
6380
|
+
backholespacingy: "backFaceHoleSpacingY",
|
|
5755
6381
|
backholediameter: "backFaceHoleDiameter",
|
|
5756
6382
|
backholedepth: "backFaceHoleDepth",
|
|
5757
6383
|
shaftlength: "shaftLength",
|
|
@@ -5767,7 +6393,11 @@ var lengths2 = {
|
|
|
5767
6393
|
rearcap: "rearCapLength",
|
|
5768
6394
|
facechamfer: "faceCornerChamfer",
|
|
5769
6395
|
bodychamfer: "bodyCornerChamfer",
|
|
5770
|
-
|
|
6396
|
+
bodyrecess: "bodyCornerRecessRadius",
|
|
6397
|
+
bodyfillet: "bodyCornerFilletRadius",
|
|
6398
|
+
rearchamfer: "rearCornerChamfer",
|
|
6399
|
+
rearrecess: "rearCornerRecessRadius",
|
|
6400
|
+
rearfillet: "rearCornerFilletRadius"
|
|
5771
6401
|
};
|
|
5772
6402
|
var flags = {
|
|
5773
6403
|
backfaceplain: "backFacePlain",
|
|
@@ -5779,6 +6409,8 @@ var flags = {
|
|
|
5779
6409
|
dshaft: "dShaft",
|
|
5780
6410
|
chamfered: "chamfered",
|
|
5781
6411
|
stepped: "stepped",
|
|
6412
|
+
rearstepped: "rearStepped",
|
|
6413
|
+
rearchamfered: "rearChamfered",
|
|
5782
6414
|
nowires: "noWires",
|
|
5783
6415
|
wirestubs: "wireStubs"
|
|
5784
6416
|
};
|
|
@@ -12768,24 +13400,24 @@ function getNemaMotorReferencePoints(input) {
|
|
|
12768
13400
|
p.bodyWidth / 2 / Math.max(Math.abs(x), Math.abs(y)),
|
|
12769
13401
|
(p.bodyWidth - p.faceCornerChamfer) / (Math.abs(x) + Math.abs(y))
|
|
12770
13402
|
);
|
|
12771
|
-
if (p.nemaSize
|
|
12772
|
-
const
|
|
12773
|
-
|
|
12774
|
-
|
|
12775
|
-
|
|
12776
|
-
|
|
12777
|
-
|
|
12778
|
-
|
|
12779
|
-
|
|
12780
|
-
|
|
12781
|
-
|
|
12782
|
-
|
|
12783
|
-
|
|
13403
|
+
if (p.nemaSize !== 34 || p.stepped) {
|
|
13404
|
+
const profile5 = p.nemaSize === 34 ? {
|
|
13405
|
+
width: p.bodyWidth,
|
|
13406
|
+
chamfer: p.bodyCornerChamfer,
|
|
13407
|
+
stepped: p.stepped,
|
|
13408
|
+
recessRadius: p.bodyCornerRecessRadius,
|
|
13409
|
+
filletRadius: p.bodyCornerFilletRadius
|
|
13410
|
+
} : {
|
|
13411
|
+
width: p.bodyWidth,
|
|
13412
|
+
chamfer: p.rearCornerChamfer,
|
|
13413
|
+
stepped: p.rearStepped,
|
|
13414
|
+
recessRadius: p.rearCornerRecessRadius,
|
|
13415
|
+
filletRadius: p.rearCornerFilletRadius
|
|
12784
13416
|
};
|
|
12785
13417
|
let low = 0, high = p.bodyWidth;
|
|
12786
13418
|
for (let i = 0; i < 50; i++) {
|
|
12787
13419
|
const mid = (low + high) / 2;
|
|
12788
|
-
if (
|
|
13420
|
+
if (isInsideNemaFace(mid * x, mid * y, profile5)) low = mid;
|
|
12789
13421
|
else high = mid;
|
|
12790
13422
|
}
|
|
12791
13423
|
radius = low;
|
|
@@ -13151,11 +13783,11 @@ var ModelRendererRegistry = class {
|
|
|
13151
13783
|
import { Colorize as Colorize7, Custom } from "jscad-fiber";
|
|
13152
13784
|
|
|
13153
13785
|
// lib/models/anglebar/geometry.ts
|
|
13154
|
-
import
|
|
13155
|
-
var { primitives, extrusions, geometries, modifiers, measurements } =
|
|
13156
|
-
var generalize =
|
|
13157
|
-
var { rectangle, roundedRectangle, polygon } =
|
|
13158
|
-
var profile = (shape49, height10) =>
|
|
13786
|
+
import jscad4 from "@jscad/modeling";
|
|
13787
|
+
var { primitives: primitives2, extrusions: extrusions2, geometries: geometries2, modifiers: modifiers2, measurements: measurements2 } = jscad4;
|
|
13788
|
+
var generalize = modifiers2.generalize;
|
|
13789
|
+
var { rectangle, roundedRectangle, polygon } = primitives2;
|
|
13790
|
+
var profile = (shape49, height10) => extrusions2.extrudeLinear({ height: height10 }, shape49);
|
|
13159
13791
|
function filletProfile(points, radii, width10, height10) {
|
|
13160
13792
|
const outline = [];
|
|
13161
13793
|
for (let i = 0; i < points.length; i++) {
|
|
@@ -13214,7 +13846,7 @@ function createAngleBarMesh(input) {
|
|
|
13214
13846
|
{ snap: true, triangulate: true },
|
|
13215
13847
|
createAngleBarGeom(input)
|
|
13216
13848
|
);
|
|
13217
|
-
const epsilon = Math.max(...
|
|
13849
|
+
const epsilon = Math.max(...measurements2.measureDimensions(geom)) * 1e-10;
|
|
13218
13850
|
const positions = [];
|
|
13219
13851
|
const indices = [];
|
|
13220
13852
|
const lookup = /* @__PURE__ */ new Map();
|
|
@@ -13228,7 +13860,7 @@ function createAngleBarMesh(input) {
|
|
|
13228
13860
|
}
|
|
13229
13861
|
return index;
|
|
13230
13862
|
};
|
|
13231
|
-
for (const poly of
|
|
13863
|
+
for (const poly of geometries2.geom3.toPolygons(geom)) {
|
|
13232
13864
|
for (let i = 1; i < poly.vertices.length - 1; i++) {
|
|
13233
13865
|
const a = poly.vertices[0], b = poly.vertices[i], c = poly.vertices[i + 1];
|
|
13234
13866
|
const u = b.map((x, j) => x - a[j]), v = c.map((x, j) => x - a[j]);
|
|
@@ -13266,7 +13898,7 @@ function register55(registry2) {
|
|
|
13266
13898
|
import { Colorize as Colorize8, Custom as Custom2 } from "jscad-fiber";
|
|
13267
13899
|
|
|
13268
13900
|
// lib/mechanical/indexedMeshToGeom3.ts
|
|
13269
|
-
import
|
|
13901
|
+
import jscad5 from "@jscad/modeling";
|
|
13270
13902
|
function indexedMeshToGeom3(mesh) {
|
|
13271
13903
|
const polygons = [];
|
|
13272
13904
|
for (let i = 0; i < mesh.indices.length; i += 3)
|
|
@@ -13277,7 +13909,7 @@ function indexedMeshToGeom3(mesh) {
|
|
|
13277
13909
|
mesh.positions[index * 3 + 2]
|
|
13278
13910
|
])
|
|
13279
13911
|
);
|
|
13280
|
-
return
|
|
13912
|
+
return jscad5.geometries.geom3.fromPoints(polygons);
|
|
13281
13913
|
}
|
|
13282
13914
|
|
|
13283
13915
|
// lib/models/ballbearing/mesh.ts
|
|
@@ -13406,11 +14038,11 @@ function createBallBearingMesh(input = {}, options = {}) {
|
|
|
13406
14038
|
[ri + 0.15 * (ro - ri), 0.5 * t],
|
|
13407
14039
|
[ro - 0.15 * (ro - ri), 0.5 * t]
|
|
13408
14040
|
];
|
|
13409
|
-
const
|
|
14041
|
+
const profile5 = sign === -1 ? shape49 : shape49.map(([r, z]) => [r, d.width - z]).reverse();
|
|
13410
14042
|
parts.push({
|
|
13411
14043
|
name: `${face2} ${sign < 0 ? "lower" : "upper"}`,
|
|
13412
14044
|
color: face2 === "sealed" ? "#252a30" : "#b5bbc3",
|
|
13413
|
-
mesh: revolve(
|
|
14045
|
+
mesh: revolve(profile5, segments)
|
|
13414
14046
|
});
|
|
13415
14047
|
}
|
|
13416
14048
|
return { ...combine(parts), parts };
|
|
@@ -13427,21 +14059,21 @@ function checkPrecision(lengths25) {
|
|
|
13427
14059
|
"Bearing dimensions exceed the renderer's numerical resolution"
|
|
13428
14060
|
);
|
|
13429
14061
|
}
|
|
13430
|
-
function revolve(
|
|
14062
|
+
function revolve(profile5, segments) {
|
|
13431
14063
|
const positions = [];
|
|
13432
14064
|
const indices = [];
|
|
13433
|
-
for (const [radius, z] of
|
|
14065
|
+
for (const [radius, z] of profile5)
|
|
13434
14066
|
for (let i = 0; i < segments; i++) {
|
|
13435
14067
|
const angle = i * Math.PI * 2 / segments;
|
|
13436
14068
|
const r = typeof radius === "number" ? radius : radius(angle);
|
|
13437
14069
|
positions.push(r * Math.cos(angle), r * Math.sin(angle), z);
|
|
13438
14070
|
}
|
|
13439
|
-
for (let j = 0; j <
|
|
14071
|
+
for (let j = 0; j < profile5.length; j++)
|
|
13440
14072
|
for (let i = 0; i < segments; i++) {
|
|
13441
14073
|
const a = j * segments + i;
|
|
13442
14074
|
const b = j * segments + (i + 1) % segments;
|
|
13443
|
-
const c = (j + 1) %
|
|
13444
|
-
const e = (j + 1) %
|
|
14075
|
+
const c = (j + 1) % profile5.length * segments + (i + 1) % segments;
|
|
14076
|
+
const e = (j + 1) % profile5.length * segments + i;
|
|
13445
14077
|
indices.push(a, b, c, a, c, e);
|
|
13446
14078
|
}
|
|
13447
14079
|
return { positions, indices };
|
|
@@ -13452,7 +14084,7 @@ function annularSector(inner, outer, z0, z1, start, end, segments) {
|
|
|
13452
14084
|
Math.ceil((end - start) / (2 * Math.PI) * segments)
|
|
13453
14085
|
);
|
|
13454
14086
|
const count = steps + 1;
|
|
13455
|
-
const
|
|
14087
|
+
const profile5 = [
|
|
13456
14088
|
[outer, z0],
|
|
13457
14089
|
[outer, z1],
|
|
13458
14090
|
[inner, z1],
|
|
@@ -13460,7 +14092,7 @@ function annularSector(inner, outer, z0, z1, start, end, segments) {
|
|
|
13460
14092
|
];
|
|
13461
14093
|
const positions = [];
|
|
13462
14094
|
const indices = [];
|
|
13463
|
-
for (const [r, z] of
|
|
14095
|
+
for (const [r, z] of profile5)
|
|
13464
14096
|
for (let i = 0; i <= steps; i++) {
|
|
13465
14097
|
const angle = start + (end - start) * i / steps;
|
|
13466
14098
|
positions.push(r * Math.cos(angle), r * Math.sin(angle), z);
|
|
@@ -13656,7 +14288,7 @@ function createBallTransferUnitMesh(input = {}) {
|
|
|
13656
14288
|
);
|
|
13657
14289
|
const segments = 96;
|
|
13658
14290
|
const latitude = 48;
|
|
13659
|
-
const
|
|
14291
|
+
const profile5 = [
|
|
13660
14292
|
[d.bodyRadius, 0],
|
|
13661
14293
|
[d.bodyRadius, d.flangeBottomZ],
|
|
13662
14294
|
[d.flangeRadius, d.flangeBottomZ],
|
|
@@ -13669,12 +14301,12 @@ function createBallTransferUnitMesh(input = {}) {
|
|
|
13669
14301
|
for (let j = 1; j < latitude; j++) {
|
|
13670
14302
|
const angle = j * Math.PI / latitude;
|
|
13671
14303
|
if ((angle - openingAngle) * d.socketRadius > resolution7)
|
|
13672
|
-
|
|
14304
|
+
profile5.push([
|
|
13673
14305
|
d.socketRadius * Math.sin(angle),
|
|
13674
14306
|
d.ballCenterZ + d.socketRadius * Math.cos(angle)
|
|
13675
14307
|
]);
|
|
13676
14308
|
}
|
|
13677
|
-
|
|
14309
|
+
profile5.push([0, d.socketBottomZ], [0, 0]);
|
|
13678
14310
|
const holes = d.mountingHoles.map(
|
|
13679
14311
|
({ x, y, diameter }) => circularProfile(x, y, diameter / 2, segments)
|
|
13680
14312
|
);
|
|
@@ -13682,7 +14314,7 @@ function createBallTransferUnitMesh(input = {}) {
|
|
|
13682
14314
|
const housing = joinProfileMeshes([
|
|
13683
14315
|
// Cap faces are triangulated with all openings, rather than covered by
|
|
13684
14316
|
// annular triangles and repaired afterward with Boolean subtraction.
|
|
13685
|
-
revolve2(
|
|
14317
|
+
revolve2(profile5, segments, /* @__PURE__ */ new Set([1, 3])),
|
|
13686
14318
|
cap(
|
|
13687
14319
|
flangeOutline,
|
|
13688
14320
|
[circularProfile(0, 0, d.bodyRadius, segments), ...holes],
|
|
@@ -13719,10 +14351,10 @@ function createBallTransferUnitMesh(input = {}) {
|
|
|
13719
14351
|
];
|
|
13720
14352
|
return { positions, indices, parts };
|
|
13721
14353
|
}
|
|
13722
|
-
function revolve2(
|
|
14354
|
+
function revolve2(profile5, segments, omittedEdges = /* @__PURE__ */ new Set()) {
|
|
13723
14355
|
const positions = [];
|
|
13724
14356
|
const indices = [];
|
|
13725
|
-
const rings =
|
|
14357
|
+
const rings = profile5.map(([radius, z]) => {
|
|
13726
14358
|
const start = positions.length / 3;
|
|
13727
14359
|
const count = radius === 0 ? 1 : segments;
|
|
13728
14360
|
for (let i = 0; i < count; i++) {
|
|
@@ -14019,11 +14651,11 @@ function register59(registry2) {
|
|
|
14019
14651
|
import { Colorize as Colorize12, Custom as Custom6 } from "jscad-fiber";
|
|
14020
14652
|
|
|
14021
14653
|
// lib/models/channelbar/geometry.ts
|
|
14022
|
-
import
|
|
14023
|
-
var { primitives:
|
|
14024
|
-
var generalize2 =
|
|
14025
|
-
var { rectangle: rectangle2, roundedRectangle: roundedRectangle2, polygon: polygon2 } =
|
|
14026
|
-
var profile2 = (shape49, height10) =>
|
|
14654
|
+
import jscad6 from "@jscad/modeling";
|
|
14655
|
+
var { primitives: primitives3, extrusions: extrusions3, geometries: geometries3, modifiers: modifiers3, measurements: measurements3 } = jscad6;
|
|
14656
|
+
var generalize2 = modifiers3.generalize;
|
|
14657
|
+
var { rectangle: rectangle2, roundedRectangle: roundedRectangle2, polygon: polygon2 } = primitives3;
|
|
14658
|
+
var profile2 = (shape49, height10) => extrusions3.extrudeLinear({ height: height10 }, shape49);
|
|
14027
14659
|
function filletProfile2(points, radii, width10, height10) {
|
|
14028
14660
|
const outline = [];
|
|
14029
14661
|
for (let i = 0; i < points.length; i++) {
|
|
@@ -14093,7 +14725,7 @@ function createChannelBarMesh(input) {
|
|
|
14093
14725
|
{ snap: true, triangulate: true },
|
|
14094
14726
|
createChannelBarGeom(input)
|
|
14095
14727
|
);
|
|
14096
|
-
const epsilon = Math.max(...
|
|
14728
|
+
const epsilon = Math.max(...measurements3.measureDimensions(geom)) * 1e-10;
|
|
14097
14729
|
const positions = [];
|
|
14098
14730
|
const indices = [];
|
|
14099
14731
|
const lookup = /* @__PURE__ */ new Map();
|
|
@@ -14107,7 +14739,7 @@ function createChannelBarMesh(input) {
|
|
|
14107
14739
|
}
|
|
14108
14740
|
return index;
|
|
14109
14741
|
};
|
|
14110
|
-
for (const poly of
|
|
14742
|
+
for (const poly of geometries3.geom3.toPolygons(geom)) {
|
|
14111
14743
|
for (let i = 1; i < poly.vertices.length - 1; i++) {
|
|
14112
14744
|
const a = poly.vertices[0], b = poly.vertices[i], c = poly.vertices[i + 1];
|
|
14113
14745
|
const u = b.map((x, j) => x - a[j]), v = c.map((x, j) => x - a[j]);
|
|
@@ -14145,10 +14777,10 @@ function register60(registry2) {
|
|
|
14145
14777
|
import { Colorize as Colorize13, Custom as Custom7 } from "jscad-fiber";
|
|
14146
14778
|
|
|
14147
14779
|
// lib/models/clampingshaftcollar/mesh.ts
|
|
14148
|
-
import
|
|
14780
|
+
import jscad8 from "@jscad/modeling";
|
|
14149
14781
|
|
|
14150
14782
|
// lib/mechanical/shaft-mount-geometry.ts
|
|
14151
|
-
import
|
|
14783
|
+
import jscad7 from "@jscad/modeling";
|
|
14152
14784
|
var bodySegments = 64;
|
|
14153
14785
|
var threadSegments = 24;
|
|
14154
14786
|
var samplesPerTurn = 12;
|
|
@@ -14191,22 +14823,22 @@ function createAnnularSleeve({
|
|
|
14191
14823
|
[chamfer, boreARadius, true],
|
|
14192
14824
|
[0, boreARadius + chamfer, true]
|
|
14193
14825
|
];
|
|
14194
|
-
const
|
|
14826
|
+
const profile5 = raw.filter(
|
|
14195
14827
|
([z, r], i) => i === 0 || z !== raw[i - 1][0] || r !== raw[i - 1][1]
|
|
14196
14828
|
);
|
|
14197
14829
|
const positions = [];
|
|
14198
14830
|
const indices = [];
|
|
14199
|
-
for (const [z, r, isBore] of
|
|
14831
|
+
for (const [z, r, isBore] of profile5)
|
|
14200
14832
|
for (let i = 0; i < bodySegments; i++) {
|
|
14201
14833
|
const angle = (i + (isBore ? 0.5 : 0)) * Math.PI * 2 / bodySegments;
|
|
14202
14834
|
const radius = isBore ? r / cosine : r;
|
|
14203
14835
|
positions.push(radius * Math.cos(angle), radius * Math.sin(angle), z);
|
|
14204
14836
|
}
|
|
14205
|
-
for (let row = 0; row <
|
|
14837
|
+
for (let row = 0; row < profile5.length; row++)
|
|
14206
14838
|
for (let i = 0; i < bodySegments; i++) {
|
|
14207
14839
|
const next = (i + 1) % bodySegments;
|
|
14208
14840
|
const a = row * bodySegments + i, b = row * bodySegments + next;
|
|
14209
|
-
const c = (row + 1) %
|
|
14841
|
+
const c = (row + 1) % profile5.length * bodySegments + next, d = (row + 1) % profile5.length * bodySegments + i;
|
|
14210
14842
|
indices.push(a, b, c, a, c, d);
|
|
14211
14843
|
}
|
|
14212
14844
|
return indexedMeshToGeom3({ positions, indices });
|
|
@@ -14264,10 +14896,10 @@ function createMountingHoleCutter(hole) {
|
|
|
14264
14896
|
function subtractShaftMountParts(body, ...cutters) {
|
|
14265
14897
|
const factor = 100;
|
|
14266
14898
|
const scaled = [body, ...cutters].map(
|
|
14267
|
-
(geometry) =>
|
|
14899
|
+
(geometry) => jscad7.transforms.scale([factor, factor, factor], geometry)
|
|
14268
14900
|
);
|
|
14269
|
-
const result =
|
|
14270
|
-
return
|
|
14901
|
+
const result = jscad7.booleans.subtract(scaled[0], ...scaled.slice(1));
|
|
14902
|
+
return jscad7.transforms.scale([1 / factor, 1 / factor, 1 / factor], result);
|
|
14271
14903
|
}
|
|
14272
14904
|
function finishShaftMountMesh(geometry) {
|
|
14273
14905
|
const positions = [];
|
|
@@ -14293,7 +14925,7 @@ function finishShaftMountMesh(geometry) {
|
|
|
14293
14925
|
vertices.set(key, [...vertices.get(key) ?? [], index]);
|
|
14294
14926
|
return index;
|
|
14295
14927
|
};
|
|
14296
|
-
const polygons =
|
|
14928
|
+
const polygons = jscad7.geometries.geom3.toPolygons(geometry).map(
|
|
14297
14929
|
(polygon4) => polygon4.vertices.map(weld).filter((id, i, ids) => id !== ids[(i + ids.length - 1) % ids.length])
|
|
14298
14930
|
).map((ids) => [...new Set(ids)]).filter((ids) => ids.length >= 3).filter((ids) => {
|
|
14299
14931
|
let longest = 0;
|
|
@@ -14316,11 +14948,11 @@ function finishShaftMountMesh(geometry) {
|
|
|
14316
14948
|
return Math.hypot(...delta.map((v, axis) => v - t * direction[axis])) >= tolerance;
|
|
14317
14949
|
});
|
|
14318
14950
|
});
|
|
14319
|
-
const
|
|
14951
|
+
const edgeKey2 = (a, b) => `${Math.min(a, b)},${Math.max(a, b)}`;
|
|
14320
14952
|
const edges = /* @__PURE__ */ new Map();
|
|
14321
14953
|
for (const polygon4 of polygons)
|
|
14322
14954
|
for (let i = 0; i < polygon4.length; i++) {
|
|
14323
|
-
const a = polygon4[i], b = polygon4[(i + 1) % polygon4.length], key =
|
|
14955
|
+
const a = polygon4[i], b = polygon4[(i + 1) % polygon4.length], key = edgeKey2(a, b);
|
|
14324
14956
|
const edge = edges.get(key) ?? { a, b, count: 0 };
|
|
14325
14957
|
edge.count++;
|
|
14326
14958
|
edges.set(key, edge);
|
|
@@ -14405,7 +15037,7 @@ function createClampingShaftCollarMesh(input) {
|
|
|
14405
15037
|
});
|
|
14406
15038
|
const s = dimensions5.split;
|
|
14407
15039
|
const epsilon = 1e-4;
|
|
14408
|
-
const slit =
|
|
15040
|
+
const slit = jscad8.primitives.cuboid({
|
|
14409
15041
|
size: [
|
|
14410
15042
|
s.xMax - s.xMin + epsilon,
|
|
14411
15043
|
s.yMax - s.yMin,
|
|
@@ -15005,7 +15637,7 @@ function createFlangedBushingMesh(input) {
|
|
|
15005
15637
|
const ri = d.innerDiameter / 2;
|
|
15006
15638
|
const ro = d.outerDiameter / 2;
|
|
15007
15639
|
const rf = d.flangeDiameter / 2;
|
|
15008
|
-
const
|
|
15640
|
+
const profile5 = [
|
|
15009
15641
|
[rf, 0],
|
|
15010
15642
|
[rf, d.shoulderZ],
|
|
15011
15643
|
[ro, d.shoulderZ],
|
|
@@ -15016,14 +15648,14 @@ function createFlangedBushingMesh(input) {
|
|
|
15016
15648
|
const segments = 96;
|
|
15017
15649
|
const positions = [];
|
|
15018
15650
|
const indices = [];
|
|
15019
|
-
for (const [radius, z] of
|
|
15651
|
+
for (const [radius, z] of profile5)
|
|
15020
15652
|
for (let i = 0; i < segments; i++) {
|
|
15021
15653
|
const angle = i * Math.PI * 2 / segments;
|
|
15022
15654
|
positions.push(radius * Math.cos(angle), radius * Math.sin(angle), z);
|
|
15023
15655
|
}
|
|
15024
|
-
for (let ring = 0; ring <
|
|
15656
|
+
for (let ring = 0; ring < profile5.length; ring++) {
|
|
15025
15657
|
const a = ring * segments;
|
|
15026
|
-
const b = (ring + 1) %
|
|
15658
|
+
const b = (ring + 1) % profile5.length * segments;
|
|
15027
15659
|
for (let i = 0; i < segments; i++) {
|
|
15028
15660
|
const next = (i + 1) % segments;
|
|
15029
15661
|
indices.push(a + i, a + next, b + next, a + i, b + next, b + i);
|
|
@@ -15178,15 +15810,15 @@ function register67(registry2) {
|
|
|
15178
15810
|
import { Colorize as Colorize20, Custom as Custom14 } from "jscad-fiber";
|
|
15179
15811
|
|
|
15180
15812
|
// lib/models/flatcableclip/geometry.ts
|
|
15181
|
-
import
|
|
15813
|
+
import jscad9 from "@jscad/modeling";
|
|
15182
15814
|
var {
|
|
15183
|
-
primitives:
|
|
15184
|
-
extrusions:
|
|
15185
|
-
transforms,
|
|
15186
|
-
booleans,
|
|
15187
|
-
geometries:
|
|
15188
|
-
measurements:
|
|
15189
|
-
} =
|
|
15815
|
+
primitives: primitives4,
|
|
15816
|
+
extrusions: extrusions4,
|
|
15817
|
+
transforms: transforms2,
|
|
15818
|
+
booleans: booleans2,
|
|
15819
|
+
geometries: geometries4,
|
|
15820
|
+
measurements: measurements4
|
|
15821
|
+
} = jscad9;
|
|
15190
15822
|
function createFlatCableClipSolid(input) {
|
|
15191
15823
|
const p = flatCableClipModelPropsSchema.parse(input);
|
|
15192
15824
|
const legOuter = p.innerWidth / 2 + p.thickness, half = legOuter + p.footLength;
|
|
@@ -15204,25 +15836,25 @@ function createFlatCableClipSolid(input) {
|
|
|
15204
15836
|
[-legOuter, p.thickness],
|
|
15205
15837
|
[-half, p.thickness]
|
|
15206
15838
|
];
|
|
15207
|
-
const bridge =
|
|
15839
|
+
const bridge = transforms2.translate(
|
|
15208
15840
|
[0, p.depth / 2, 0],
|
|
15209
|
-
|
|
15841
|
+
transforms2.rotateX(
|
|
15210
15842
|
Math.PI / 2,
|
|
15211
|
-
|
|
15843
|
+
extrusions4.extrudeLinear(
|
|
15212
15844
|
{ height: p.depth },
|
|
15213
|
-
|
|
15845
|
+
primitives4.polygon({ points })
|
|
15214
15846
|
)
|
|
15215
15847
|
)
|
|
15216
15848
|
);
|
|
15217
15849
|
const bores = [-1, 1].map(
|
|
15218
|
-
(sign) =>
|
|
15850
|
+
(sign) => primitives4.cylinder({
|
|
15219
15851
|
radius: p.holeDiameter / 2,
|
|
15220
15852
|
height: p.thickness + 2,
|
|
15221
15853
|
center: [sign * p.holePitch / 2, 0, p.thickness / 2],
|
|
15222
15854
|
segments: 96
|
|
15223
15855
|
})
|
|
15224
15856
|
);
|
|
15225
|
-
return
|
|
15857
|
+
return booleans2.subtract(bridge, ...bores);
|
|
15226
15858
|
}
|
|
15227
15859
|
function createFlatCableClipMesh(input) {
|
|
15228
15860
|
const p = flatCableClipModelPropsSchema.parse(input);
|
|
@@ -15233,8 +15865,8 @@ function createFlatCableClipMesh(input) {
|
|
|
15233
15865
|
[0, p.thickness, p.innerHeight, p.innerHeight + p.thickness]
|
|
15234
15866
|
];
|
|
15235
15867
|
const geom = createFlatCableClipSolid(p);
|
|
15236
|
-
const tolerance = Math.max(...
|
|
15237
|
-
const polygons =
|
|
15868
|
+
const tolerance = Math.max(...measurements4.measureDimensions(geom)) * 1e-5;
|
|
15869
|
+
const polygons = geometries4.geom3.toPolygons(geom).map(
|
|
15238
15870
|
(poly) => poly.vertices.map(
|
|
15239
15871
|
(point) => point.map((value, axis) => {
|
|
15240
15872
|
const nearest = planes[axis].reduce(
|
|
@@ -15244,7 +15876,7 @@ function createFlatCableClipMesh(input) {
|
|
|
15244
15876
|
})
|
|
15245
15877
|
)
|
|
15246
15878
|
);
|
|
15247
|
-
return finishShaftMountMesh(
|
|
15879
|
+
return finishShaftMountMesh(geometries4.geom3.fromPoints(polygons));
|
|
15248
15880
|
}
|
|
15249
15881
|
function createFlatCableClipGeom(input) {
|
|
15250
15882
|
return indexedMeshToGeom3(createFlatCableClipMesh(input));
|
|
@@ -17215,7 +17847,7 @@ function register79(registry2) {
|
|
|
17215
17847
|
}
|
|
17216
17848
|
|
|
17217
17849
|
// lib/utils/nemaMotorAssemblyGeometry.ts
|
|
17218
|
-
import
|
|
17850
|
+
import jscad10 from "@jscad/modeling";
|
|
17219
17851
|
function nema34AssemblyCenters(p) {
|
|
17220
17852
|
const edge = p.bodyWidth / 2;
|
|
17221
17853
|
return [-1, 1].flatMap(
|
|
@@ -17225,16 +17857,16 @@ function nema34AssemblyCenters(p) {
|
|
|
17225
17857
|
);
|
|
17226
17858
|
}
|
|
17227
17859
|
function cutNema34FrontRecesses(geometry, p) {
|
|
17228
|
-
return
|
|
17860
|
+
return jscad10.booleans.subtract(
|
|
17229
17861
|
geometry,
|
|
17230
17862
|
...nema34AssemblyCenters(p).flatMap(([x, y]) => [
|
|
17231
|
-
|
|
17863
|
+
jscad10.primitives.cylinder({
|
|
17232
17864
|
radius: 1.6,
|
|
17233
17865
|
height: p.frontCapLength + 0.2,
|
|
17234
17866
|
center: [x, y, -p.frontCapLength / 2],
|
|
17235
17867
|
segments: 32
|
|
17236
17868
|
}),
|
|
17237
|
-
|
|
17869
|
+
jscad10.primitives.cylinder({
|
|
17238
17870
|
radius: 5,
|
|
17239
17871
|
height: Math.min(4, p.frontCapLength / 2) + 0.1,
|
|
17240
17872
|
center: [
|
|
@@ -17248,8 +17880,8 @@ function cutNema34FrontRecesses(geometry, p) {
|
|
|
17248
17880
|
);
|
|
17249
17881
|
}
|
|
17250
17882
|
function createNema34FrontScrews(p) {
|
|
17251
|
-
const head =
|
|
17252
|
-
|
|
17883
|
+
const head = jscad10.booleans.subtract(
|
|
17884
|
+
jscad10.primitives.ellipsoid({
|
|
17253
17885
|
radius: [3.2, 3.2, 1.5],
|
|
17254
17886
|
center: [0, 0, -1.8],
|
|
17255
17887
|
segments: 32
|
|
@@ -17258,22 +17890,22 @@ function createNema34FrontScrews(p) {
|
|
|
17258
17890
|
[3.7, 0.8, 1.1],
|
|
17259
17891
|
[0.8, 3.7, 1.1]
|
|
17260
17892
|
].map(
|
|
17261
|
-
(size) =>
|
|
17893
|
+
(size) => jscad10.primitives.cuboid({
|
|
17262
17894
|
size,
|
|
17263
17895
|
center: [0, 0, -0.8]
|
|
17264
17896
|
})
|
|
17265
17897
|
)
|
|
17266
17898
|
);
|
|
17267
17899
|
return nema34AssemblyCenters(p).map(
|
|
17268
|
-
([x, y]) =>
|
|
17900
|
+
([x, y]) => jscad10.transforms.translate([x, y, 0], head)
|
|
17269
17901
|
);
|
|
17270
17902
|
}
|
|
17271
17903
|
|
|
17272
17904
|
// lib/NemaMotor.tsx
|
|
17273
|
-
import
|
|
17905
|
+
import jscad12 from "@jscad/modeling";
|
|
17274
17906
|
|
|
17275
17907
|
// lib/utils/nemaMotorWireGeometry.ts
|
|
17276
|
-
import
|
|
17908
|
+
import jscad11 from "@jscad/modeling";
|
|
17277
17909
|
|
|
17278
17910
|
// lib/utils/nemaMotorParameters.ts
|
|
17279
17911
|
var resolveNemaMotorProps = nemaMotorModelPropsSchema.parse.bind(nemaMotorModelPropsSchema);
|
|
@@ -17284,12 +17916,12 @@ function createNemaMotorWireGeometry(input) {
|
|
|
17284
17916
|
if (p.noWires) return [];
|
|
17285
17917
|
const { position } = getNemaMotorReferencePoints(p).wireside;
|
|
17286
17918
|
const angle = p.wireSideAngle * Math.PI / 180;
|
|
17287
|
-
const place = (geometry) =>
|
|
17919
|
+
const place = (geometry) => jscad11.transforms.translate(
|
|
17288
17920
|
[position.x, position.y, position.z],
|
|
17289
|
-
|
|
17921
|
+
jscad11.transforms.rotateZ(angle, geometry)
|
|
17290
17922
|
);
|
|
17291
17923
|
if (p.wireStubs) {
|
|
17292
|
-
const
|
|
17924
|
+
const colors2 = [
|
|
17293
17925
|
"#d53f3f",
|
|
17294
17926
|
"#2463af",
|
|
17295
17927
|
"#3b934b",
|
|
@@ -17300,17 +17932,17 @@ function createNemaMotorWireGeometry(input) {
|
|
|
17300
17932
|
"#803e91"
|
|
17301
17933
|
];
|
|
17302
17934
|
const wires = Array.from({ length: p.wireCount }, (_, i) => ({
|
|
17303
|
-
color:
|
|
17935
|
+
color: colors2[i],
|
|
17304
17936
|
geometry: place(
|
|
17305
|
-
|
|
17937
|
+
jscad11.transforms.translate(
|
|
17306
17938
|
[
|
|
17307
17939
|
(p.wireLength - 0.15) / 2,
|
|
17308
17940
|
(i - (p.wireCount - 1) / 2) * p.wireDiameter * 1.5,
|
|
17309
17941
|
0
|
|
17310
17942
|
],
|
|
17311
|
-
|
|
17943
|
+
jscad11.transforms.rotateY(
|
|
17312
17944
|
Math.PI / 2,
|
|
17313
|
-
|
|
17945
|
+
jscad11.primitives.cylinder({
|
|
17314
17946
|
height: p.wireLength + 0.15,
|
|
17315
17947
|
radius: p.wireDiameter / 2,
|
|
17316
17948
|
segments: 24
|
|
@@ -17323,7 +17955,7 @@ function createNemaMotorWireGeometry(input) {
|
|
|
17323
17955
|
wires.unshift({
|
|
17324
17956
|
color: "#252830",
|
|
17325
17957
|
geometry: place(
|
|
17326
|
-
|
|
17958
|
+
jscad11.primitives.roundedCuboid({
|
|
17327
17959
|
size: [3, p.wireCount * p.wireDiameter * 1.5 + 3, 6],
|
|
17328
17960
|
center: [0.8, 0, 0],
|
|
17329
17961
|
roundRadius: 1,
|
|
@@ -17338,12 +17970,12 @@ function createNemaMotorWireGeometry(input) {
|
|
|
17338
17970
|
const wall = pitch === 2 ? 0.6 : 0.3;
|
|
17339
17971
|
const contactLength = pitch === 2 ? 3.4 : 2.4;
|
|
17340
17972
|
const contactSize = pitch === 2 ? 0.5 : 0.3;
|
|
17341
|
-
const shell =
|
|
17342
|
-
|
|
17973
|
+
const shell = jscad11.booleans.subtract(
|
|
17974
|
+
jscad11.primitives.cuboid({
|
|
17343
17975
|
size: [matingDepth + 0.1, bodyWidth, bodyHeight],
|
|
17344
17976
|
center: [(matingDepth - 0.1) / 2, 0, 0]
|
|
17345
17977
|
}),
|
|
17346
|
-
|
|
17978
|
+
jscad11.primitives.cuboid({
|
|
17347
17979
|
size: [matingDepth - 0.5, bodyWidth - 2 * wall, bodyHeight - 2 * wall],
|
|
17348
17980
|
center: [matingDepth / 2 + 0.55, 0, 0]
|
|
17349
17981
|
})
|
|
@@ -17353,7 +17985,7 @@ function createNemaMotorWireGeometry(input) {
|
|
|
17353
17985
|
...Array.from({ length: pinCount }, (_, i) => ({
|
|
17354
17986
|
color: "#b8bec6",
|
|
17355
17987
|
geometry: place(
|
|
17356
|
-
|
|
17988
|
+
jscad11.primitives.cuboid({
|
|
17357
17989
|
size: [contactLength, contactSize, contactSize],
|
|
17358
17990
|
center: [contactLength / 2, (i - (pinCount - 1) / 2) * pitch, 0]
|
|
17359
17991
|
})
|
|
@@ -17401,19 +18033,25 @@ var roundedFace = (width10, radius) => {
|
|
|
17401
18033
|
})
|
|
17402
18034
|
);
|
|
17403
18035
|
};
|
|
17404
|
-
var steppedFace = (width10, chamfer) => {
|
|
18036
|
+
var steppedFace = (width10, chamfer, recessRadius, filletRadius) => {
|
|
17405
18037
|
if (chamfer === 0) return face(width10, 0);
|
|
17406
18038
|
const h = width10 / 2, c = chamfer / Math.SQRT2, r = Math.min(4, c / 4);
|
|
17407
18039
|
const corner = [];
|
|
17408
|
-
const arc = (x, y, from, to) => {
|
|
18040
|
+
const arc = (x, y, radius, from, to) => {
|
|
18041
|
+
if (radius === 0) {
|
|
18042
|
+
corner.push([x, y]);
|
|
18043
|
+
return;
|
|
18044
|
+
}
|
|
17409
18045
|
for (let i = 0; i <= 12; i++) {
|
|
17410
18046
|
const a = (from + (to - from) * i / 12) * Math.PI / 180;
|
|
17411
|
-
corner.push([x +
|
|
18047
|
+
corner.push([x + radius * Math.cos(a), y + radius * Math.sin(a)]);
|
|
17412
18048
|
}
|
|
17413
18049
|
};
|
|
17414
|
-
|
|
17415
|
-
|
|
17416
|
-
arc(h -
|
|
18050
|
+
const convex = filletRadius ?? r;
|
|
18051
|
+
const concave = recessRadius ?? r;
|
|
18052
|
+
arc(h - c - convex, h - convex, convex, 90, 0);
|
|
18053
|
+
arc(h - c + concave, h - c + concave, concave, 180, 270);
|
|
18054
|
+
arc(h - convex, h - c - convex, convex, 90, 0);
|
|
17417
18055
|
return [0, 1, 2, 3].flatMap(
|
|
17418
18056
|
(i) => corner.map(([x, y]) => {
|
|
17419
18057
|
const a = -i * Math.PI / 2;
|
|
@@ -17434,12 +18072,18 @@ function createNemaMotorSections(input) {
|
|
|
17434
18072
|
p.bodyWidth,
|
|
17435
18073
|
p.faceCornerChamfer
|
|
17436
18074
|
);
|
|
17437
|
-
const
|
|
17438
|
-
const core = profile6(p.bodyWidth, p.bodyCornerChamfer);
|
|
17439
|
-
const rear = profile6(
|
|
18075
|
+
const core = p.stepped ? steppedFace(
|
|
17440
18076
|
p.bodyWidth,
|
|
17441
|
-
p.
|
|
17442
|
-
|
|
18077
|
+
p.bodyCornerChamfer,
|
|
18078
|
+
p.bodyCornerRecessRadius,
|
|
18079
|
+
p.bodyCornerFilletRadius
|
|
18080
|
+
) : face(p.bodyWidth, p.bodyCornerChamfer);
|
|
18081
|
+
const rear = p.rearStepped ? steppedFace(
|
|
18082
|
+
p.bodyWidth,
|
|
18083
|
+
p.rearCornerChamfer,
|
|
18084
|
+
p.rearCornerRecessRadius,
|
|
18085
|
+
p.rearCornerFilletRadius
|
|
18086
|
+
) : face(p.bodyWidth, p.rearCornerChamfer);
|
|
17443
18087
|
const h = p.mountingHoleSpacing / 2;
|
|
17444
18088
|
const centers = [
|
|
17445
18089
|
[-h, -h],
|
|
@@ -17457,9 +18101,10 @@ function createNemaMotorSections(input) {
|
|
|
17457
18101
|
if (p.backFacePlain) {
|
|
17458
18102
|
add("rearCap", rear, -p.bodyLength, -p.bodyLength + p.rearCapLength);
|
|
17459
18103
|
} else {
|
|
17460
|
-
const
|
|
17461
|
-
const
|
|
17462
|
-
|
|
18104
|
+
const halfPitchX = p.backFaceHoleSpacingX / 2;
|
|
18105
|
+
const halfPitchY = p.backFaceHoleSpacingY / 2;
|
|
18106
|
+
const rearHoles = [-halfPitchX, halfPitchX].flatMap(
|
|
18107
|
+
(x) => [-halfPitchY, halfPitchY].map(
|
|
17463
18108
|
(y) => circle(p.backFaceHoleDiameter / 2, x, y)
|
|
17464
18109
|
)
|
|
17465
18110
|
);
|
|
@@ -17484,12 +18129,12 @@ function createNemaMotorSections(input) {
|
|
|
17484
18129
|
else {
|
|
17485
18130
|
const cut = r - p.shaftFlatDepth;
|
|
17486
18131
|
const angle = Math.acos(cut / r);
|
|
17487
|
-
const
|
|
18132
|
+
const profile5 = Array.from({ length: 97 }, (_, i) => {
|
|
17488
18133
|
const a = angle + (2 * Math.PI - 2 * angle) * i / 96;
|
|
17489
18134
|
return [r * Math.cos(a), r * Math.sin(a)];
|
|
17490
18135
|
});
|
|
17491
18136
|
const rotation = p.shaftFlatAngle * Math.PI / 180;
|
|
17492
|
-
const d =
|
|
18137
|
+
const d = profile5.map(([x, y]) => [
|
|
17493
18138
|
x * Math.cos(rotation) - y * Math.sin(rotation),
|
|
17494
18139
|
x * Math.sin(rotation) + y * Math.cos(rotation)
|
|
17495
18140
|
]);
|
|
@@ -17502,7 +18147,7 @@ function createNemaMotorSections(input) {
|
|
|
17502
18147
|
// lib/NemaMotor.tsx
|
|
17503
18148
|
import { Colorize as Colorize33, Custom as Custom25 } from "jscad-fiber";
|
|
17504
18149
|
import { Fragment as Fragment17, jsx as jsx67, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
17505
|
-
var generalize3 =
|
|
18150
|
+
var generalize3 = jscad12.modifiers.generalize;
|
|
17506
18151
|
function NemaMotor({
|
|
17507
18152
|
bodyColor = "#242830",
|
|
17508
18153
|
capColor = "#aeb5bd",
|
|
@@ -17511,7 +18156,7 @@ function NemaMotor({
|
|
|
17511
18156
|
...props
|
|
17512
18157
|
}) {
|
|
17513
18158
|
const p = resolveNemaMotorProps(props);
|
|
17514
|
-
const screw = p.backFaceScrews ?
|
|
18159
|
+
const screw = p.backFaceScrews ? jscad12.transforms.rotateX(
|
|
17515
18160
|
Math.PI,
|
|
17516
18161
|
createHexSocketBoltGeom({
|
|
17517
18162
|
metricSize: p.backFaceScrewSize,
|
|
@@ -17519,19 +18164,20 @@ function NemaMotor({
|
|
|
17519
18164
|
showThreads: false
|
|
17520
18165
|
})
|
|
17521
18166
|
) : void 0;
|
|
17522
|
-
const
|
|
18167
|
+
const halfPitchX = p.backFaceHoleSpacingX / 2;
|
|
18168
|
+
const halfPitchY = p.backFaceHoleSpacingY / 2;
|
|
17523
18169
|
return /* @__PURE__ */ jsxs17(Fragment17, { children: [
|
|
17524
18170
|
createNemaMotorSections(p).map((section, index) => {
|
|
17525
|
-
const outline =
|
|
17526
|
-
const
|
|
18171
|
+
const outline = jscad12.geometries.geom2.fromPoints(section.outline);
|
|
18172
|
+
const profile5 = section.holes.length ? jscad12.booleans.subtract(
|
|
17527
18173
|
outline,
|
|
17528
|
-
...section.holes.map((h) =>
|
|
18174
|
+
...section.holes.map((h) => jscad12.geometries.geom2.fromPoints(h))
|
|
17529
18175
|
) : outline;
|
|
17530
|
-
let geometry =
|
|
18176
|
+
let geometry = jscad12.transforms.translate(
|
|
17531
18177
|
[0, 0, section.zMin],
|
|
17532
|
-
|
|
18178
|
+
jscad12.extrusions.extrudeLinear(
|
|
17533
18179
|
{ height: section.zMax - section.zMin },
|
|
17534
|
-
|
|
18180
|
+
profile5
|
|
17535
18181
|
)
|
|
17536
18182
|
);
|
|
17537
18183
|
if (p.nemaSize === 34 && section.name === "frontCap")
|
|
@@ -17564,8 +18210,8 @@ function NemaMotor({
|
|
|
17564
18210
|
},
|
|
17565
18211
|
`front-screw-${index}`
|
|
17566
18212
|
)),
|
|
17567
|
-
screw && [-
|
|
17568
|
-
(x) => [-
|
|
18213
|
+
screw && [-halfPitchX, halfPitchX].flatMap(
|
|
18214
|
+
(x) => [-halfPitchY, halfPitchY].map((y) => /* @__PURE__ */ jsx67(
|
|
17569
18215
|
Colorize33,
|
|
17570
18216
|
{
|
|
17571
18217
|
material: componentMaterials.steel,
|
|
@@ -17573,7 +18219,7 @@ function NemaMotor({
|
|
|
17573
18219
|
children: /* @__PURE__ */ jsx67(
|
|
17574
18220
|
Custom25,
|
|
17575
18221
|
{
|
|
17576
|
-
geometry:
|
|
18222
|
+
geometry: jscad12.transforms.translate(
|
|
17577
18223
|
[x, y, -p.bodyLength],
|
|
17578
18224
|
generalize3({ simplify: true }, screw)
|
|
17579
18225
|
)
|
|
@@ -18082,19 +18728,19 @@ function register83(registry2) {
|
|
|
18082
18728
|
import { Colorize as Colorize37, Custom as Custom29 } from "jscad-fiber";
|
|
18083
18729
|
|
|
18084
18730
|
// lib/models/perforatedsheet/geometry.ts
|
|
18085
|
-
import
|
|
18731
|
+
import jscad13 from "@jscad/modeling";
|
|
18086
18732
|
var {
|
|
18087
|
-
booleans:
|
|
18088
|
-
primitives:
|
|
18089
|
-
extrusions:
|
|
18090
|
-
geometries:
|
|
18091
|
-
modifiers:
|
|
18092
|
-
measurements:
|
|
18093
|
-
} =
|
|
18094
|
-
var generalize4 =
|
|
18095
|
-
var { subtract } =
|
|
18096
|
-
var { rectangle: rectangle3, roundedRectangle: roundedRectangle3, circle: circle2 } =
|
|
18097
|
-
var profile3 = (shape49, height10) =>
|
|
18733
|
+
booleans: booleans3,
|
|
18734
|
+
primitives: primitives5,
|
|
18735
|
+
extrusions: extrusions5,
|
|
18736
|
+
geometries: geometries5,
|
|
18737
|
+
modifiers: modifiers4,
|
|
18738
|
+
measurements: measurements5
|
|
18739
|
+
} = jscad13;
|
|
18740
|
+
var generalize4 = modifiers4.generalize;
|
|
18741
|
+
var { subtract } = booleans3;
|
|
18742
|
+
var { rectangle: rectangle3, roundedRectangle: roundedRectangle3, circle: circle2 } = primitives5;
|
|
18743
|
+
var profile3 = (shape49, height10) => extrusions5.extrudeLinear({ height: height10 }, shape49);
|
|
18098
18744
|
function perforated(p) {
|
|
18099
18745
|
const holes = [];
|
|
18100
18746
|
const rows = Math.floor((p.width - 2 * p.edgeY) / p.pitchY + 1 + 1e-10);
|
|
@@ -18125,7 +18771,7 @@ function createPerforatedSheetMesh(input) {
|
|
|
18125
18771
|
{ snap: true, triangulate: true },
|
|
18126
18772
|
createPerforatedSheetGeom(input)
|
|
18127
18773
|
);
|
|
18128
|
-
const epsilon = Math.max(...
|
|
18774
|
+
const epsilon = Math.max(...measurements5.measureDimensions(geom)) * 1e-10;
|
|
18129
18775
|
const positions = [];
|
|
18130
18776
|
const indices = [];
|
|
18131
18777
|
const lookup = /* @__PURE__ */ new Map();
|
|
@@ -18139,7 +18785,7 @@ function createPerforatedSheetMesh(input) {
|
|
|
18139
18785
|
}
|
|
18140
18786
|
return index;
|
|
18141
18787
|
};
|
|
18142
|
-
for (const poly of
|
|
18788
|
+
for (const poly of geometries5.geom3.toPolygons(geom)) {
|
|
18143
18789
|
for (let i = 1; i < poly.vertices.length - 1; i++) {
|
|
18144
18790
|
const a = poly.vertices[0], b = poly.vertices[i], c = poly.vertices[i + 1];
|
|
18145
18791
|
const u = b.map((x, j) => x - a[j]), v = c.map((x, j) => x - a[j]);
|
|
@@ -18186,7 +18832,7 @@ function createPlainBushingMesh(input) {
|
|
|
18186
18832
|
const ri = d.innerDiameter / 2;
|
|
18187
18833
|
const ro = d.outerDiameter / 2;
|
|
18188
18834
|
const c = props.edgeChamfer;
|
|
18189
|
-
const
|
|
18835
|
+
const profile5 = c > 0 ? [
|
|
18190
18836
|
[d.endOuterDiameter / 2, 0],
|
|
18191
18837
|
[ro, c],
|
|
18192
18838
|
[ro, d.length - c],
|
|
@@ -18204,14 +18850,14 @@ function createPlainBushingMesh(input) {
|
|
|
18204
18850
|
const segments = 96;
|
|
18205
18851
|
const positions = [];
|
|
18206
18852
|
const indices = [];
|
|
18207
|
-
for (const [radius, z] of
|
|
18853
|
+
for (const [radius, z] of profile5)
|
|
18208
18854
|
for (let i = 0; i < segments; i++) {
|
|
18209
18855
|
const angle = i * Math.PI * 2 / segments;
|
|
18210
18856
|
positions.push(radius * Math.cos(angle), radius * Math.sin(angle), z);
|
|
18211
18857
|
}
|
|
18212
|
-
for (let ring = 0; ring <
|
|
18858
|
+
for (let ring = 0; ring < profile5.length; ring++) {
|
|
18213
18859
|
const a = ring * segments;
|
|
18214
|
-
const b = (ring + 1) %
|
|
18860
|
+
const b = (ring + 1) % profile5.length * segments;
|
|
18215
18861
|
for (let i = 0; i < segments; i++) {
|
|
18216
18862
|
const next = (i + 1) % segments;
|
|
18217
18863
|
indices.push(a + i, a + next, b + next, a + i, b + next, b + i);
|
|
@@ -18248,13 +18894,13 @@ function register85(registry2) {
|
|
|
18248
18894
|
import { Colorize as Colorize39, Custom as Custom31 } from "jscad-fiber";
|
|
18249
18895
|
|
|
18250
18896
|
// lib/models/pushfitplug/geometry.ts
|
|
18251
|
-
import
|
|
18252
|
-
var { primitives:
|
|
18253
|
-
var generalize5 =
|
|
18254
|
-
var { rectangle: rectangle4, roundedRectangle: roundedRectangle4, polygon: polygon3 } =
|
|
18897
|
+
import jscad14 from "@jscad/modeling";
|
|
18898
|
+
var { primitives: primitives6, extrusions: extrusions6, geometries: geometries6, modifiers: modifiers5, measurements: measurements6 } = jscad14;
|
|
18899
|
+
var generalize5 = modifiers5.generalize;
|
|
18900
|
+
var { rectangle: rectangle4, roundedRectangle: roundedRectangle4, polygon: polygon3 } = primitives6;
|
|
18255
18901
|
function createPushFitPlugGeom(input) {
|
|
18256
18902
|
const p = pushFitPlugModelPropsSchema.parse(input);
|
|
18257
|
-
return
|
|
18903
|
+
return extrusions6.extrudeRotate(
|
|
18258
18904
|
{ segments: 64 },
|
|
18259
18905
|
polygon3({
|
|
18260
18906
|
points: [
|
|
@@ -18273,7 +18919,7 @@ function createPushFitPlugMesh(input) {
|
|
|
18273
18919
|
{ snap: true, triangulate: true },
|
|
18274
18920
|
createPushFitPlugGeom(input)
|
|
18275
18921
|
);
|
|
18276
|
-
const epsilon = Math.max(...
|
|
18922
|
+
const epsilon = Math.max(...measurements6.measureDimensions(geom)) * 1e-10;
|
|
18277
18923
|
const positions = [];
|
|
18278
18924
|
const indices = [];
|
|
18279
18925
|
const lookup = /* @__PURE__ */ new Map();
|
|
@@ -18287,7 +18933,7 @@ function createPushFitPlugMesh(input) {
|
|
|
18287
18933
|
}
|
|
18288
18934
|
return index;
|
|
18289
18935
|
};
|
|
18290
|
-
for (const poly of
|
|
18936
|
+
for (const poly of geometries6.geom3.toPolygons(geom)) {
|
|
18291
18937
|
for (let i = 1; i < poly.vertices.length - 1; i++) {
|
|
18292
18938
|
const a = poly.vertices[0], b = poly.vertices[i], c = poly.vertices[i + 1];
|
|
18293
18939
|
const u = b.map((x, j) => x - a[j]), v = c.map((x, j) => x - a[j]);
|
|
@@ -18325,11 +18971,11 @@ function register86(registry2) {
|
|
|
18325
18971
|
import { Colorize as Colorize40, Custom as Custom32 } from "jscad-fiber";
|
|
18326
18972
|
|
|
18327
18973
|
// lib/models/rectangularbar/geometry.ts
|
|
18328
|
-
import
|
|
18329
|
-
var { primitives:
|
|
18330
|
-
var generalize6 =
|
|
18331
|
-
var { rectangle: rectangle5, roundedRectangle: roundedRectangle5 } =
|
|
18332
|
-
var profile4 = (shape49, height10) =>
|
|
18974
|
+
import jscad15 from "@jscad/modeling";
|
|
18975
|
+
var { primitives: primitives7, extrusions: extrusions7, geometries: geometries7, modifiers: modifiers6, measurements: measurements7 } = jscad15;
|
|
18976
|
+
var generalize6 = modifiers6.generalize;
|
|
18977
|
+
var { rectangle: rectangle5, roundedRectangle: roundedRectangle5 } = primitives7;
|
|
18978
|
+
var profile4 = (shape49, height10) => extrusions7.extrudeLinear({ height: height10 }, shape49);
|
|
18333
18979
|
var roundedRect = (width10, height10, radius) => radius ? roundedRectangle5({
|
|
18334
18980
|
size: [width10, height10],
|
|
18335
18981
|
roundRadius: radius,
|
|
@@ -18344,7 +18990,7 @@ function createRectangularBarMesh(input) {
|
|
|
18344
18990
|
{ snap: true, triangulate: true },
|
|
18345
18991
|
createRectangularBarGeom(input)
|
|
18346
18992
|
);
|
|
18347
|
-
const epsilon = Math.max(...
|
|
18993
|
+
const epsilon = Math.max(...measurements7.measureDimensions(geom)) * 1e-10;
|
|
18348
18994
|
const positions = [];
|
|
18349
18995
|
const indices = [];
|
|
18350
18996
|
const lookup = /* @__PURE__ */ new Map();
|
|
@@ -18358,7 +19004,7 @@ function createRectangularBarMesh(input) {
|
|
|
18358
19004
|
}
|
|
18359
19005
|
return index;
|
|
18360
19006
|
};
|
|
18361
|
-
for (const poly of
|
|
19007
|
+
for (const poly of geometries7.geom3.toPolygons(geom)) {
|
|
18362
19008
|
for (let i = 1; i < poly.vertices.length - 1; i++) {
|
|
18363
19009
|
const a = poly.vertices[0], b = poly.vertices[i], c = poly.vertices[i + 1];
|
|
18364
19010
|
const u = b.map((x, j) => x - a[j]), v = c.map((x, j) => x - a[j]);
|
|
@@ -18510,83 +19156,63 @@ function register88(registry2) {
|
|
|
18510
19156
|
}
|
|
18511
19157
|
|
|
18512
19158
|
// lib/models/rectangulartube/RectangularTube.tsx
|
|
18513
|
-
import {
|
|
19159
|
+
import {
|
|
19160
|
+
Colorize as Colorize42,
|
|
19161
|
+
ExtrudeLinear as ExtrudeLinear3,
|
|
19162
|
+
Polygon as Polygon3,
|
|
19163
|
+
Subtract as Subtract5
|
|
19164
|
+
} from "jscad-fiber/headless";
|
|
18514
19165
|
|
|
18515
|
-
// lib/models/rectangulartube/
|
|
18516
|
-
import
|
|
18517
|
-
var {
|
|
18518
|
-
booleans: booleans3,
|
|
18519
|
-
primitives: primitives7,
|
|
18520
|
-
extrusions: extrusions7,
|
|
18521
|
-
geometries: geometries7,
|
|
18522
|
-
modifiers: modifiers6,
|
|
18523
|
-
measurements: measurements7
|
|
18524
|
-
} = jscad13;
|
|
18525
|
-
var generalize7 = modifiers6.generalize;
|
|
18526
|
-
var { subtract: subtract2 } = booleans3;
|
|
18527
|
-
var { rectangle: rectangle6, roundedRectangle: roundedRectangle6 } = primitives7;
|
|
18528
|
-
var profile5 = (shape49, height10) => extrusions7.extrudeLinear({ height: height10 }, shape49);
|
|
18529
|
-
var roundedRect2 = (width10, height10, radius) => radius ? roundedRectangle6({
|
|
19166
|
+
// lib/models/rectangulartube/profiles.ts
|
|
19167
|
+
import jscad16 from "@jscad/modeling";
|
|
19168
|
+
var roundedRectangle6 = (width10, height10, radius) => radius ? jscad16.primitives.roundedRectangle({
|
|
18530
19169
|
size: [width10, height10],
|
|
18531
19170
|
roundRadius: radius,
|
|
18532
19171
|
segments: 64
|
|
18533
|
-
}) :
|
|
18534
|
-
function
|
|
19172
|
+
}) : jscad16.primitives.rectangle({ size: [width10, height10] });
|
|
19173
|
+
function getRectangularTubeProfiles(input) {
|
|
18535
19174
|
const p = rectangularTubeModelPropsSchema.parse(input);
|
|
18536
|
-
|
|
18537
|
-
|
|
18538
|
-
|
|
18539
|
-
|
|
19175
|
+
const points = (geometry) => jscad16.geometries.geom2.toPoints(geometry);
|
|
19176
|
+
return {
|
|
19177
|
+
length: p.length,
|
|
19178
|
+
outerPoints: points(roundedRectangle6(p.width, p.height, p.outerRadius)),
|
|
19179
|
+
innerPoints: points(
|
|
19180
|
+
roundedRectangle6(
|
|
18540
19181
|
p.width - 2 * p.wallThickness,
|
|
18541
19182
|
p.height - 2 * p.wallThickness,
|
|
18542
19183
|
p.innerRadius
|
|
18543
19184
|
)
|
|
18544
|
-
)
|
|
18545
|
-
p.length
|
|
18546
|
-
);
|
|
18547
|
-
}
|
|
18548
|
-
function createRectangularTubeMesh(input) {
|
|
18549
|
-
const geom = generalize7(
|
|
18550
|
-
{ snap: true, triangulate: true },
|
|
18551
|
-
createRectangularTubeGeom(input)
|
|
18552
|
-
);
|
|
18553
|
-
const epsilon = Math.max(...measurements7.measureDimensions(geom)) * 1e-10;
|
|
18554
|
-
const positions = [];
|
|
18555
|
-
const indices = [];
|
|
18556
|
-
const lookup = /* @__PURE__ */ new Map();
|
|
18557
|
-
const vertex = (v) => {
|
|
18558
|
-
const key = v.map((x) => Math.round(x / epsilon)).join(",");
|
|
18559
|
-
let index = lookup.get(key);
|
|
18560
|
-
if (index === void 0) {
|
|
18561
|
-
index = positions.length / 3;
|
|
18562
|
-
positions.push(...v);
|
|
18563
|
-
lookup.set(key, index);
|
|
18564
|
-
}
|
|
18565
|
-
return index;
|
|
19185
|
+
)
|
|
18566
19186
|
};
|
|
18567
|
-
for (const poly of geometries7.geom3.toPolygons(geom)) {
|
|
18568
|
-
for (let i = 1; i < poly.vertices.length - 1; i++) {
|
|
18569
|
-
const a = poly.vertices[0], b = poly.vertices[i], c = poly.vertices[i + 1];
|
|
18570
|
-
const u = b.map((x, j) => x - a[j]), v = c.map((x, j) => x - a[j]);
|
|
18571
|
-
const area = Math.hypot(
|
|
18572
|
-
u[1] * v[2] - u[2] * v[1],
|
|
18573
|
-
u[2] * v[0] - u[0] * v[2],
|
|
18574
|
-
u[0] * v[1] - u[1] * v[0]
|
|
18575
|
-
);
|
|
18576
|
-
if (area > epsilon * epsilon)
|
|
18577
|
-
indices.push(vertex(a), vertex(b), vertex(c));
|
|
18578
|
-
}
|
|
18579
|
-
}
|
|
18580
|
-
return { positions, indices };
|
|
18581
19187
|
}
|
|
18582
19188
|
|
|
18583
19189
|
// lib/models/rectangulartube/RectangularTube.tsx
|
|
18584
|
-
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
19190
|
+
import { jsx as jsx85, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
18585
19191
|
function RectangularTube({
|
|
18586
19192
|
color = "#929da9",
|
|
18587
19193
|
...props
|
|
18588
19194
|
}) {
|
|
18589
|
-
|
|
19195
|
+
const { length: length32, outerPoints, innerPoints } = getRectangularTubeProfiles(props);
|
|
19196
|
+
return /* @__PURE__ */ jsx85(Colorize42, { color, children: /* @__PURE__ */ jsxs19(Subtract5, { children: [
|
|
19197
|
+
/* @__PURE__ */ jsx85(
|
|
19198
|
+
ExtrudeLinear3,
|
|
19199
|
+
{
|
|
19200
|
+
height: length32,
|
|
19201
|
+
topOutlineName: "outer_top",
|
|
19202
|
+
bottomOutlineName: "outer_bottom",
|
|
19203
|
+
children: /* @__PURE__ */ jsx85(Polygon3, { points: outerPoints })
|
|
19204
|
+
}
|
|
19205
|
+
),
|
|
19206
|
+
/* @__PURE__ */ jsx85(
|
|
19207
|
+
ExtrudeLinear3,
|
|
19208
|
+
{
|
|
19209
|
+
height: length32,
|
|
19210
|
+
topOutlineName: "inner_top",
|
|
19211
|
+
bottomOutlineName: "inner_bottom",
|
|
19212
|
+
children: /* @__PURE__ */ jsx85(Polygon3, { points: innerPoints })
|
|
19213
|
+
}
|
|
19214
|
+
)
|
|
19215
|
+
] }) });
|
|
18590
19216
|
}
|
|
18591
19217
|
|
|
18592
19218
|
// lib/models/rectangulartube/register.tsx
|
|
@@ -18602,7 +19228,7 @@ function register89(registry2) {
|
|
|
18602
19228
|
}
|
|
18603
19229
|
|
|
18604
19230
|
// lib/models/rigidcoupler/RigidCoupler.tsx
|
|
18605
|
-
import { Colorize as Colorize43, Custom as
|
|
19231
|
+
import { Colorize as Colorize43, Custom as Custom34 } from "jscad-fiber";
|
|
18606
19232
|
|
|
18607
19233
|
// lib/models/rigidcoupler/mesh.ts
|
|
18608
19234
|
import "@jscad/modeling";
|
|
@@ -18636,7 +19262,7 @@ function RigidCoupler({
|
|
|
18636
19262
|
color = "#737e8f",
|
|
18637
19263
|
...props
|
|
18638
19264
|
}) {
|
|
18639
|
-
return /* @__PURE__ */ jsx87(Colorize43, { color, children: /* @__PURE__ */ jsx87(
|
|
19265
|
+
return /* @__PURE__ */ jsx87(Colorize43, { color, children: /* @__PURE__ */ jsx87(Custom34, { geometry: createRigidCouplerGeom(props) }) });
|
|
18640
19266
|
}
|
|
18641
19267
|
|
|
18642
19268
|
// lib/models/rigidcoupler/register.tsx
|
|
@@ -18652,7 +19278,7 @@ function register90(registry2) {
|
|
|
18652
19278
|
}
|
|
18653
19279
|
|
|
18654
19280
|
// lib/models/setscrew/SetScrew.tsx
|
|
18655
|
-
import { Colorize as Colorize44, Custom as
|
|
19281
|
+
import { Colorize as Colorize44, Custom as Custom35 } from "jscad-fiber";
|
|
18656
19282
|
|
|
18657
19283
|
// lib/models/setscrew/mesh.ts
|
|
18658
19284
|
function createSetScrewMesh(input, options = {}) {
|
|
@@ -18763,7 +19389,7 @@ function createSetScrewGeom(input, options) {
|
|
|
18763
19389
|
return indexedMeshToGeom3(createSetScrewMesh(input, options));
|
|
18764
19390
|
}
|
|
18765
19391
|
function SetScrew({ color = "#737e8f", ...props }) {
|
|
18766
|
-
return /* @__PURE__ */ jsx89(Colorize44, { color, children: /* @__PURE__ */ jsx89(
|
|
19392
|
+
return /* @__PURE__ */ jsx89(Colorize44, { color, children: /* @__PURE__ */ jsx89(Custom35, { geometry: createSetScrewGeom(props) }) });
|
|
18767
19393
|
}
|
|
18768
19394
|
|
|
18769
19395
|
// lib/models/setscrew/register.tsx
|
|
@@ -18779,7 +19405,7 @@ function register91(registry2) {
|
|
|
18779
19405
|
}
|
|
18780
19406
|
|
|
18781
19407
|
// lib/models/shaftcollar/ShaftCollar.tsx
|
|
18782
|
-
import { Colorize as Colorize45, Custom as
|
|
19408
|
+
import { Colorize as Colorize45, Custom as Custom36 } from "jscad-fiber";
|
|
18783
19409
|
|
|
18784
19410
|
// lib/models/shaftcollar/mesh.ts
|
|
18785
19411
|
import "@jscad/modeling";
|
|
@@ -18808,7 +19434,7 @@ function createShaftCollarGeom(input) {
|
|
|
18808
19434
|
return indexedMeshToGeom3(createShaftCollarMesh(input));
|
|
18809
19435
|
}
|
|
18810
19436
|
function ShaftCollar({ color = "#737e8f", ...props }) {
|
|
18811
|
-
return /* @__PURE__ */ jsx91(Colorize45, { color, children: /* @__PURE__ */ jsx91(
|
|
19437
|
+
return /* @__PURE__ */ jsx91(Colorize45, { color, children: /* @__PURE__ */ jsx91(Custom36, { geometry: createShaftCollarGeom(props) }) });
|
|
18812
19438
|
}
|
|
18813
19439
|
|
|
18814
19440
|
// lib/models/shaftcollar/register.tsx
|
|
@@ -18824,7 +19450,7 @@ function register92(registry2) {
|
|
|
18824
19450
|
}
|
|
18825
19451
|
|
|
18826
19452
|
// lib/SheetMetal.tsx
|
|
18827
|
-
import { Colorize as Colorize46, Custom as
|
|
19453
|
+
import { Colorize as Colorize46, Custom as Custom37 } from "jscad-fiber";
|
|
18828
19454
|
|
|
18829
19455
|
// lib/mechanical/sheet-metal-mesh.ts
|
|
18830
19456
|
import earcut5 from "earcut";
|
|
@@ -18850,7 +19476,7 @@ function holeOutline(hole) {
|
|
|
18850
19476
|
function createSheetMetalMesh(input) {
|
|
18851
19477
|
const props = sheetMetalModelPropsSchema.parse(input);
|
|
18852
19478
|
const { width: width10, baseLength, flangeHeight, thickness } = props;
|
|
18853
|
-
const
|
|
19479
|
+
const profile5 = props.channel ? "channel" : props.angle ? "angle" : "plate";
|
|
18854
19480
|
const radius = props.insideBendRadius + thickness / 2;
|
|
18855
19481
|
const positions = [];
|
|
18856
19482
|
const indices = [];
|
|
@@ -18863,10 +19489,10 @@ function createSheetMetalMesh(input) {
|
|
|
18863
19489
|
addTriangle([vertices[0], vertices[1], vertices[2]], reverse);
|
|
18864
19490
|
addTriangle([vertices[0], vertices[2], vertices[3]], reverse);
|
|
18865
19491
|
};
|
|
18866
|
-
const panels =
|
|
19492
|
+
const panels = profile5 === "plate" ? ["base"] : profile5 === "angle" ? ["base", "right"] : ["base", "left", "right"];
|
|
18867
19493
|
for (const hole of props.holes) {
|
|
18868
19494
|
if (!panels.includes(hole.panel))
|
|
18869
|
-
throw new Error(`No ${hole.panel} panel on ${
|
|
19495
|
+
throw new Error(`No ${hole.panel} panel on ${profile5}`);
|
|
18870
19496
|
}
|
|
18871
19497
|
for (const panel of panels) {
|
|
18872
19498
|
const length32 = panel === "base" ? baseLength : flangeHeight;
|
|
@@ -18917,7 +19543,7 @@ function createSheetMetalMesh(input) {
|
|
|
18917
19543
|
for (const [loopIndex, loop] of loops.entries())
|
|
18918
19544
|
for (let i = 0; i < loop.length; i++) {
|
|
18919
19545
|
const a = loop[i], b = loop[(i + 1) % loop.length];
|
|
18920
|
-
if (loopIndex === 0 && a.u === b.u && (panel === "base" && (a.u > 0 &&
|
|
19546
|
+
if (loopIndex === 0 && a.u === b.u && (panel === "base" && (a.u > 0 && profile5 !== "plate" || a.u < 0 && profile5 === "channel") || panel !== "base" && a.u < 0))
|
|
18921
19547
|
continue;
|
|
18922
19548
|
addQuad(
|
|
18923
19549
|
[
|
|
@@ -18930,7 +19556,7 @@ function createSheetMetalMesh(input) {
|
|
|
18930
19556
|
);
|
|
18931
19557
|
}
|
|
18932
19558
|
}
|
|
18933
|
-
const sides =
|
|
19559
|
+
const sides = profile5 === "plate" ? [] : profile5 === "angle" ? [1] : [-1, 1];
|
|
18934
19560
|
for (const side of sides) {
|
|
18935
19561
|
const project = (angle, crossSection) => {
|
|
18936
19562
|
const r = radius - crossSection.offset;
|
|
@@ -18975,7 +19601,7 @@ function createSheetMetalGeom(input) {
|
|
|
18975
19601
|
return indexedMeshToGeom3(createSheetMetalMesh(input));
|
|
18976
19602
|
}
|
|
18977
19603
|
function SheetMetal({ color = "#737e8f", ...props }) {
|
|
18978
|
-
return /* @__PURE__ */ jsx93(Colorize46, { color, material: componentMaterials.brushedMetal, children: /* @__PURE__ */ jsx93(
|
|
19604
|
+
return /* @__PURE__ */ jsx93(Colorize46, { color, material: componentMaterials.brushedMetal, children: /* @__PURE__ */ jsx93(Custom37, { geometry: createSheetMetalGeom(props) }) });
|
|
18979
19605
|
}
|
|
18980
19606
|
|
|
18981
19607
|
// lib/models/sheetmetal/register.tsx
|
|
@@ -18991,7 +19617,7 @@ function register93(registry2) {
|
|
|
18991
19617
|
}
|
|
18992
19618
|
|
|
18993
19619
|
// lib/models/slottedchannel/SlottedChannel.tsx
|
|
18994
|
-
import { Colorize as Colorize47, Custom as
|
|
19620
|
+
import { Colorize as Colorize47, Custom as Custom38 } from "jscad-fiber";
|
|
18995
19621
|
|
|
18996
19622
|
// lib/models/slottedchannel/mesh.ts
|
|
18997
19623
|
function quarterBend2(radius, thickness) {
|
|
@@ -19119,7 +19745,7 @@ function SlottedChannel({
|
|
|
19119
19745
|
color = "#8995a3",
|
|
19120
19746
|
...props
|
|
19121
19747
|
}) {
|
|
19122
|
-
return /* @__PURE__ */ jsx95(Colorize47, { color, children: /* @__PURE__ */ jsx95(
|
|
19748
|
+
return /* @__PURE__ */ jsx95(Colorize47, { color, children: /* @__PURE__ */ jsx95(Custom38, { geometry: createSlottedChannelGeom(props) }) });
|
|
19123
19749
|
}
|
|
19124
19750
|
|
|
19125
19751
|
// lib/models/slottedchannel/register.tsx
|
|
@@ -19135,7 +19761,7 @@ function register94(registry2) {
|
|
|
19135
19761
|
}
|
|
19136
19762
|
|
|
19137
19763
|
// lib/models/spacer/Spacer.tsx
|
|
19138
|
-
import { Colorize as Colorize48, Custom as
|
|
19764
|
+
import { Colorize as Colorize48, Custom as Custom39 } from "jscad-fiber";
|
|
19139
19765
|
|
|
19140
19766
|
// lib/models/spacer/mesh.ts
|
|
19141
19767
|
function createSpacerMesh(input) {
|
|
@@ -19154,7 +19780,7 @@ function createSpacerGeom(input) {
|
|
|
19154
19780
|
return indexedMeshToGeom3(createSpacerMesh(input));
|
|
19155
19781
|
}
|
|
19156
19782
|
function Spacer({ color = "#a18450", ...props }) {
|
|
19157
|
-
return /* @__PURE__ */ jsx97(Colorize48, { color, children: /* @__PURE__ */ jsx97(
|
|
19783
|
+
return /* @__PURE__ */ jsx97(Colorize48, { color, children: /* @__PURE__ */ jsx97(Custom39, { geometry: createSpacerGeom(props) }) });
|
|
19158
19784
|
}
|
|
19159
19785
|
|
|
19160
19786
|
// lib/models/spacer/register.tsx
|
|
@@ -19170,7 +19796,7 @@ function register95(registry2) {
|
|
|
19170
19796
|
}
|
|
19171
19797
|
|
|
19172
19798
|
// lib/models/splitgrommet/SplitGrommet.tsx
|
|
19173
|
-
import { Colorize as Colorize49, Custom as
|
|
19799
|
+
import { Colorize as Colorize49, Custom as Custom40 } from "jscad-fiber";
|
|
19174
19800
|
|
|
19175
19801
|
// lib/models/splitgrommet/geometry.ts
|
|
19176
19802
|
import earcut6 from "earcut";
|
|
@@ -19248,7 +19874,7 @@ function SplitGrommet({
|
|
|
19248
19874
|
color = "#394553",
|
|
19249
19875
|
...props
|
|
19250
19876
|
}) {
|
|
19251
|
-
return /* @__PURE__ */ jsx99(Colorize49, { color, children: /* @__PURE__ */ jsx99(
|
|
19877
|
+
return /* @__PURE__ */ jsx99(Colorize49, { color, children: /* @__PURE__ */ jsx99(Custom40, { geometry: createSplitGrommetGeom(props) }) });
|
|
19252
19878
|
}
|
|
19253
19879
|
|
|
19254
19880
|
// lib/models/splitgrommet/register.tsx
|
|
@@ -19264,7 +19890,7 @@ function register96(registry2) {
|
|
|
19264
19890
|
}
|
|
19265
19891
|
|
|
19266
19892
|
// lib/models/splitwasher/SplitWasher.tsx
|
|
19267
|
-
import { Colorize as Colorize50, Custom as
|
|
19893
|
+
import { Colorize as Colorize50, Custom as Custom41 } from "jscad-fiber";
|
|
19268
19894
|
|
|
19269
19895
|
// lib/models/splitwasher/mesh.ts
|
|
19270
19896
|
function createSplitWasherMesh(input, options = {}) {
|
|
@@ -19323,7 +19949,7 @@ function createSplitWasherGeom(input) {
|
|
|
19323
19949
|
return indexedMeshToGeom3(createSplitWasherMesh(input));
|
|
19324
19950
|
}
|
|
19325
19951
|
function SplitWasher({ color = "#929ba6", ...props }) {
|
|
19326
|
-
return /* @__PURE__ */ jsx101(Colorize50, { color, children: /* @__PURE__ */ jsx101(
|
|
19952
|
+
return /* @__PURE__ */ jsx101(Colorize50, { color, children: /* @__PURE__ */ jsx101(Custom41, { geometry: createSplitWasherGeom(props) }) });
|
|
19327
19953
|
}
|
|
19328
19954
|
|
|
19329
19955
|
// lib/models/splitwasher/register.tsx
|
|
@@ -19339,13 +19965,13 @@ function register97(registry2) {
|
|
|
19339
19965
|
}
|
|
19340
19966
|
|
|
19341
19967
|
// lib/SpurGear.tsx
|
|
19342
|
-
import { Colorize as Colorize51, Custom as
|
|
19968
|
+
import { Colorize as Colorize51, Custom as Custom42 } from "jscad-fiber";
|
|
19343
19969
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
19344
19970
|
function createSpurGearGeom(input) {
|
|
19345
19971
|
return indexedMeshToGeom3(createSpurGearMesh(input));
|
|
19346
19972
|
}
|
|
19347
19973
|
function SpurGear({ color = "#737e8f", ...props }) {
|
|
19348
|
-
return /* @__PURE__ */ jsx103(Colorize51, { color, children: /* @__PURE__ */ jsx103(
|
|
19974
|
+
return /* @__PURE__ */ jsx103(Colorize51, { color, children: /* @__PURE__ */ jsx103(Custom42, { geometry: createSpurGearGeom(props) }) });
|
|
19349
19975
|
}
|
|
19350
19976
|
|
|
19351
19977
|
// lib/models/spurgear/register.tsx
|
|
@@ -19361,7 +19987,7 @@ function register98(registry2) {
|
|
|
19361
19987
|
}
|
|
19362
19988
|
|
|
19363
19989
|
// lib/models/threadedrod/ThreadedRod.tsx
|
|
19364
|
-
import { Colorize as Colorize52, Custom as
|
|
19990
|
+
import { Colorize as Colorize52, Custom as Custom43 } from "jscad-fiber";
|
|
19365
19991
|
|
|
19366
19992
|
// lib/models/threadedrod/mesh.ts
|
|
19367
19993
|
function resolution6(options) {
|
|
@@ -19447,7 +20073,7 @@ function createThreadedRodGeom(input, resolution7) {
|
|
|
19447
20073
|
return indexedMeshToGeom3(createThreadedRodMesh(input, resolution7));
|
|
19448
20074
|
}
|
|
19449
20075
|
function ThreadedRod({ color = "#737e8f", ...props }) {
|
|
19450
|
-
return /* @__PURE__ */ jsx105(Colorize52, { color, children: /* @__PURE__ */ jsx105(
|
|
20076
|
+
return /* @__PURE__ */ jsx105(Colorize52, { color, children: /* @__PURE__ */ jsx105(Custom43, { geometry: createThreadedRodGeom(props) }) });
|
|
19451
20077
|
}
|
|
19452
20078
|
|
|
19453
20079
|
// lib/models/threadedrod/register.tsx
|
|
@@ -19463,7 +20089,7 @@ function register99(registry2) {
|
|
|
19463
20089
|
}
|
|
19464
20090
|
|
|
19465
20091
|
// lib/models/torsionspring/TorsionSpring.tsx
|
|
19466
|
-
import { Colorize as Colorize53, Custom as
|
|
20092
|
+
import { Colorize as Colorize53, Custom as Custom44 } from "jscad-fiber";
|
|
19467
20093
|
|
|
19468
20094
|
// lib/models/torsionspring/mesh.ts
|
|
19469
20095
|
function createTorsionSpringMesh(input, options = {}) {
|
|
@@ -19548,7 +20174,7 @@ function TorsionSpring({
|
|
|
19548
20174
|
color = "#929ba6",
|
|
19549
20175
|
...props
|
|
19550
20176
|
}) {
|
|
19551
|
-
return /* @__PURE__ */ jsx107(Colorize53, { color, children: /* @__PURE__ */ jsx107(
|
|
20177
|
+
return /* @__PURE__ */ jsx107(Colorize53, { color, children: /* @__PURE__ */ jsx107(Custom44, { geometry: createTorsionSpringGeom(props) }) });
|
|
19552
20178
|
}
|
|
19553
20179
|
|
|
19554
20180
|
// lib/models/torsionspring/register.tsx
|
|
@@ -19564,10 +20190,10 @@ function register100(registry2) {
|
|
|
19564
20190
|
}
|
|
19565
20191
|
|
|
19566
20192
|
// lib/models/tslotcoverstrip/TSlotCoverStrip.tsx
|
|
19567
|
-
import { Colorize as Colorize54, Custom as
|
|
20193
|
+
import { Colorize as Colorize54, Custom as Custom45 } from "jscad-fiber";
|
|
19568
20194
|
|
|
19569
20195
|
// lib/models/tslotcoverstrip/geometry.ts
|
|
19570
|
-
import
|
|
20196
|
+
import jscad19 from "@jscad/modeling";
|
|
19571
20197
|
var {
|
|
19572
20198
|
primitives: primitives8,
|
|
19573
20199
|
extrusions: extrusions8,
|
|
@@ -19575,8 +20201,8 @@ var {
|
|
|
19575
20201
|
geometries: geometries8,
|
|
19576
20202
|
modifiers: modifiers7,
|
|
19577
20203
|
measurements: measurements8
|
|
19578
|
-
} =
|
|
19579
|
-
var
|
|
20204
|
+
} = jscad19;
|
|
20205
|
+
var generalize7 = modifiers7.generalize;
|
|
19580
20206
|
function createTSlotCoverStripGeom(input) {
|
|
19581
20207
|
const p = tSlotCoverStripModelPropsSchema.parse(input);
|
|
19582
20208
|
const w = p.width / 2;
|
|
@@ -19603,7 +20229,7 @@ function createTSlotCoverStripGeom(input) {
|
|
|
19603
20229
|
return extrusions8.extrudeLinear({ height: p.length }, outline);
|
|
19604
20230
|
}
|
|
19605
20231
|
function createTSlotCoverStripMesh(input) {
|
|
19606
|
-
const geom =
|
|
20232
|
+
const geom = generalize7(
|
|
19607
20233
|
{ snap: false, triangulate: true },
|
|
19608
20234
|
createTSlotCoverStripGeom(input)
|
|
19609
20235
|
);
|
|
@@ -19643,7 +20269,7 @@ function TSlotCoverStrip({
|
|
|
19643
20269
|
color = "#465564",
|
|
19644
20270
|
...props
|
|
19645
20271
|
}) {
|
|
19646
|
-
return /* @__PURE__ */ jsx109(Colorize54, { color, children: /* @__PURE__ */ jsx109(
|
|
20272
|
+
return /* @__PURE__ */ jsx109(Colorize54, { color, children: /* @__PURE__ */ jsx109(Custom45, { geometry: createTSlotCoverStripGeom(props) }) });
|
|
19647
20273
|
}
|
|
19648
20274
|
|
|
19649
20275
|
// lib/models/tslotcoverstrip/register.tsx
|
|
@@ -19659,7 +20285,7 @@ function register101(registry2) {
|
|
|
19659
20285
|
}
|
|
19660
20286
|
|
|
19661
20287
|
// lib/models/tslotextrusion/TSlotExtrusion.tsx
|
|
19662
|
-
import { Colorize as Colorize55, Custom as
|
|
20288
|
+
import { Colorize as Colorize55, Custom as Custom46 } from "jscad-fiber";
|
|
19663
20289
|
|
|
19664
20290
|
// lib/models/tslotextrusion/mesh.ts
|
|
19665
20291
|
function createTSlotExtrusionMesh(input = {}) {
|
|
@@ -19714,7 +20340,7 @@ function TSlotExtrusion({
|
|
|
19714
20340
|
color = "#8995a3",
|
|
19715
20341
|
...props
|
|
19716
20342
|
}) {
|
|
19717
|
-
return /* @__PURE__ */ jsx111(Colorize55, { color, children: /* @__PURE__ */ jsx111(
|
|
20343
|
+
return /* @__PURE__ */ jsx111(Colorize55, { color, children: /* @__PURE__ */ jsx111(Custom46, { geometry: createTSlotExtrusionGeom(props) }) });
|
|
19718
20344
|
}
|
|
19719
20345
|
|
|
19720
20346
|
// lib/models/tslotextrusion/register.tsx
|
|
@@ -19730,7 +20356,7 @@ function register102(registry2) {
|
|
|
19730
20356
|
}
|
|
19731
20357
|
|
|
19732
20358
|
// lib/models/tslotgusset/TSlotGusset.tsx
|
|
19733
|
-
import { Colorize as Colorize56, Custom as
|
|
20359
|
+
import { Colorize as Colorize56, Custom as Custom47 } from "jscad-fiber";
|
|
19734
20360
|
|
|
19735
20361
|
// lib/models/tslotgusset/mesh.ts
|
|
19736
20362
|
function createTSlotGussetMesh(input = {}) {
|
|
@@ -19772,7 +20398,7 @@ function createTSlotGussetGeom(input = {}) {
|
|
|
19772
20398
|
return indexedMeshToGeom3(createTSlotGussetMesh(input));
|
|
19773
20399
|
}
|
|
19774
20400
|
function TSlotGusset({ color = "#8995a3", ...props }) {
|
|
19775
|
-
return /* @__PURE__ */ jsx113(Colorize56, { color, children: /* @__PURE__ */ jsx113(
|
|
20401
|
+
return /* @__PURE__ */ jsx113(Colorize56, { color, children: /* @__PURE__ */ jsx113(Custom47, { geometry: createTSlotGussetGeom(props) }) });
|
|
19776
20402
|
}
|
|
19777
20403
|
|
|
19778
20404
|
// lib/models/tslotgusset/register.tsx
|
|
@@ -19788,7 +20414,7 @@ function register103(registry2) {
|
|
|
19788
20414
|
}
|
|
19789
20415
|
|
|
19790
20416
|
// lib/models/tslotinsidecorner/TSlotInsideCorner.tsx
|
|
19791
|
-
import { Colorize as Colorize57, Custom as
|
|
20417
|
+
import { Colorize as Colorize57, Custom as Custom48 } from "jscad-fiber";
|
|
19792
20418
|
|
|
19793
20419
|
// lib/models/tslotinsidecorner/mesh.ts
|
|
19794
20420
|
function createTSlotInsideCornerMesh(input = {}) {
|
|
@@ -19858,7 +20484,7 @@ function TSlotInsideCorner({
|
|
|
19858
20484
|
color = "#8995a3",
|
|
19859
20485
|
...props
|
|
19860
20486
|
}) {
|
|
19861
|
-
return /* @__PURE__ */ jsx115(Colorize57, { color, children: /* @__PURE__ */ jsx115(
|
|
20487
|
+
return /* @__PURE__ */ jsx115(Colorize57, { color, children: /* @__PURE__ */ jsx115(Custom48, { geometry: createTSlotInsideCornerGeom(props) }) });
|
|
19862
20488
|
}
|
|
19863
20489
|
|
|
19864
20490
|
// lib/models/tslotinsidecorner/register.tsx
|
|
@@ -19874,13 +20500,13 @@ function register104(registry2) {
|
|
|
19874
20500
|
}
|
|
19875
20501
|
|
|
19876
20502
|
// lib/models/ufl/Ufl.tsx
|
|
19877
|
-
import { Colorize as Colorize58, Custom as
|
|
20503
|
+
import { Colorize as Colorize58, Custom as Custom49 } from "jscad-fiber";
|
|
19878
20504
|
|
|
19879
20505
|
// lib/models/ufl/geometry.ts
|
|
19880
|
-
import
|
|
20506
|
+
import jscad20 from "@jscad/modeling";
|
|
19881
20507
|
function createUflGeometries(input = {}) {
|
|
19882
20508
|
const d = getUflDimensions(input);
|
|
19883
|
-
const { booleans: booleans5, primitives: primitives9 } =
|
|
20509
|
+
const { booleans: booleans5, primitives: primitives9 } = jscad20;
|
|
19884
20510
|
const silver = "#bcbfc3";
|
|
19885
20511
|
const dielectric = "#eee9d5";
|
|
19886
20512
|
const gold = "#d9b45b";
|
|
@@ -19973,7 +20599,7 @@ function createUflGeometries(input = {}) {
|
|
|
19973
20599
|
// lib/models/ufl/Ufl.tsx
|
|
19974
20600
|
import { Fragment as Fragment19, jsx as jsx117 } from "react/jsx-runtime";
|
|
19975
20601
|
function Ufl(props) {
|
|
19976
|
-
return /* @__PURE__ */ jsx117(Fragment19, { children: createUflGeometries(props).map(({ geom, color }, index) => /* @__PURE__ */ jsx117(Colorize58, { color, children: /* @__PURE__ */ jsx117(
|
|
20602
|
+
return /* @__PURE__ */ jsx117(Fragment19, { children: createUflGeometries(props).map(({ geom, color }, index) => /* @__PURE__ */ jsx117(Colorize58, { color, children: /* @__PURE__ */ jsx117(Custom49, { geometry: geom }) }, index)) });
|
|
19977
20603
|
}
|
|
19978
20604
|
|
|
19979
20605
|
// lib/models/ufl/register.tsx
|
|
@@ -19989,7 +20615,7 @@ function register105(registry2) {
|
|
|
19989
20615
|
}
|
|
19990
20616
|
|
|
19991
20617
|
// lib/WormGear.tsx
|
|
19992
|
-
import { Colorize as Colorize59, Custom as
|
|
20618
|
+
import { Colorize as Colorize59, Custom as Custom50 } from "jscad-fiber";
|
|
19993
20619
|
|
|
19994
20620
|
// lib/mechanical/worm-gear-mesh.ts
|
|
19995
20621
|
import earcut7 from "earcut";
|
|
@@ -20042,17 +20668,17 @@ var createWormGearMesh = (input) => {
|
|
|
20042
20668
|
fractions.push(fraction);
|
|
20043
20669
|
}
|
|
20044
20670
|
}
|
|
20045
|
-
const
|
|
20671
|
+
const profile5 = [];
|
|
20046
20672
|
for (let start = 0; start < props.starts; start++) {
|
|
20047
20673
|
for (const fraction of fractions) {
|
|
20048
20674
|
const distance2 = Math.min(fraction, 1 - fraction) * axialPitch;
|
|
20049
|
-
|
|
20675
|
+
profile5.push({
|
|
20050
20676
|
angle: (start + fraction) * Math.PI * 2 / props.starts,
|
|
20051
20677
|
radius: distance2 <= tipHalfWidth ? outsideRadius : distance2 >= rootHalfWidth ? rootRadius : pitchRadius + (toothThickness / 2 - distance2) / pressureTangent
|
|
20052
20678
|
});
|
|
20053
20679
|
}
|
|
20054
20680
|
}
|
|
20055
|
-
const count =
|
|
20681
|
+
const count = profile5.length;
|
|
20056
20682
|
const positions = [];
|
|
20057
20683
|
const indices = [];
|
|
20058
20684
|
const phase = props.phase % 360 * Math.PI / 180;
|
|
@@ -20060,7 +20686,7 @@ var createWormGearMesh = (input) => {
|
|
|
20060
20686
|
const ring = (z) => {
|
|
20061
20687
|
const first = positions.length / 3;
|
|
20062
20688
|
const rotation = phase + direction * (z / lead) * Math.PI * 2;
|
|
20063
|
-
for (const sample of
|
|
20689
|
+
for (const sample of profile5) {
|
|
20064
20690
|
const angle = sample.angle + rotation;
|
|
20065
20691
|
positions.push(
|
|
20066
20692
|
sample.radius * Math.cos(angle),
|
|
@@ -20170,7 +20796,7 @@ function createWormGearGeom(input) {
|
|
|
20170
20796
|
return indexedMeshToGeom3(createWormGearMesh(input));
|
|
20171
20797
|
}
|
|
20172
20798
|
function WormGear({ color = "#737e8f", ...props }) {
|
|
20173
|
-
return /* @__PURE__ */ jsx119(Colorize59, { color, children: /* @__PURE__ */ jsx119(
|
|
20799
|
+
return /* @__PURE__ */ jsx119(Colorize59, { color, children: /* @__PURE__ */ jsx119(Custom50, { geometry: createWormGearGeom(props) }) });
|
|
20174
20800
|
}
|
|
20175
20801
|
|
|
20176
20802
|
// lib/models/wormgear/register.tsx
|
|
@@ -20186,7 +20812,7 @@ function register106(registry2) {
|
|
|
20186
20812
|
}
|
|
20187
20813
|
|
|
20188
20814
|
// lib/models/zeebar/ZeeBar.tsx
|
|
20189
|
-
import { Colorize as Colorize60, Custom as
|
|
20815
|
+
import { Colorize as Colorize60, Custom as Custom51 } from "jscad-fiber";
|
|
20190
20816
|
|
|
20191
20817
|
// lib/models/zeebar/mesh.ts
|
|
20192
20818
|
function filletedOutline2(points, radii) {
|
|
@@ -20253,7 +20879,7 @@ function createZeeBarGeom(input) {
|
|
|
20253
20879
|
return indexedMeshToGeom3(createZeeBarMesh(input));
|
|
20254
20880
|
}
|
|
20255
20881
|
function ZeeBar({ color = "#8995a3", ...props }) {
|
|
20256
|
-
return /* @__PURE__ */ jsx121(Colorize60, { color, children: /* @__PURE__ */ jsx121(
|
|
20882
|
+
return /* @__PURE__ */ jsx121(Colorize60, { color, children: /* @__PURE__ */ jsx121(Custom51, { geometry: createZeeBarGeom(props) }) });
|
|
20257
20883
|
}
|
|
20258
20884
|
|
|
20259
20885
|
// lib/models/zeebar/register.tsx
|
|
@@ -20330,7 +20956,7 @@ var modelRendererRegistry = new ModelRendererRegistry();
|
|
|
20330
20956
|
registerAllModelRenderers(modelRendererRegistry);
|
|
20331
20957
|
|
|
20332
20958
|
// lib/ExtrudedPads.tsx
|
|
20333
|
-
import { Fragment as Fragment20, jsx as jsx123, jsxs as
|
|
20959
|
+
import { Fragment as Fragment20, jsx as jsx123, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
20334
20960
|
var ExtrudedPads = ({
|
|
20335
20961
|
circuitJson,
|
|
20336
20962
|
footprint
|
|
@@ -20346,7 +20972,7 @@ var ExtrudedPads = ({
|
|
|
20346
20972
|
}
|
|
20347
20973
|
if (!circuitJson)
|
|
20348
20974
|
throw new Error("No circuit json or footprint provided to ExtrudedPads");
|
|
20349
|
-
return /* @__PURE__ */
|
|
20975
|
+
return /* @__PURE__ */ jsxs20(Fragment20, { children: [
|
|
20350
20976
|
circuitJson.filter((s) => s.type === "pcb_smtpad").map((pad, i) => {
|
|
20351
20977
|
const isPin1 = pad.port_hints?.includes("1");
|
|
20352
20978
|
return (
|
|
@@ -20370,11 +20996,11 @@ import {
|
|
|
20370
20996
|
Cuboid as Cuboid17,
|
|
20371
20997
|
Cylinder as Cylinder6,
|
|
20372
20998
|
Hull as Hull5,
|
|
20373
|
-
Subtract as
|
|
20999
|
+
Subtract as Subtract6,
|
|
20374
21000
|
Translate as Translate9,
|
|
20375
21001
|
Union as Union3
|
|
20376
21002
|
} from "jscad-fiber";
|
|
20377
|
-
import { Fragment as Fragment21, jsx as jsx124, jsxs as
|
|
21003
|
+
import { Fragment as Fragment21, jsx as jsx124, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
20378
21004
|
function createDualRowGullWing(p) {
|
|
20379
21005
|
const {
|
|
20380
21006
|
pinCount,
|
|
@@ -20422,7 +21048,7 @@ function createDualRowGullWing(p) {
|
|
|
20422
21048
|
throw new Error("Exposed pad must fit inside the bottom mold face");
|
|
20423
21049
|
const midZ = standoff + moldHeight / 2;
|
|
20424
21050
|
const slice = Math.min(2e-3, moldHeight / 100);
|
|
20425
|
-
const body = /* @__PURE__ */
|
|
21051
|
+
const body = /* @__PURE__ */ jsxs21(Hull5, { children: [
|
|
20426
21052
|
/* @__PURE__ */ jsx124(Translate9, { z: standoff + slice / 2, children: /* @__PURE__ */ jsx124(
|
|
20427
21053
|
Cuboid17,
|
|
20428
21054
|
{
|
|
@@ -20465,13 +21091,13 @@ function createDualRowGullWing(p) {
|
|
|
20465
21091
|
}
|
|
20466
21092
|
points.push([root, midZ]);
|
|
20467
21093
|
const section = ([x, z]) => /* @__PURE__ */ jsx124(Translate9, { offset: { x: side * x, y, z }, children: /* @__PURE__ */ jsx124(Cuboid17, { size: [slice, leadWidth, leadThickness] }) });
|
|
20468
|
-
return /* @__PURE__ */ jsx124(Union3, { children: points.slice(1).map((point, i) => /* @__PURE__ */
|
|
21094
|
+
return /* @__PURE__ */ jsx124(Union3, { children: points.slice(1).map((point, i) => /* @__PURE__ */ jsxs21(Hull5, { children: [
|
|
20469
21095
|
section(points[i]),
|
|
20470
21096
|
section(point)
|
|
20471
21097
|
] }, i)) });
|
|
20472
21098
|
};
|
|
20473
|
-
return /* @__PURE__ */
|
|
20474
|
-
/* @__PURE__ */ jsx124(Colorize61, { color: "#353535", children: /* @__PURE__ */
|
|
21099
|
+
return /* @__PURE__ */ jsxs21(Fragment21, { children: [
|
|
21100
|
+
/* @__PURE__ */ jsx124(Colorize61, { color: "#353535", children: /* @__PURE__ */ jsxs21(Subtract6, { children: [
|
|
20475
21101
|
body,
|
|
20476
21102
|
/* @__PURE__ */ jsx124(
|
|
20477
21103
|
Translate9,
|
|
@@ -20579,7 +21205,7 @@ import { fp as fp10 } from "@tscircuit/footprinter";
|
|
|
20579
21205
|
import { Rotate as Rotate24, Translate as Translate46 } from "jscad-fiber";
|
|
20580
21206
|
|
|
20581
21207
|
// lib/DualInlinePackage.tsx
|
|
20582
|
-
import { Polygon as
|
|
21208
|
+
import { Polygon as Polygon4, ExtrudeLinear as ExtrudeLinear4, Rotate as Rotate5, Translate as Translate10 } from "jscad-fiber";
|
|
20583
21209
|
|
|
20584
21210
|
// lib/utils/range.ts
|
|
20585
21211
|
var range = (end) => Array.from({ length: end }, (_, i) => i);
|
|
@@ -20644,7 +21270,7 @@ function getExpandedStroke(strokeInput, width10) {
|
|
|
20644
21270
|
}
|
|
20645
21271
|
|
|
20646
21272
|
// lib/DualInlinePackage.tsx
|
|
20647
|
-
import { Fragment as Fragment22, jsx as jsx126, jsxs as
|
|
21273
|
+
import { Fragment as Fragment22, jsx as jsx126, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
20648
21274
|
var normalizeOnY = (points) => {
|
|
20649
21275
|
const minX = Math.min(...points.map((p) => p.x));
|
|
20650
21276
|
const maxX = Math.max(...points.map((p) => p.x));
|
|
@@ -20673,14 +21299,14 @@ var DIP_PIN_HEIGHT = 5.47;
|
|
|
20673
21299
|
var heightAboveSurface = 0.5;
|
|
20674
21300
|
var DipPinLeg = ({ x, y, z }) => {
|
|
20675
21301
|
const isRotated = x > 0;
|
|
20676
|
-
return /* @__PURE__ */
|
|
21302
|
+
return /* @__PURE__ */ jsxs22(Fragment22, { children: [
|
|
20677
21303
|
/* @__PURE__ */ jsx126(
|
|
20678
21304
|
Translate10,
|
|
20679
21305
|
{
|
|
20680
21306
|
material: componentMaterials.tinnedLead,
|
|
20681
21307
|
offset: { x: x + 0.25 / 2, y, z },
|
|
20682
|
-
children: /* @__PURE__ */ jsx126(Rotate5, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx126(
|
|
20683
|
-
|
|
21308
|
+
children: /* @__PURE__ */ jsx126(Rotate5, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx126(ExtrudeLinear4, { height: 0.25, children: /* @__PURE__ */ jsx126(
|
|
21309
|
+
Polygon4,
|
|
20684
21310
|
{
|
|
20685
21311
|
points: svgPathPoints.slice().reverse().map((p) => [p.x, p.y])
|
|
20686
21312
|
}
|
|
@@ -20695,8 +21321,8 @@ var DipPinLeg = ({ x, y, z }) => {
|
|
|
20695
21321
|
y: y + (isRotated ? 1 : -1),
|
|
20696
21322
|
z
|
|
20697
21323
|
},
|
|
20698
|
-
children: /* @__PURE__ */ jsx126(Rotate5, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ jsx126(
|
|
20699
|
-
|
|
21324
|
+
children: /* @__PURE__ */ jsx126(Rotate5, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ jsx126(ExtrudeLinear4, { height: 2, children: /* @__PURE__ */ jsx126(
|
|
21325
|
+
Polygon4,
|
|
20700
21326
|
{
|
|
20701
21327
|
points: getExpandedStroke(
|
|
20702
21328
|
[
|
|
@@ -20721,7 +21347,7 @@ var Dip = ({
|
|
|
20721
21347
|
const numPinsOnEachSide = Math.floor(numPins / 2);
|
|
20722
21348
|
const pinRowSpacing = rowSpacing ?? (bodyWidth >= 7 ? bodyWidth : bodyWidth + 1.22);
|
|
20723
21349
|
const chipBodyWidth = bodyWidth >= 7 ? pinRowSpacing - 1.22 : bodyWidth;
|
|
20724
|
-
return /* @__PURE__ */
|
|
21350
|
+
return /* @__PURE__ */ jsxs22(Fragment22, { children: [
|
|
20725
21351
|
range(numPins).map((i) => {
|
|
20726
21352
|
const yRow = i % numPinsOnEachSide;
|
|
20727
21353
|
const xRow = (Math.floor(i / numPinsOnEachSide) - 0.5) * 2;
|
|
@@ -20750,8 +21376,8 @@ var Dip = ({
|
|
|
20750
21376
|
|
|
20751
21377
|
// lib/SmdChipLead.tsx
|
|
20752
21378
|
import {
|
|
20753
|
-
Polygon as
|
|
20754
|
-
ExtrudeLinear as
|
|
21379
|
+
Polygon as Polygon5,
|
|
21380
|
+
ExtrudeLinear as ExtrudeLinear5,
|
|
20755
21381
|
Translate as Translate11,
|
|
20756
21382
|
Rotate as Rotate6,
|
|
20757
21383
|
Colorize as Colorize62
|
|
@@ -20782,11 +21408,11 @@ var SmdChipLead = (props) => {
|
|
|
20782
21408
|
const N = 15;
|
|
20783
21409
|
const points = Array.from({ length: N }).map((_, i) => i / (N - 1) * bodyDistance).map((x) => [x, calculateSCurve(x, props)]);
|
|
20784
21410
|
const polygon4 = getExpandedStroke(points, thickness);
|
|
20785
|
-
return /* @__PURE__ */ jsx127(Colorize62, { color: "#c4c7ca", material: componentMaterials.tinnedLead, children: /* @__PURE__ */ jsx127(Translate11, { offset: { z: 0, y: 0, x: 0, ...props.position }, children: /* @__PURE__ */ jsx127(Rotate6, { rotation: ["90deg", 0, rotation ?? 0], children: /* @__PURE__ */ jsx127(Translate11, { offset: { x: 0, y: 0, z: -width10 / 2 }, children: /* @__PURE__ */ jsx127(
|
|
21411
|
+
return /* @__PURE__ */ jsx127(Colorize62, { color: "#c4c7ca", material: componentMaterials.tinnedLead, children: /* @__PURE__ */ jsx127(Translate11, { offset: { z: 0, y: 0, x: 0, ...props.position }, children: /* @__PURE__ */ jsx127(Rotate6, { rotation: ["90deg", 0, rotation ?? 0], children: /* @__PURE__ */ jsx127(Translate11, { offset: { x: 0, y: 0, z: -width10 / 2 }, children: /* @__PURE__ */ jsx127(ExtrudeLinear5, { height: width10, children: /* @__PURE__ */ jsx127(Polygon5, { points: polygon4.map((p) => [p.x, p.y]) }) }) }) }) }) });
|
|
20786
21412
|
};
|
|
20787
21413
|
|
|
20788
21414
|
// lib/Tssop.tsx
|
|
20789
|
-
import { Fragment as Fragment23, jsx as jsx128, jsxs as
|
|
21415
|
+
import { Fragment as Fragment23, jsx as jsx128, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
20790
21416
|
var LegacyTssop = ({
|
|
20791
21417
|
pinCount,
|
|
20792
21418
|
leadLength,
|
|
@@ -20812,7 +21438,7 @@ var LegacyTssop = ({
|
|
|
20812
21438
|
Math.min(bodyVisualWidth, bodyLength10) * 0.12,
|
|
20813
21439
|
0.45
|
|
20814
21440
|
);
|
|
20815
|
-
return /* @__PURE__ */
|
|
21441
|
+
return /* @__PURE__ */ jsxs23(Fragment23, { children: [
|
|
20816
21442
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx128(
|
|
20817
21443
|
SmdChipLead,
|
|
20818
21444
|
{
|
|
@@ -20868,7 +21494,7 @@ var LegacyTssop = ({
|
|
|
20868
21494
|
var Tssop = (props) => "leadSpan" in props ? createDualRowGullWing(props) : LegacyTssop(props);
|
|
20869
21495
|
|
|
20870
21496
|
// lib/MSOP.tsx
|
|
20871
|
-
import { Fragment as Fragment24, jsx as jsx129, jsxs as
|
|
21497
|
+
import { Fragment as Fragment24, jsx as jsx129, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
20872
21498
|
var LegacyMSOP = ({
|
|
20873
21499
|
pinCount,
|
|
20874
21500
|
padContactLength = 0.4,
|
|
@@ -20879,7 +21505,7 @@ var LegacyMSOP = ({
|
|
|
20879
21505
|
const sidePinCount = Math.ceil(pinCount / 2);
|
|
20880
21506
|
const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
|
|
20881
21507
|
const leadThickness = 0.2;
|
|
20882
|
-
return /* @__PURE__ */
|
|
21508
|
+
return /* @__PURE__ */ jsxs24(Fragment24, { children: [
|
|
20883
21509
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx129(
|
|
20884
21510
|
SmdChipLead,
|
|
20885
21511
|
{
|
|
@@ -20931,7 +21557,7 @@ var MSOP = (props) => "leadSpan" in props ? createDualRowGullWing(props) : Legac
|
|
|
20931
21557
|
|
|
20932
21558
|
// lib/SmdLED.tsx
|
|
20933
21559
|
import { Colorize as Colorize63, Cuboid as Cuboid18, RoundedCuboid as RoundedCuboid2, Translate as Translate12 } from "jscad-fiber";
|
|
20934
|
-
import { Fragment as Fragment25, jsx as jsx130, jsxs as
|
|
21560
|
+
import { Fragment as Fragment25, jsx as jsx130, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
20935
21561
|
var smdLedDimensions = {
|
|
20936
21562
|
"0402": { length: 1, width: 0.5, height: 0.5, terminalLength: 0.2 },
|
|
20937
21563
|
"0603": { length: 1.62, width: 0.8, height: 0.615, terminalLength: 0.21 },
|
|
@@ -20943,7 +21569,7 @@ function SmdLED({
|
|
|
20943
21569
|
}) {
|
|
20944
21570
|
const p = smdLedDimensions[footprint];
|
|
20945
21571
|
if (footprint === "0603")
|
|
20946
|
-
return /* @__PURE__ */
|
|
21572
|
+
return /* @__PURE__ */ jsxs25(Fragment25, { children: [
|
|
20947
21573
|
/* @__PURE__ */ jsx130(Colorize63, { color: "#f0eee7", children: /* @__PURE__ */ jsx130(
|
|
20948
21574
|
RoundedCuboid2,
|
|
20949
21575
|
{
|
|
@@ -20964,7 +21590,7 @@ function SmdLED({
|
|
|
20964
21590
|
] });
|
|
20965
21591
|
const terminalThickness = Math.min(0.1, p.height / 4);
|
|
20966
21592
|
const apertureHeight = 0.02;
|
|
20967
|
-
return /* @__PURE__ */
|
|
21593
|
+
return /* @__PURE__ */ jsxs25(Fragment25, { children: [
|
|
20968
21594
|
/* @__PURE__ */ jsx130(Colorize63, { color: "#f0eee7", children: /* @__PURE__ */ jsx130(Translate12, { z: (p.height + terminalThickness - apertureHeight) / 2, children: /* @__PURE__ */ jsx130(
|
|
20969
21595
|
Cuboid18,
|
|
20970
21596
|
{
|
|
@@ -20992,7 +21618,7 @@ function SmdLED({
|
|
|
20992
21618
|
}
|
|
20993
21619
|
|
|
20994
21620
|
// lib/qfp.tsx
|
|
20995
|
-
import { Fragment as Fragment26, jsx as jsx131, jsxs as
|
|
21621
|
+
import { Fragment as Fragment26, jsx as jsx131, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
20996
21622
|
var QFP = ({
|
|
20997
21623
|
pinCount,
|
|
20998
21624
|
pitch,
|
|
@@ -21016,7 +21642,7 @@ var QFP = ({
|
|
|
21016
21642
|
const bodyDistance = leadReach;
|
|
21017
21643
|
const fullPadContactLength = leadReach * 0.5;
|
|
21018
21644
|
const curveLength = leadReach * 0.18;
|
|
21019
|
-
return /* @__PURE__ */
|
|
21645
|
+
return /* @__PURE__ */ jsxs26(Fragment26, { children: [
|
|
21020
21646
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx131(
|
|
21021
21647
|
SmdChipLead,
|
|
21022
21648
|
{
|
|
@@ -21151,7 +21777,7 @@ var getLeadWidth = (pinCount, width10) => {
|
|
|
21151
21777
|
|
|
21152
21778
|
// lib/PinHeader.tsx
|
|
21153
21779
|
import { Colorize as Colorize64, Cuboid as Cuboid19, Hull as Hull6, Rotate as Rotate7, Translate as Translate13 } from "jscad-fiber";
|
|
21154
|
-
import { Fragment as Fragment27, jsx as jsx132, jsxs as
|
|
21780
|
+
import { Fragment as Fragment27, jsx as jsx132, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
21155
21781
|
var PIN_METAL_COLOR = "#c0c0c0";
|
|
21156
21782
|
var PinHeader = ({
|
|
21157
21783
|
x,
|
|
@@ -21166,7 +21792,7 @@ var PinHeader = ({
|
|
|
21166
21792
|
smd,
|
|
21167
21793
|
rightangle
|
|
21168
21794
|
}) => {
|
|
21169
|
-
return /* @__PURE__ */
|
|
21795
|
+
return /* @__PURE__ */ jsxs27(Fragment27, { children: [
|
|
21170
21796
|
/* @__PURE__ */ jsx132(Translate13, { y: rightangle ? -3 : 0, children: /* @__PURE__ */ jsx132(
|
|
21171
21797
|
Cuboid19,
|
|
21172
21798
|
{
|
|
@@ -21196,7 +21822,7 @@ var PinHeader = ({
|
|
|
21196
21822
|
padContactLength: 2,
|
|
21197
21823
|
bodyDistance: 3
|
|
21198
21824
|
}
|
|
21199
|
-
) : /* @__PURE__ */
|
|
21825
|
+
) : /* @__PURE__ */ jsxs27(Hull6, { children: [
|
|
21200
21826
|
/* @__PURE__ */ jsx132(
|
|
21201
21827
|
Cuboid19,
|
|
21202
21828
|
{
|
|
@@ -21225,7 +21851,7 @@ var PinHeader = ({
|
|
|
21225
21851
|
{
|
|
21226
21852
|
color: PIN_METAL_COLOR,
|
|
21227
21853
|
material: componentMaterials.goldContact,
|
|
21228
|
-
children: /* @__PURE__ */ jsx132(Translate13, { y: rightangle ? -3.9 : 0, z: rightangle ? 1 : 0, children: /* @__PURE__ */ jsx132(Rotate7, { rotation: rightangle ? [-Math.PI / 2, 0, 0] : [0, 0, 0], children: /* @__PURE__ */
|
|
21854
|
+
children: /* @__PURE__ */ jsx132(Translate13, { y: rightangle ? -3.9 : 0, z: rightangle ? 1 : 0, children: /* @__PURE__ */ jsx132(Rotate7, { rotation: rightangle ? [-Math.PI / 2, 0, 0] : [0, 0, 0], children: /* @__PURE__ */ jsxs27(Hull6, { children: [
|
|
21229
21855
|
/* @__PURE__ */ jsx132(
|
|
21230
21856
|
Cuboid19,
|
|
21231
21857
|
{
|
|
@@ -21296,8 +21922,8 @@ var PinRow = ({
|
|
|
21296
21922
|
};
|
|
21297
21923
|
|
|
21298
21924
|
// lib/utils/PhysicalQfn.tsx
|
|
21299
|
-
import { Colorize as Colorize65, Cuboid as Cuboid20, Cylinder as Cylinder7, Subtract as
|
|
21300
|
-
import { Fragment as Fragment29, jsx as jsx134, jsxs as
|
|
21925
|
+
import { Colorize as Colorize65, Cuboid as Cuboid20, Cylinder as Cylinder7, Subtract as Subtract7, Translate as Translate14 } from "jscad-fiber";
|
|
21926
|
+
import { Fragment as Fragment29, jsx as jsx134, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
21301
21927
|
function createPhysicalQfn(p) {
|
|
21302
21928
|
const {
|
|
21303
21929
|
num_pins,
|
|
@@ -21342,8 +21968,8 @@ function createPhysicalQfn(p) {
|
|
|
21342
21968
|
);
|
|
21343
21969
|
const body = /* @__PURE__ */ jsx134(Translate14, { z: (bodyHeight + standoff) / 2, children: /* @__PURE__ */ jsx134(Cuboid20, { size: [bodyWidth, bodyLength10, bodyHeight - standoff] }) });
|
|
21344
21970
|
const radius = Math.min(bodyWidth, bodyLength10) * 0.035;
|
|
21345
|
-
return /* @__PURE__ */
|
|
21346
|
-
/* @__PURE__ */ jsx134(Colorize65, { color: "#353535", children: /* @__PURE__ */
|
|
21971
|
+
return /* @__PURE__ */ jsxs28(Fragment29, { children: [
|
|
21972
|
+
/* @__PURE__ */ jsx134(Colorize65, { color: "#353535", children: /* @__PURE__ */ jsxs28(Subtract7, { children: [
|
|
21347
21973
|
body,
|
|
21348
21974
|
/* @__PURE__ */ jsx134(
|
|
21349
21975
|
Translate14,
|
|
@@ -21487,7 +22113,7 @@ var getQuadPinMap = ({
|
|
|
21487
22113
|
};
|
|
21488
22114
|
|
|
21489
22115
|
// lib/qfn.tsx
|
|
21490
|
-
import { Fragment as Fragment30, jsx as jsx135, jsxs as
|
|
22116
|
+
import { Fragment as Fragment30, jsx as jsx135, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
21491
22117
|
var LegacyQFN = ({
|
|
21492
22118
|
num_pins = 16,
|
|
21493
22119
|
bodyWidth = 9,
|
|
@@ -21529,7 +22155,7 @@ var LegacyQFN = ({
|
|
|
21529
22155
|
const pn = pin_map[i + 1];
|
|
21530
22156
|
pinPositions.push({ pn, x, y, pw, pl });
|
|
21531
22157
|
}
|
|
21532
|
-
return /* @__PURE__ */
|
|
22158
|
+
return /* @__PURE__ */ jsxs29(Fragment30, { children: [
|
|
21533
22159
|
/* @__PURE__ */ jsx135(Colorize66, { material: componentMaterials.tinnedLead, color: "grey", children: /* @__PURE__ */ jsx135(
|
|
21534
22160
|
Cuboid21,
|
|
21535
22161
|
{
|
|
@@ -21562,7 +22188,7 @@ var QFN = (props) => "bodyHeight" in props ? createPhysicalQfn(props) : LegacyQF
|
|
|
21562
22188
|
var qfn_default = QFN;
|
|
21563
22189
|
|
|
21564
22190
|
// lib/SOT-235.tsx
|
|
21565
|
-
import { Fragment as Fragment31, jsx as jsx136, jsxs as
|
|
22191
|
+
import { Fragment as Fragment31, jsx as jsx136, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
21566
22192
|
var SOT235 = () => {
|
|
21567
22193
|
const fullWidth = 2.8;
|
|
21568
22194
|
const bodyWidth = 1.6;
|
|
@@ -21574,7 +22200,7 @@ var SOT235 = () => {
|
|
|
21574
22200
|
const padContactLength = 0.5;
|
|
21575
22201
|
const padPitch = 0.95;
|
|
21576
22202
|
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
21577
|
-
return /* @__PURE__ */
|
|
22203
|
+
return /* @__PURE__ */ jsxs30(Fragment31, { children: [
|
|
21578
22204
|
/* @__PURE__ */ jsx136(
|
|
21579
22205
|
SmdChipLead,
|
|
21580
22206
|
{
|
|
@@ -21671,7 +22297,7 @@ var SOT235 = () => {
|
|
|
21671
22297
|
var SOT_235_default = SOT235;
|
|
21672
22298
|
|
|
21673
22299
|
// lib/SOT-23-3P.tsx
|
|
21674
|
-
import { Fragment as Fragment32, jsx as jsx137, jsxs as
|
|
22300
|
+
import { Fragment as Fragment32, jsx as jsx137, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
21675
22301
|
var SOT233P = ({
|
|
21676
22302
|
fullWidth = 2.9,
|
|
21677
22303
|
fullLength: fullLength10 = 2.8,
|
|
@@ -21686,7 +22312,7 @@ var SOT233P = ({
|
|
|
21686
22312
|
const padContactLength = 0.4;
|
|
21687
22313
|
const padThickness = leadThickness / 2;
|
|
21688
22314
|
const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
|
|
21689
|
-
return /* @__PURE__ */
|
|
22315
|
+
return /* @__PURE__ */ jsxs31(Fragment32, { children: [
|
|
21690
22316
|
/* @__PURE__ */ jsx137(
|
|
21691
22317
|
SmdChipLead,
|
|
21692
22318
|
{
|
|
@@ -21750,7 +22376,7 @@ var SOT233P = ({
|
|
|
21750
22376
|
};
|
|
21751
22377
|
|
|
21752
22378
|
// lib/SOT-23W.tsx
|
|
21753
|
-
import { Fragment as Fragment33, jsx as jsx138, jsxs as
|
|
22379
|
+
import { Fragment as Fragment33, jsx as jsx138, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
21754
22380
|
var SOT23W = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
21755
22381
|
const bodyWidth = 1.92;
|
|
21756
22382
|
const bodyLength10 = 2.9;
|
|
@@ -21761,7 +22387,7 @@ var SOT23W = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
21761
22387
|
const padContactLength = 0.25;
|
|
21762
22388
|
const padThickness = leadThickness / 2;
|
|
21763
22389
|
const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
|
|
21764
|
-
return /* @__PURE__ */
|
|
22390
|
+
return /* @__PURE__ */ jsxs32(Fragment33, { children: [
|
|
21765
22391
|
/* @__PURE__ */ jsx138(
|
|
21766
22392
|
SmdChipLead,
|
|
21767
22393
|
{
|
|
@@ -21826,8 +22452,8 @@ var SOT23W = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
21826
22452
|
};
|
|
21827
22453
|
|
|
21828
22454
|
// lib/FemaleHeader.tsx
|
|
21829
|
-
import { Colorize as Colorize67, Cuboid as Cuboid22, Hull as Hull7, Subtract as
|
|
21830
|
-
import { Fragment as Fragment34, jsx as jsx139, jsxs as
|
|
22455
|
+
import { Colorize as Colorize67, Cuboid as Cuboid22, Hull as Hull7, Subtract as Subtract8 } from "jscad-fiber";
|
|
22456
|
+
import { Fragment as Fragment34, jsx as jsx139, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
21831
22457
|
var FemaleHeader = ({
|
|
21832
22458
|
x,
|
|
21833
22459
|
y,
|
|
@@ -21849,8 +22475,8 @@ var FemaleHeader = ({
|
|
|
21849
22475
|
const socketCenterZ = flipZ(z + socketDepth / 2);
|
|
21850
22476
|
const socketEntryBaseZ = z + bodyHeight - socketEntryHeight;
|
|
21851
22477
|
const gapWidth = pinThickness * 1.6;
|
|
21852
|
-
return /* @__PURE__ */
|
|
21853
|
-
/* @__PURE__ */ jsx139(Colorize67, { color: "#1a1a1a", children: /* @__PURE__ */
|
|
22478
|
+
return /* @__PURE__ */ jsxs33(Fragment34, { children: [
|
|
22479
|
+
/* @__PURE__ */ jsx139(Colorize67, { color: "#1a1a1a", children: /* @__PURE__ */ jsxs33(Subtract8, { children: [
|
|
21854
22480
|
/* @__PURE__ */ jsx139(
|
|
21855
22481
|
Cuboid22,
|
|
21856
22482
|
{
|
|
@@ -21866,7 +22492,7 @@ var FemaleHeader = ({
|
|
|
21866
22492
|
center: [x, y, socketCenterZ]
|
|
21867
22493
|
}
|
|
21868
22494
|
),
|
|
21869
|
-
/* @__PURE__ */
|
|
22495
|
+
/* @__PURE__ */ jsxs33(Hull7, { children: [
|
|
21870
22496
|
/* @__PURE__ */ jsx139(
|
|
21871
22497
|
Cuboid22,
|
|
21872
22498
|
{
|
|
@@ -21883,8 +22509,8 @@ var FemaleHeader = ({
|
|
|
21883
22509
|
)
|
|
21884
22510
|
] })
|
|
21885
22511
|
] }) }),
|
|
21886
|
-
/* @__PURE__ */
|
|
21887
|
-
/* @__PURE__ */
|
|
22512
|
+
/* @__PURE__ */ jsxs33(Colorize67, { color: "silver", children: [
|
|
22513
|
+
/* @__PURE__ */ jsxs33(Hull7, { children: [
|
|
21888
22514
|
/* @__PURE__ */ jsx139(
|
|
21889
22515
|
Cuboid22,
|
|
21890
22516
|
{
|
|
@@ -21953,13 +22579,13 @@ var FemaleHeaderRow = ({
|
|
|
21953
22579
|
import {
|
|
21954
22580
|
Colorize as Colorize68,
|
|
21955
22581
|
Cylinder as Cylinder8,
|
|
21956
|
-
ExtrudeLinear as
|
|
21957
|
-
Polygon as
|
|
22582
|
+
ExtrudeLinear as ExtrudeLinear6,
|
|
22583
|
+
Polygon as Polygon6,
|
|
21958
22584
|
Rotate as Rotate8,
|
|
21959
22585
|
RoundedCuboid as RoundedCuboid3,
|
|
21960
22586
|
Translate as Translate15
|
|
21961
22587
|
} from "jscad-fiber";
|
|
21962
|
-
import { Fragment as Fragment36, jsx as jsx141, jsxs as
|
|
22588
|
+
import { Fragment as Fragment36, jsx as jsx141, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
21963
22589
|
var PushButton = ({
|
|
21964
22590
|
width: width10,
|
|
21965
22591
|
length: length32,
|
|
@@ -21969,7 +22595,7 @@ var PushButton = ({
|
|
|
21969
22595
|
const bodyLength10 = length32;
|
|
21970
22596
|
const bodyHeight = width10 * 0.7;
|
|
21971
22597
|
const legWidth = innerDiameter / 2.5;
|
|
21972
|
-
return /* @__PURE__ */
|
|
22598
|
+
return /* @__PURE__ */ jsxs34(Fragment36, { children: [
|
|
21973
22599
|
/* @__PURE__ */ jsx141(
|
|
21974
22600
|
RoundedCuboid3,
|
|
21975
22601
|
{
|
|
@@ -22129,13 +22755,13 @@ var PushButtonLeg = (props) => {
|
|
|
22129
22755
|
y: position?.y || 0,
|
|
22130
22756
|
z: position?.z || 0
|
|
22131
22757
|
},
|
|
22132
|
-
children: /* @__PURE__ */ jsx141(Rotate8, { rotation: [0, 55, rotation], children: /* @__PURE__ */ jsx141(
|
|
22758
|
+
children: /* @__PURE__ */ jsx141(Rotate8, { rotation: [0, 55, rotation], children: /* @__PURE__ */ jsx141(ExtrudeLinear6, { height: width10, children: /* @__PURE__ */ jsx141(Polygon6, { points: polygon4.map((p) => [p.y, p.x]) }) }) })
|
|
22133
22759
|
}
|
|
22134
22760
|
) });
|
|
22135
22761
|
};
|
|
22136
22762
|
|
|
22137
22763
|
// lib/SOIC.tsx
|
|
22138
|
-
import { Fragment as Fragment37, jsx as jsx142, jsxs as
|
|
22764
|
+
import { Fragment as Fragment37, jsx as jsx142, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
22139
22765
|
var LegacySOIC = ({
|
|
22140
22766
|
pinCount,
|
|
22141
22767
|
leadLength,
|
|
@@ -22151,7 +22777,7 @@ var LegacySOIC = ({
|
|
|
22151
22777
|
const leadBodyOffset = leadLength * 0;
|
|
22152
22778
|
const fullLength10 = pitch * (sidePinCount - 1) + leadWidth + 0.2;
|
|
22153
22779
|
const bodyWidthAdjusted = bodyWidth * 0.55;
|
|
22154
|
-
return /* @__PURE__ */
|
|
22780
|
+
return /* @__PURE__ */ jsxs35(Fragment37, { children: [
|
|
22155
22781
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx142(
|
|
22156
22782
|
SmdChipLead,
|
|
22157
22783
|
{
|
|
@@ -22199,7 +22825,7 @@ var LegacySOIC = ({
|
|
|
22199
22825
|
var SOIC = (props) => "leadSpan" in props ? createDualRowGullWing(props) : LegacySOIC(props);
|
|
22200
22826
|
|
|
22201
22827
|
// lib/VSSOP.tsx
|
|
22202
|
-
import { Fragment as Fragment38, jsx as jsx143, jsxs as
|
|
22828
|
+
import { Fragment as Fragment38, jsx as jsx143, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
22203
22829
|
var VSSOP = ({
|
|
22204
22830
|
pinCount,
|
|
22205
22831
|
pitch,
|
|
@@ -22229,7 +22855,7 @@ var VSSOP = ({
|
|
|
22229
22855
|
const componentFullWidth = 4.5;
|
|
22230
22856
|
const leadBodyDistance = (componentFullWidth - _bodyWidth) / 2;
|
|
22231
22857
|
const padContactLength = leadBodyDistance * 0.5;
|
|
22232
|
-
return /* @__PURE__ */
|
|
22858
|
+
return /* @__PURE__ */ jsxs36(Fragment38, { children: [
|
|
22233
22859
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx143(
|
|
22234
22860
|
SmdChipLead,
|
|
22235
22861
|
{
|
|
@@ -22277,7 +22903,7 @@ var VSSOP = ({
|
|
|
22277
22903
|
|
|
22278
22904
|
// lib/SOD523.tsx
|
|
22279
22905
|
import { Colorize as Colorize69, Cuboid as Cuboid24, Hull as Hull8, Translate as Translate16, Union as Union5 } from "jscad-fiber";
|
|
22280
|
-
import { Fragment as Fragment39, jsx as jsx144, jsxs as
|
|
22906
|
+
import { Fragment as Fragment39, jsx as jsx144, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
22281
22907
|
var SOD523 = () => {
|
|
22282
22908
|
const fullWidth = 2.15;
|
|
22283
22909
|
const bodyLength10 = 0.8;
|
|
@@ -22290,7 +22916,7 @@ var SOD523 = () => {
|
|
|
22290
22916
|
const rightPadCenterX = bodyWidth / 2 - padLength / 2 + 0.15;
|
|
22291
22917
|
const taperOffset = 0.2;
|
|
22292
22918
|
const straightHeight = bodyHeight * 0.5;
|
|
22293
|
-
return /* @__PURE__ */
|
|
22919
|
+
return /* @__PURE__ */ jsxs37(Fragment39, { children: [
|
|
22294
22920
|
/* @__PURE__ */ jsx144(
|
|
22295
22921
|
Cuboid24,
|
|
22296
22922
|
{
|
|
@@ -22307,9 +22933,9 @@ var SOD523 = () => {
|
|
|
22307
22933
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
22308
22934
|
}
|
|
22309
22935
|
),
|
|
22310
|
-
/* @__PURE__ */ jsx144(Colorize69, { color: "#222", children: /* @__PURE__ */
|
|
22936
|
+
/* @__PURE__ */ jsx144(Colorize69, { color: "#222", children: /* @__PURE__ */ jsxs37(Union5, { children: [
|
|
22311
22937
|
/* @__PURE__ */ jsx144(Translate16, { z: straightHeight / 2, children: /* @__PURE__ */ jsx144(Cuboid24, { size: [bodyWidth, bodyLength10, straightHeight] }) }),
|
|
22312
|
-
/* @__PURE__ */
|
|
22938
|
+
/* @__PURE__ */ jsxs37(Hull8, { children: [
|
|
22313
22939
|
/* @__PURE__ */ jsx144(Translate16, { z: straightHeight, children: /* @__PURE__ */ jsx144(Cuboid24, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
22314
22940
|
/* @__PURE__ */ jsx144(Translate16, { z: bodyHeight, children: /* @__PURE__ */ jsx144(
|
|
22315
22941
|
Cuboid24,
|
|
@@ -22324,7 +22950,7 @@ var SOD523 = () => {
|
|
|
22324
22950
|
|
|
22325
22951
|
// lib/SOD882.tsx
|
|
22326
22952
|
import { Colorize as Colorize70, Cuboid as Cuboid25, Translate as Translate17 } from "jscad-fiber";
|
|
22327
|
-
import { Fragment as Fragment40, jsx as jsx145, jsxs as
|
|
22953
|
+
import { Fragment as Fragment40, jsx as jsx145, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
22328
22954
|
var SOD882 = () => {
|
|
22329
22955
|
const bodyLength10 = 0.98;
|
|
22330
22956
|
const bodyHeight = 0.47;
|
|
@@ -22335,7 +22961,7 @@ var SOD882 = () => {
|
|
|
22335
22961
|
const bodyWidth = 0.58;
|
|
22336
22962
|
const leftPadCenterX = -pitch / 2;
|
|
22337
22963
|
const rightPadCenterX = pitch / 2;
|
|
22338
|
-
return /* @__PURE__ */
|
|
22964
|
+
return /* @__PURE__ */ jsxs38(Fragment40, { children: [
|
|
22339
22965
|
/* @__PURE__ */ jsx145(
|
|
22340
22966
|
Cuboid25,
|
|
22341
22967
|
{
|
|
@@ -22390,7 +23016,7 @@ var SOD882 = () => {
|
|
|
22390
23016
|
|
|
22391
23017
|
// lib/SMA.tsx
|
|
22392
23018
|
import { Cuboid as Cuboid26, Colorize as Colorize71, Union as Union7, Hull as Hull10, Translate as Translate18 } from "jscad-fiber";
|
|
22393
|
-
import { Fragment as Fragment41, jsx as jsx146, jsxs as
|
|
23019
|
+
import { Fragment as Fragment41, jsx as jsx146, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
22394
23020
|
var SMA = () => {
|
|
22395
23021
|
const bodyWidth = 4.4;
|
|
22396
23022
|
const bodyLength10 = 3.4;
|
|
@@ -22401,8 +23027,8 @@ var SMA = () => {
|
|
|
22401
23027
|
const leadHeight = 1.14;
|
|
22402
23028
|
const taperOffset = 0.4;
|
|
22403
23029
|
const straightHeight = bodyHeight * 0.5;
|
|
22404
|
-
const Body = /* @__PURE__ */ jsx146(Colorize71, { color: "#1a1a1a", children: /* @__PURE__ */
|
|
22405
|
-
/* @__PURE__ */
|
|
23030
|
+
const Body = /* @__PURE__ */ jsx146(Colorize71, { color: "#1a1a1a", children: /* @__PURE__ */ jsxs39(Union7, { children: [
|
|
23031
|
+
/* @__PURE__ */ jsxs39(Hull10, { children: [
|
|
22406
23032
|
/* @__PURE__ */ jsx146(Translate18, { z: padThickness + 0.01, children: /* @__PURE__ */ jsx146(
|
|
22407
23033
|
Cuboid26,
|
|
22408
23034
|
{
|
|
@@ -22411,7 +23037,7 @@ var SMA = () => {
|
|
|
22411
23037
|
) }),
|
|
22412
23038
|
/* @__PURE__ */ jsx146(Translate18, { z: straightHeight, children: /* @__PURE__ */ jsx146(Cuboid26, { size: [bodyWidth, bodyLength10, 0.01] }) })
|
|
22413
23039
|
] }),
|
|
22414
|
-
/* @__PURE__ */
|
|
23040
|
+
/* @__PURE__ */ jsxs39(Hull10, { children: [
|
|
22415
23041
|
/* @__PURE__ */ jsx146(Translate18, { z: straightHeight, children: /* @__PURE__ */ jsx146(Cuboid26, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
22416
23042
|
/* @__PURE__ */ jsx146(Translate18, { z: bodyHeight, children: /* @__PURE__ */ jsx146(
|
|
22417
23043
|
Cuboid26,
|
|
@@ -22429,7 +23055,7 @@ var SMA = () => {
|
|
|
22429
23055
|
const bodyEdgeX = xDir * (bodyLength10 / 2 - leadThickness / 2);
|
|
22430
23056
|
const bridgeLength = Math.abs(bodyEdgeX - verticalLeadX);
|
|
22431
23057
|
const bridgeCenterX = (verticalLeadX + bodyEdgeX) / 2;
|
|
22432
|
-
return /* @__PURE__ */ jsx146(Colorize71, { color: "#c0c0c0", children: /* @__PURE__ */
|
|
23058
|
+
return /* @__PURE__ */ jsx146(Colorize71, { color: "#c0c0c0", children: /* @__PURE__ */ jsxs39(Union7, { children: [
|
|
22433
23059
|
/* @__PURE__ */ jsx146(
|
|
22434
23060
|
Cuboid26,
|
|
22435
23061
|
{
|
|
@@ -22453,7 +23079,7 @@ var SMA = () => {
|
|
|
22453
23079
|
)
|
|
22454
23080
|
] }) });
|
|
22455
23081
|
};
|
|
22456
|
-
return /* @__PURE__ */
|
|
23082
|
+
return /* @__PURE__ */ jsxs39(Fragment41, { children: [
|
|
22457
23083
|
/* @__PURE__ */ jsx146(Lead, { xDir: 1 }),
|
|
22458
23084
|
/* @__PURE__ */ jsx146(Lead, { xDir: -1 }),
|
|
22459
23085
|
Body
|
|
@@ -22462,7 +23088,7 @@ var SMA = () => {
|
|
|
22462
23088
|
|
|
22463
23089
|
// lib/SMB.tsx
|
|
22464
23090
|
import { Cuboid as Cuboid27, Colorize as Colorize72, Union as Union8, Hull as Hull11, Translate as Translate19 } from "jscad-fiber";
|
|
22465
|
-
import { Fragment as Fragment42, jsx as jsx147, jsxs as
|
|
23091
|
+
import { Fragment as Fragment42, jsx as jsx147, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
22466
23092
|
var SMB = () => {
|
|
22467
23093
|
const bodyWidth = 4.6;
|
|
22468
23094
|
const bodyLength10 = 4;
|
|
@@ -22473,8 +23099,8 @@ var SMB = () => {
|
|
|
22473
23099
|
const leadHeight = 1.14;
|
|
22474
23100
|
const taperOffset = 0.4;
|
|
22475
23101
|
const straightHeight = bodyHeight * 0.5;
|
|
22476
|
-
const Body = /* @__PURE__ */ jsx147(Colorize72, { color: "#1a1a1a", children: /* @__PURE__ */
|
|
22477
|
-
/* @__PURE__ */
|
|
23102
|
+
const Body = /* @__PURE__ */ jsx147(Colorize72, { color: "#1a1a1a", children: /* @__PURE__ */ jsxs40(Union8, { children: [
|
|
23103
|
+
/* @__PURE__ */ jsxs40(Hull11, { children: [
|
|
22478
23104
|
/* @__PURE__ */ jsx147(Translate19, { z: padThickness + 0.01, children: /* @__PURE__ */ jsx147(
|
|
22479
23105
|
Cuboid27,
|
|
22480
23106
|
{
|
|
@@ -22483,7 +23109,7 @@ var SMB = () => {
|
|
|
22483
23109
|
) }),
|
|
22484
23110
|
/* @__PURE__ */ jsx147(Translate19, { z: straightHeight, children: /* @__PURE__ */ jsx147(Cuboid27, { size: [bodyWidth, bodyLength10, 0.01] }) })
|
|
22485
23111
|
] }),
|
|
22486
|
-
/* @__PURE__ */
|
|
23112
|
+
/* @__PURE__ */ jsxs40(Hull11, { children: [
|
|
22487
23113
|
/* @__PURE__ */ jsx147(Translate19, { z: straightHeight, children: /* @__PURE__ */ jsx147(Cuboid27, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
22488
23114
|
/* @__PURE__ */ jsx147(Translate19, { z: bodyHeight, children: /* @__PURE__ */ jsx147(
|
|
22489
23115
|
Cuboid27,
|
|
@@ -22501,7 +23127,7 @@ var SMB = () => {
|
|
|
22501
23127
|
const bodyEdgeX = xDir * (bodyLength10 / 2 - leadThickness / 2);
|
|
22502
23128
|
const bridgeLength = Math.abs(bodyEdgeX - verticalLeadX);
|
|
22503
23129
|
const bridgeCenterX = (verticalLeadX + bodyEdgeX) / 2;
|
|
22504
|
-
return /* @__PURE__ */ jsx147(Colorize72, { color: "#c0c0c0", children: /* @__PURE__ */
|
|
23130
|
+
return /* @__PURE__ */ jsx147(Colorize72, { color: "#c0c0c0", children: /* @__PURE__ */ jsxs40(Union8, { children: [
|
|
22505
23131
|
/* @__PURE__ */ jsx147(
|
|
22506
23132
|
Cuboid27,
|
|
22507
23133
|
{
|
|
@@ -22525,7 +23151,7 @@ var SMB = () => {
|
|
|
22525
23151
|
)
|
|
22526
23152
|
] }) });
|
|
22527
23153
|
};
|
|
22528
|
-
return /* @__PURE__ */
|
|
23154
|
+
return /* @__PURE__ */ jsxs40(Fragment42, { children: [
|
|
22529
23155
|
/* @__PURE__ */ jsx147(Lead, { xDir: 1 }),
|
|
22530
23156
|
/* @__PURE__ */ jsx147(Lead, { xDir: -1 }),
|
|
22531
23157
|
Body
|
|
@@ -22534,7 +23160,7 @@ var SMB = () => {
|
|
|
22534
23160
|
|
|
22535
23161
|
// lib/SMC.tsx
|
|
22536
23162
|
import { Cuboid as Cuboid28, Colorize as Colorize73, Union as Union9, Hull as Hull12, Translate as Translate20 } from "jscad-fiber";
|
|
22537
|
-
import { Fragment as Fragment43, jsx as jsx148, jsxs as
|
|
23163
|
+
import { Fragment as Fragment43, jsx as jsx148, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
22538
23164
|
var SMC = () => {
|
|
22539
23165
|
const bodyWidth = 6.8;
|
|
22540
23166
|
const bodyLength10 = 6;
|
|
@@ -22545,8 +23171,8 @@ var SMC = () => {
|
|
|
22545
23171
|
const leadHeight = 1.14;
|
|
22546
23172
|
const taperOffset = 0.4;
|
|
22547
23173
|
const straightHeight = bodyHeight * 0.5;
|
|
22548
|
-
const Body = /* @__PURE__ */ jsx148(Colorize73, { color: "#1a1a1a", children: /* @__PURE__ */
|
|
22549
|
-
/* @__PURE__ */
|
|
23174
|
+
const Body = /* @__PURE__ */ jsx148(Colorize73, { color: "#1a1a1a", children: /* @__PURE__ */ jsxs41(Union9, { children: [
|
|
23175
|
+
/* @__PURE__ */ jsxs41(Hull12, { children: [
|
|
22550
23176
|
/* @__PURE__ */ jsx148(Translate20, { z: padThickness + 0.01, children: /* @__PURE__ */ jsx148(
|
|
22551
23177
|
Cuboid28,
|
|
22552
23178
|
{
|
|
@@ -22555,7 +23181,7 @@ var SMC = () => {
|
|
|
22555
23181
|
) }),
|
|
22556
23182
|
/* @__PURE__ */ jsx148(Translate20, { z: straightHeight, children: /* @__PURE__ */ jsx148(Cuboid28, { size: [bodyWidth, bodyLength10, 0.01] }) })
|
|
22557
23183
|
] }),
|
|
22558
|
-
/* @__PURE__ */
|
|
23184
|
+
/* @__PURE__ */ jsxs41(Hull12, { children: [
|
|
22559
23185
|
/* @__PURE__ */ jsx148(Translate20, { z: straightHeight, children: /* @__PURE__ */ jsx148(Cuboid28, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
22560
23186
|
/* @__PURE__ */ jsx148(Translate20, { z: bodyHeight, children: /* @__PURE__ */ jsx148(
|
|
22561
23187
|
Cuboid28,
|
|
@@ -22573,7 +23199,7 @@ var SMC = () => {
|
|
|
22573
23199
|
const bodyEdgeX = xDir * (bodyLength10 / 2 - leadThickness / 2);
|
|
22574
23200
|
const bridgeLength = Math.abs(bodyEdgeX - verticalLeadX);
|
|
22575
23201
|
const bridgeCenterX = (verticalLeadX + bodyEdgeX) / 2;
|
|
22576
|
-
return /* @__PURE__ */ jsx148(Colorize73, { color: "#c0c0c0", children: /* @__PURE__ */
|
|
23202
|
+
return /* @__PURE__ */ jsx148(Colorize73, { color: "#c0c0c0", children: /* @__PURE__ */ jsxs41(Union9, { children: [
|
|
22577
23203
|
/* @__PURE__ */ jsx148(
|
|
22578
23204
|
Cuboid28,
|
|
22579
23205
|
{
|
|
@@ -22597,7 +23223,7 @@ var SMC = () => {
|
|
|
22597
23223
|
)
|
|
22598
23224
|
] }) });
|
|
22599
23225
|
};
|
|
22600
|
-
return /* @__PURE__ */
|
|
23226
|
+
return /* @__PURE__ */ jsxs41(Fragment43, { children: [
|
|
22601
23227
|
/* @__PURE__ */ jsx148(Lead, { xDir: 1 }),
|
|
22602
23228
|
/* @__PURE__ */ jsx148(Lead, { xDir: -1 }),
|
|
22603
23229
|
Body
|
|
@@ -22606,7 +23232,7 @@ var SMC = () => {
|
|
|
22606
23232
|
|
|
22607
23233
|
// lib/SMF.tsx
|
|
22608
23234
|
import { Colorize as Colorize74, Cuboid as Cuboid29, Hull as Hull13, Translate as Translate21, Union as Union10 } from "jscad-fiber";
|
|
22609
|
-
import { Fragment as Fragment44, jsx as jsx149, jsxs as
|
|
23235
|
+
import { Fragment as Fragment44, jsx as jsx149, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
22610
23236
|
var SMF = () => {
|
|
22611
23237
|
const fullWidth = 2.9;
|
|
22612
23238
|
const bodyLength10 = 1.9;
|
|
@@ -22619,9 +23245,9 @@ var SMF = () => {
|
|
|
22619
23245
|
const rightPadCenterX = 1.3;
|
|
22620
23246
|
const taperOffset = 0.2;
|
|
22621
23247
|
const straightHeight = bodyHeight * 0.5;
|
|
22622
|
-
const Body = /* @__PURE__ */ jsx149(Colorize74, { color: "#222", children: /* @__PURE__ */
|
|
23248
|
+
const Body = /* @__PURE__ */ jsx149(Colorize74, { color: "#222", children: /* @__PURE__ */ jsxs42(Union10, { children: [
|
|
22623
23249
|
/* @__PURE__ */ jsx149(Translate21, { z: straightHeight / 2, children: /* @__PURE__ */ jsx149(Cuboid29, { size: [bodyWidth, bodyLength10, straightHeight] }) }),
|
|
22624
|
-
/* @__PURE__ */
|
|
23250
|
+
/* @__PURE__ */ jsxs42(Hull13, { children: [
|
|
22625
23251
|
/* @__PURE__ */ jsx149(Translate21, { z: straightHeight, children: /* @__PURE__ */ jsx149(Cuboid29, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
22626
23252
|
/* @__PURE__ */ jsx149(Translate21, { z: bodyHeight, children: /* @__PURE__ */ jsx149(
|
|
22627
23253
|
Cuboid29,
|
|
@@ -22631,7 +23257,7 @@ var SMF = () => {
|
|
|
22631
23257
|
) })
|
|
22632
23258
|
] })
|
|
22633
23259
|
] }) });
|
|
22634
|
-
return /* @__PURE__ */
|
|
23260
|
+
return /* @__PURE__ */ jsxs42(Fragment44, { children: [
|
|
22635
23261
|
/* @__PURE__ */ jsx149(
|
|
22636
23262
|
Cuboid29,
|
|
22637
23263
|
{
|
|
@@ -22654,7 +23280,7 @@ var SMF = () => {
|
|
|
22654
23280
|
|
|
22655
23281
|
// lib/sod-123F.tsx
|
|
22656
23282
|
import { Colorize as Colorize75, Cuboid as Cuboid30, Hull as Hull14, Translate as Translate22, Union as Union11 } from "jscad-fiber";
|
|
22657
|
-
import { Fragment as Fragment45, jsx as jsx150, jsxs as
|
|
23283
|
+
import { Fragment as Fragment45, jsx as jsx150, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
22658
23284
|
var SOD123F = () => {
|
|
22659
23285
|
const fullWidth = 2.7;
|
|
22660
23286
|
const bodyLength10 = 1.6;
|
|
@@ -22666,7 +23292,7 @@ var SOD123F = () => {
|
|
|
22666
23292
|
const rightPadCenterX = 1.3;
|
|
22667
23293
|
const taperOffset = 0.2;
|
|
22668
23294
|
const straightHeight = bodyHeight * 0.5;
|
|
22669
|
-
return /* @__PURE__ */
|
|
23295
|
+
return /* @__PURE__ */ jsxs43(Fragment45, { children: [
|
|
22670
23296
|
/* @__PURE__ */ jsx150(
|
|
22671
23297
|
Cuboid30,
|
|
22672
23298
|
{
|
|
@@ -22683,9 +23309,9 @@ var SOD123F = () => {
|
|
|
22683
23309
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
22684
23310
|
}
|
|
22685
23311
|
),
|
|
22686
|
-
/* @__PURE__ */ jsx150(Colorize75, { color: "#222", children: /* @__PURE__ */
|
|
23312
|
+
/* @__PURE__ */ jsx150(Colorize75, { color: "#222", children: /* @__PURE__ */ jsxs43(Union11, { children: [
|
|
22687
23313
|
/* @__PURE__ */ jsx150(Translate22, { z: straightHeight / 2, children: /* @__PURE__ */ jsx150(Cuboid30, { size: [fullWidth, bodyLength10, straightHeight] }) }),
|
|
22688
|
-
/* @__PURE__ */
|
|
23314
|
+
/* @__PURE__ */ jsxs43(Hull14, { children: [
|
|
22689
23315
|
/* @__PURE__ */ jsx150(Translate22, { z: straightHeight, children: /* @__PURE__ */ jsx150(Cuboid30, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
22690
23316
|
/* @__PURE__ */ jsx150(Translate22, { z: bodyHeight, children: /* @__PURE__ */ jsx150(
|
|
22691
23317
|
Cuboid30,
|
|
@@ -22700,7 +23326,7 @@ var SOD123F = () => {
|
|
|
22700
23326
|
|
|
22701
23327
|
// lib/sod-123FL.tsx
|
|
22702
23328
|
import { Colorize as Colorize76, Cuboid as Cuboid31, Hull as Hull15, Translate as Translate23, Union as Union12 } from "jscad-fiber";
|
|
22703
|
-
import { Fragment as Fragment46, jsx as jsx151, jsxs as
|
|
23329
|
+
import { Fragment as Fragment46, jsx as jsx151, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
22704
23330
|
var SOD123FL = () => {
|
|
22705
23331
|
const fullWidth = 2.75;
|
|
22706
23332
|
const bodyLength10 = 1.8;
|
|
@@ -22712,7 +23338,7 @@ var SOD123FL = () => {
|
|
|
22712
23338
|
const rightPadCenterX = fullWidth / 2 - 0.075;
|
|
22713
23339
|
const taperOffset = 0.4;
|
|
22714
23340
|
const straightHeight = bodyHeight * 0.2;
|
|
22715
|
-
return /* @__PURE__ */
|
|
23341
|
+
return /* @__PURE__ */ jsxs44(Fragment46, { children: [
|
|
22716
23342
|
/* @__PURE__ */ jsx151(
|
|
22717
23343
|
Cuboid31,
|
|
22718
23344
|
{
|
|
@@ -22729,9 +23355,9 @@ var SOD123FL = () => {
|
|
|
22729
23355
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
22730
23356
|
}
|
|
22731
23357
|
),
|
|
22732
|
-
/* @__PURE__ */ jsx151(Colorize76, { color: "#222", children: /* @__PURE__ */
|
|
23358
|
+
/* @__PURE__ */ jsx151(Colorize76, { color: "#222", children: /* @__PURE__ */ jsxs44(Union12, { children: [
|
|
22733
23359
|
/* @__PURE__ */ jsx151(Translate23, { z: straightHeight / 2, children: /* @__PURE__ */ jsx151(Cuboid31, { size: [fullWidth, bodyLength10, straightHeight] }) }),
|
|
22734
|
-
/* @__PURE__ */
|
|
23360
|
+
/* @__PURE__ */ jsxs44(Hull15, { children: [
|
|
22735
23361
|
/* @__PURE__ */ jsx151(Translate23, { z: straightHeight, children: /* @__PURE__ */ jsx151(Cuboid31, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
22736
23362
|
/* @__PURE__ */ jsx151(Translate23, { z: bodyHeight, children: /* @__PURE__ */ jsx151(
|
|
22737
23363
|
Cuboid31,
|
|
@@ -22754,7 +23380,7 @@ var SOD123FL = () => {
|
|
|
22754
23380
|
|
|
22755
23381
|
// lib/sod-123W.tsx
|
|
22756
23382
|
import { Colorize as Colorize77, Cuboid as Cuboid32, Hull as Hull16, Translate as Translate24, Union as Union13 } from "jscad-fiber";
|
|
22757
|
-
import { Fragment as Fragment47, jsx as jsx152, jsxs as
|
|
23383
|
+
import { Fragment as Fragment47, jsx as jsx152, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
22758
23384
|
var SOD123W = ({
|
|
22759
23385
|
bodyWidth = 2.6,
|
|
22760
23386
|
bodyLength: bodyLength10 = 1.7,
|
|
@@ -22769,7 +23395,7 @@ var SOD123W = ({
|
|
|
22769
23395
|
const taperOffset = 0.4;
|
|
22770
23396
|
const lowerTaperOffset = 0.1;
|
|
22771
23397
|
const straightHeight = bodyHeight * 0.2;
|
|
22772
|
-
return /* @__PURE__ */
|
|
23398
|
+
return /* @__PURE__ */ jsxs45(Fragment47, { children: [
|
|
22773
23399
|
/* @__PURE__ */ jsx152(
|
|
22774
23400
|
Cuboid32,
|
|
22775
23401
|
{
|
|
@@ -22786,8 +23412,8 @@ var SOD123W = ({
|
|
|
22786
23412
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
22787
23413
|
}
|
|
22788
23414
|
),
|
|
22789
|
-
/* @__PURE__ */ jsx152(Colorize77, { color: "#222", children: /* @__PURE__ */
|
|
22790
|
-
/* @__PURE__ */
|
|
23415
|
+
/* @__PURE__ */ jsx152(Colorize77, { color: "#222", children: /* @__PURE__ */ jsxs45(Union13, { children: [
|
|
23416
|
+
/* @__PURE__ */ jsxs45(Hull16, { children: [
|
|
22791
23417
|
/* @__PURE__ */ jsx152(Translate24, { z: straightHeight, children: /* @__PURE__ */ jsx152(
|
|
22792
23418
|
Cuboid32,
|
|
22793
23419
|
{
|
|
@@ -22809,7 +23435,7 @@ var SOD123W = ({
|
|
|
22809
23435
|
}
|
|
22810
23436
|
) })
|
|
22811
23437
|
] }),
|
|
22812
|
-
/* @__PURE__ */
|
|
23438
|
+
/* @__PURE__ */ jsxs45(Hull16, { children: [
|
|
22813
23439
|
/* @__PURE__ */ jsx152(Translate24, { z: straightHeight, children: /* @__PURE__ */ jsx152(Cuboid32, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
22814
23440
|
/* @__PURE__ */ jsx152(Translate24, { z: bodyHeight, children: /* @__PURE__ */ jsx152(
|
|
22815
23441
|
Cuboid32,
|
|
@@ -22832,7 +23458,7 @@ var SOD123W = ({
|
|
|
22832
23458
|
|
|
22833
23459
|
// lib/sod-123.tsx
|
|
22834
23460
|
import { Cuboid as Cuboid33 } from "jscad-fiber";
|
|
22835
|
-
import { Fragment as Fragment48, jsx as jsx153, jsxs as
|
|
23461
|
+
import { Fragment as Fragment48, jsx as jsx153, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
22836
23462
|
var SOD123 = ({
|
|
22837
23463
|
fullWidth = 3.7,
|
|
22838
23464
|
fullLength: fullLength10 = 1.55
|
|
@@ -22848,7 +23474,7 @@ var SOD123 = ({
|
|
|
22848
23474
|
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
22849
23475
|
const padContactLength = 0.25;
|
|
22850
23476
|
const leadCurveLength = 0.2;
|
|
22851
|
-
return /* @__PURE__ */
|
|
23477
|
+
return /* @__PURE__ */ jsxs46(Fragment48, { children: [
|
|
22852
23478
|
/* @__PURE__ */ jsx153(
|
|
22853
23479
|
SmdChipLead,
|
|
22854
23480
|
{
|
|
@@ -22909,7 +23535,7 @@ var SOD123 = ({
|
|
|
22909
23535
|
|
|
22910
23536
|
// lib/sod-128.tsx
|
|
22911
23537
|
import { Colorize as Colorize78, Cuboid as Cuboid34, Hull as Hull17, Translate as Translate25, Union as Union14 } from "jscad-fiber";
|
|
22912
|
-
import { Fragment as Fragment49, jsx as jsx154, jsxs as
|
|
23538
|
+
import { Fragment as Fragment49, jsx as jsx154, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
22913
23539
|
var SOD128 = () => {
|
|
22914
23540
|
const fullWidth = 3.8;
|
|
22915
23541
|
const bodyLength10 = 2.5;
|
|
@@ -22922,7 +23548,7 @@ var SOD128 = () => {
|
|
|
22922
23548
|
const taperOffset = 0.4;
|
|
22923
23549
|
const lowerTaperOffset = 0.05;
|
|
22924
23550
|
const straightHeight = bodyHeight * 0.2;
|
|
22925
|
-
return /* @__PURE__ */
|
|
23551
|
+
return /* @__PURE__ */ jsxs47(Fragment49, { children: [
|
|
22926
23552
|
/* @__PURE__ */ jsx154(
|
|
22927
23553
|
Cuboid34,
|
|
22928
23554
|
{
|
|
@@ -22939,8 +23565,8 @@ var SOD128 = () => {
|
|
|
22939
23565
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
22940
23566
|
}
|
|
22941
23567
|
),
|
|
22942
|
-
/* @__PURE__ */ jsx154(Colorize78, { color: "#222", children: /* @__PURE__ */
|
|
22943
|
-
/* @__PURE__ */
|
|
23568
|
+
/* @__PURE__ */ jsx154(Colorize78, { color: "#222", children: /* @__PURE__ */ jsxs47(Union14, { children: [
|
|
23569
|
+
/* @__PURE__ */ jsxs47(Hull17, { children: [
|
|
22944
23570
|
/* @__PURE__ */ jsx154(Translate25, { z: straightHeight, children: /* @__PURE__ */ jsx154(
|
|
22945
23571
|
Cuboid34,
|
|
22946
23572
|
{
|
|
@@ -22962,7 +23588,7 @@ var SOD128 = () => {
|
|
|
22962
23588
|
}
|
|
22963
23589
|
) })
|
|
22964
23590
|
] }),
|
|
22965
|
-
/* @__PURE__ */
|
|
23591
|
+
/* @__PURE__ */ jsxs47(Hull17, { children: [
|
|
22966
23592
|
/* @__PURE__ */ jsx154(Translate25, { z: straightHeight, children: /* @__PURE__ */ jsx154(Cuboid34, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
22967
23593
|
/* @__PURE__ */ jsx154(Translate25, { z: bodyHeight, children: /* @__PURE__ */ jsx154(
|
|
22968
23594
|
Cuboid34,
|
|
@@ -22985,7 +23611,7 @@ var SOD128 = () => {
|
|
|
22985
23611
|
|
|
22986
23612
|
// lib/SOD-923.tsx
|
|
22987
23613
|
import { Colorize as Colorize79, Cuboid as Cuboid35, Hull as Hull18, Translate as Translate26, Union as Union15 } from "jscad-fiber";
|
|
22988
|
-
import { Fragment as Fragment50, jsx as jsx155, jsxs as
|
|
23614
|
+
import { Fragment as Fragment50, jsx as jsx155, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
22989
23615
|
var SOD923 = () => {
|
|
22990
23616
|
const fullWidth = 0.8;
|
|
22991
23617
|
const bodyLength10 = 0.6;
|
|
@@ -22997,7 +23623,7 @@ var SOD923 = () => {
|
|
|
22997
23623
|
const rightPadCenterX = fullWidth / 2;
|
|
22998
23624
|
const taperOffset = 0.1;
|
|
22999
23625
|
const straightHeight = padThickness;
|
|
23000
|
-
return /* @__PURE__ */
|
|
23626
|
+
return /* @__PURE__ */ jsxs48(Fragment50, { children: [
|
|
23001
23627
|
/* @__PURE__ */ jsx155(
|
|
23002
23628
|
Cuboid35,
|
|
23003
23629
|
{
|
|
@@ -23014,9 +23640,9 @@ var SOD923 = () => {
|
|
|
23014
23640
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
23015
23641
|
}
|
|
23016
23642
|
),
|
|
23017
|
-
/* @__PURE__ */ jsx155(Colorize79, { color: "#222", children: /* @__PURE__ */
|
|
23643
|
+
/* @__PURE__ */ jsx155(Colorize79, { color: "#222", children: /* @__PURE__ */ jsxs48(Union15, { children: [
|
|
23018
23644
|
/* @__PURE__ */ jsx155(Translate26, { z: straightHeight / 2, children: /* @__PURE__ */ jsx155(Cuboid35, { size: [fullWidth, bodyLength10, straightHeight] }) }),
|
|
23019
|
-
/* @__PURE__ */
|
|
23645
|
+
/* @__PURE__ */ jsxs48(Hull18, { children: [
|
|
23020
23646
|
/* @__PURE__ */ jsx155(Translate26, { z: straightHeight, children: /* @__PURE__ */ jsx155(Cuboid35, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
23021
23647
|
/* @__PURE__ */ jsx155(Translate26, { z: bodyHeight, children: /* @__PURE__ */ jsx155(
|
|
23022
23648
|
Cuboid35,
|
|
@@ -23030,7 +23656,7 @@ var SOD923 = () => {
|
|
|
23030
23656
|
};
|
|
23031
23657
|
|
|
23032
23658
|
// lib/SOT-223.tsx
|
|
23033
|
-
import { Fragment as Fragment51, jsx as jsx156, jsxs as
|
|
23659
|
+
import { Fragment as Fragment51, jsx as jsx156, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
23034
23660
|
var SOT223 = ({
|
|
23035
23661
|
fullWidth = 6.6,
|
|
23036
23662
|
bodyWidth = 3.5,
|
|
@@ -23045,7 +23671,7 @@ var SOT223 = ({
|
|
|
23045
23671
|
const leadThickness = 0.25;
|
|
23046
23672
|
const padContactLength = 0.5;
|
|
23047
23673
|
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
23048
|
-
return /* @__PURE__ */
|
|
23674
|
+
return /* @__PURE__ */ jsxs49(Fragment51, { children: [
|
|
23049
23675
|
/* @__PURE__ */ jsx156(
|
|
23050
23676
|
SmdChipLead,
|
|
23051
23677
|
{
|
|
@@ -23127,7 +23753,7 @@ var SOT223 = ({
|
|
|
23127
23753
|
};
|
|
23128
23754
|
|
|
23129
23755
|
// lib/tqfp.tsx
|
|
23130
|
-
import { Fragment as Fragment52, jsx as jsx157, jsxs as
|
|
23756
|
+
import { Fragment as Fragment52, jsx as jsx157, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
23131
23757
|
var TQFP = () => {
|
|
23132
23758
|
const pinCount = 64;
|
|
23133
23759
|
const pitch = 0.5;
|
|
@@ -23142,7 +23768,7 @@ var TQFP = () => {
|
|
|
23142
23768
|
const leadHeight = 0.65;
|
|
23143
23769
|
const leadThickness = 0.25;
|
|
23144
23770
|
const bodyDistance = (fullWidth - bodyWidth) / 2 + 0.2;
|
|
23145
|
-
return /* @__PURE__ */
|
|
23771
|
+
return /* @__PURE__ */ jsxs50(Fragment52, { children: [
|
|
23146
23772
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx157(
|
|
23147
23773
|
SmdChipLead,
|
|
23148
23774
|
{
|
|
@@ -23228,7 +23854,7 @@ var TQFP = () => {
|
|
|
23228
23854
|
var tqfp_default = TQFP;
|
|
23229
23855
|
|
|
23230
23856
|
// lib/SOT-323.tsx
|
|
23231
|
-
import { Fragment as Fragment53, jsx as jsx158, jsxs as
|
|
23857
|
+
import { Fragment as Fragment53, jsx as jsx158, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
23232
23858
|
var SOT323 = () => {
|
|
23233
23859
|
const fullWidth = 2.05;
|
|
23234
23860
|
const bodyWidth = 1.25;
|
|
@@ -23240,7 +23866,7 @@ var SOT323 = () => {
|
|
|
23240
23866
|
const padContactLength = 0.2;
|
|
23241
23867
|
const padPitch = 0.65;
|
|
23242
23868
|
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
23243
|
-
return /* @__PURE__ */
|
|
23869
|
+
return /* @__PURE__ */ jsxs51(Fragment53, { children: [
|
|
23244
23870
|
/* @__PURE__ */ jsx158(
|
|
23245
23871
|
SmdChipLead,
|
|
23246
23872
|
{
|
|
@@ -23312,11 +23938,11 @@ import {
|
|
|
23312
23938
|
Cuboid as Cuboid36,
|
|
23313
23939
|
Cylinder as Cylinder9,
|
|
23314
23940
|
Hull as Hull19,
|
|
23315
|
-
Subtract as
|
|
23941
|
+
Subtract as Subtract9,
|
|
23316
23942
|
Translate as Translate27,
|
|
23317
23943
|
Union as Union16
|
|
23318
23944
|
} from "jscad-fiber";
|
|
23319
|
-
import { Fragment as Fragment54, jsx as jsx159, jsxs as
|
|
23945
|
+
import { Fragment as Fragment54, jsx as jsx159, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
23320
23946
|
function createPhysicalLqfp(p) {
|
|
23321
23947
|
const {
|
|
23322
23948
|
pinCount,
|
|
@@ -23360,7 +23986,7 @@ function createPhysicalLqfp(p) {
|
|
|
23360
23986
|
throw new Error("Invalid mold, lead spacing, or terminal reach");
|
|
23361
23987
|
const midZ = standoff + moldHeight / 2;
|
|
23362
23988
|
const slice = Math.min(2e-3, moldHeight / 100);
|
|
23363
|
-
const body = /* @__PURE__ */
|
|
23989
|
+
const body = /* @__PURE__ */ jsxs52(Hull19, { children: [
|
|
23364
23990
|
/* @__PURE__ */ jsx159(Translate27, { z: standoff + slice / 2, children: /* @__PURE__ */ jsx159(
|
|
23365
23991
|
Cuboid36,
|
|
23366
23992
|
{
|
|
@@ -23421,13 +24047,13 @@ function createPhysicalLqfp(p) {
|
|
|
23421
24047
|
)
|
|
23422
24048
|
}
|
|
23423
24049
|
);
|
|
23424
|
-
return /* @__PURE__ */ jsx159(Union16, { children: points.slice(1).map((point, i) => /* @__PURE__ */
|
|
24050
|
+
return /* @__PURE__ */ jsx159(Union16, { children: points.slice(1).map((point, i) => /* @__PURE__ */ jsxs52(Hull19, { children: [
|
|
23425
24051
|
section(points[i]),
|
|
23426
24052
|
section(point)
|
|
23427
24053
|
] }, i)) });
|
|
23428
24054
|
};
|
|
23429
|
-
return /* @__PURE__ */
|
|
23430
|
-
/* @__PURE__ */ jsx159(Colorize80, { color: "#353535", children: /* @__PURE__ */
|
|
24055
|
+
return /* @__PURE__ */ jsxs52(Fragment54, { children: [
|
|
24056
|
+
/* @__PURE__ */ jsx159(Colorize80, { color: "#353535", children: /* @__PURE__ */ jsxs52(Subtract9, { children: [
|
|
23431
24057
|
body,
|
|
23432
24058
|
/* @__PURE__ */ jsx159(
|
|
23433
24059
|
Translate27,
|
|
@@ -23452,7 +24078,7 @@ function createPhysicalLqfp(p) {
|
|
|
23452
24078
|
}
|
|
23453
24079
|
|
|
23454
24080
|
// lib/lqfp.tsx
|
|
23455
|
-
import { Fragment as Fragment55, jsx as jsx160, jsxs as
|
|
24081
|
+
import { Fragment as Fragment55, jsx as jsx160, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
23456
24082
|
var LegacyLQFP = ({
|
|
23457
24083
|
pinCount,
|
|
23458
24084
|
pitch,
|
|
@@ -23475,7 +24101,7 @@ var LegacyLQFP = ({
|
|
|
23475
24101
|
const leadHeight = 0.8;
|
|
23476
24102
|
const leadThickness = 0.2;
|
|
23477
24103
|
const bodyDistance = (fullWidth - bodyWidth) / 2 + 0.4;
|
|
23478
|
-
return /* @__PURE__ */
|
|
24104
|
+
return /* @__PURE__ */ jsxs53(Fragment55, { children: [
|
|
23479
24105
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx160(
|
|
23480
24106
|
SmdChipLead,
|
|
23481
24107
|
{
|
|
@@ -23567,7 +24193,7 @@ var LQFP = (props) => "leadSpanX" in props ? createPhysicalLqfp(props) : LegacyL
|
|
|
23567
24193
|
|
|
23568
24194
|
// lib/SOT-723.tsx
|
|
23569
24195
|
import { Cuboid as Cuboid37, Translate as Translate28, Colorize as Colorize81, Hull as Hull20, Union as Union17 } from "jscad-fiber";
|
|
23570
|
-
import { Fragment as Fragment56, jsx as jsx161, jsxs as
|
|
24196
|
+
import { Fragment as Fragment56, jsx as jsx161, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
23571
24197
|
var SOT723 = () => {
|
|
23572
24198
|
const bodyWidth = 0.85;
|
|
23573
24199
|
const bodyLength10 = 1.2;
|
|
@@ -23584,8 +24210,8 @@ var SOT723 = () => {
|
|
|
23584
24210
|
const leftTopPadCenterY = 0.4;
|
|
23585
24211
|
const leftBottomPadCenterX = -0.55;
|
|
23586
24212
|
const leftBottomPadCenterY = -0.4;
|
|
23587
|
-
return /* @__PURE__ */
|
|
23588
|
-
/* @__PURE__ */ jsx161(Colorize81, { color: "#222", children: /* @__PURE__ */
|
|
24213
|
+
return /* @__PURE__ */ jsxs54(Fragment56, { children: [
|
|
24214
|
+
/* @__PURE__ */ jsx161(Colorize81, { color: "#222", children: /* @__PURE__ */ jsxs54(Union17, { children: [
|
|
23589
24215
|
/* @__PURE__ */ jsx161(
|
|
23590
24216
|
Cuboid37,
|
|
23591
24217
|
{
|
|
@@ -23593,7 +24219,7 @@ var SOT723 = () => {
|
|
|
23593
24219
|
center: [0, 0, straightHeight / 2]
|
|
23594
24220
|
}
|
|
23595
24221
|
),
|
|
23596
|
-
/* @__PURE__ */
|
|
24222
|
+
/* @__PURE__ */ jsxs54(Hull20, { children: [
|
|
23597
24223
|
/* @__PURE__ */ jsx161(Translate28, { z: straightHeight, children: /* @__PURE__ */ jsx161(Cuboid37, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
23598
24224
|
/* @__PURE__ */ jsx161(Translate28, { z: bodyHeight, children: /* @__PURE__ */ jsx161(
|
|
23599
24225
|
Cuboid37,
|
|
@@ -23631,8 +24257,8 @@ var SOT723 = () => {
|
|
|
23631
24257
|
};
|
|
23632
24258
|
|
|
23633
24259
|
// lib/dfn.tsx
|
|
23634
|
-
import { Colorize as Colorize82, Cuboid as Cuboid38, Hull as Hull21, Subtract as
|
|
23635
|
-
import { Fragment as Fragment57, jsx as jsx162, jsxs as
|
|
24260
|
+
import { Colorize as Colorize82, Cuboid as Cuboid38, Hull as Hull21, Subtract as Subtract10 } from "jscad-fiber";
|
|
24261
|
+
import { Fragment as Fragment57, jsx as jsx162, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
23636
24262
|
var DFN = ({
|
|
23637
24263
|
num_pins,
|
|
23638
24264
|
bodyWidth = 5.3,
|
|
@@ -23713,13 +24339,13 @@ var DFN = ({
|
|
|
23713
24339
|
center: [0, 0, standoff + bodyThickness / 2]
|
|
23714
24340
|
}
|
|
23715
24341
|
);
|
|
23716
|
-
return /* @__PURE__ */
|
|
23717
|
-
/* @__PURE__ */ jsx162(Colorize82, { material: componentMaterials.moldedPlastic, color: "#25272a", children: pin1MarkWidth > 0 ? /* @__PURE__ */
|
|
24342
|
+
return /* @__PURE__ */ jsxs55(Fragment57, { children: [
|
|
24343
|
+
/* @__PURE__ */ jsx162(Colorize82, { material: componentMaterials.moldedPlastic, color: "#25272a", children: pin1MarkWidth > 0 ? /* @__PURE__ */ jsxs55(Subtract10, { children: [
|
|
23718
24344
|
body,
|
|
23719
24345
|
stripe
|
|
23720
24346
|
] }) : body }),
|
|
23721
24347
|
/* @__PURE__ */ jsx162(Colorize82, { material: componentMaterials.tinnedLead, color: "#c7c9cd", children: pinPositions.map(
|
|
23722
|
-
(p) => p.pinNumber === 1 && pin1TerminalChamfer > 0 ? /* @__PURE__ */
|
|
24348
|
+
(p) => p.pinNumber === 1 && pin1TerminalChamfer > 0 ? /* @__PURE__ */ jsxs55(Hull21, { children: [
|
|
23723
24349
|
/* @__PURE__ */ jsx162(
|
|
23724
24350
|
Cuboid38,
|
|
23725
24351
|
{
|
|
@@ -23771,7 +24397,7 @@ var DFN = ({
|
|
|
23771
24397
|
pin1MarkWidth > 0 && /* @__PURE__ */ jsx162(Colorize82, { color: "#969997", children: stripe })
|
|
23772
24398
|
] });
|
|
23773
24399
|
}
|
|
23774
|
-
return /* @__PURE__ */
|
|
24400
|
+
return /* @__PURE__ */ jsxs55(Fragment57, { children: [
|
|
23775
24401
|
/* @__PURE__ */ jsx162(
|
|
23776
24402
|
ChipBody,
|
|
23777
24403
|
{
|
|
@@ -23814,7 +24440,7 @@ var DFN = ({
|
|
|
23814
24440
|
|
|
23815
24441
|
// lib/hc49.tsx
|
|
23816
24442
|
import { Colorize as Colorize83, Cylinder as Cylinder10, Hull as Hull22, RoundedCylinder } from "jscad-fiber";
|
|
23817
|
-
import { Fragment as Fragment58, jsx as jsx163, jsxs as
|
|
24443
|
+
import { Fragment as Fragment58, jsx as jsx163, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
23818
24444
|
var HC49 = ({
|
|
23819
24445
|
bodyLength: bodyLength10 = 10.2,
|
|
23820
24446
|
bodyWidth = 4.65,
|
|
@@ -23830,9 +24456,9 @@ var HC49 = ({
|
|
|
23830
24456
|
const endCenterX = halfLength - endRadius;
|
|
23831
24457
|
const leadCenterX = leadSpacing / 2;
|
|
23832
24458
|
const baseHeight = 0.85;
|
|
23833
|
-
return /* @__PURE__ */
|
|
23834
|
-
/* @__PURE__ */
|
|
23835
|
-
/* @__PURE__ */
|
|
24459
|
+
return /* @__PURE__ */ jsxs56(Fragment58, { children: [
|
|
24460
|
+
/* @__PURE__ */ jsxs56(Colorize83, { color, children: [
|
|
24461
|
+
/* @__PURE__ */ jsxs56(Hull22, { children: [
|
|
23836
24462
|
/* @__PURE__ */ jsx163(
|
|
23837
24463
|
RoundedCylinder,
|
|
23838
24464
|
{
|
|
@@ -23852,7 +24478,7 @@ var HC49 = ({
|
|
|
23852
24478
|
}
|
|
23853
24479
|
)
|
|
23854
24480
|
] }),
|
|
23855
|
-
/* @__PURE__ */
|
|
24481
|
+
/* @__PURE__ */ jsxs56(Hull22, { children: [
|
|
23856
24482
|
/* @__PURE__ */ jsx163(
|
|
23857
24483
|
RoundedCylinder,
|
|
23858
24484
|
{
|
|
@@ -23873,7 +24499,7 @@ var HC49 = ({
|
|
|
23873
24499
|
)
|
|
23874
24500
|
] })
|
|
23875
24501
|
] }),
|
|
23876
|
-
/* @__PURE__ */
|
|
24502
|
+
/* @__PURE__ */ jsxs56(Colorize83, { color: leadColor, children: [
|
|
23877
24503
|
/* @__PURE__ */ jsx163(
|
|
23878
24504
|
Cylinder10,
|
|
23879
24505
|
{
|
|
@@ -23902,7 +24528,7 @@ import {
|
|
|
23902
24528
|
Rotate as Rotate9,
|
|
23903
24529
|
RoundedCuboid as RoundedCuboid4
|
|
23904
24530
|
} from "jscad-fiber";
|
|
23905
|
-
import { Fragment as Fragment59, jsx as jsx164, jsxs as
|
|
24531
|
+
import { Fragment as Fragment59, jsx as jsx164, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
23906
24532
|
var MicroMELF = ({
|
|
23907
24533
|
bodyLength: bodyLength10 = 1.4,
|
|
23908
24534
|
bodyDiameter = 1.1,
|
|
@@ -23911,8 +24537,8 @@ var MicroMELF = ({
|
|
|
23911
24537
|
cathodeIdentification = "#111"
|
|
23912
24538
|
}) => {
|
|
23913
24539
|
const padLength = 0.2;
|
|
23914
|
-
return /* @__PURE__ */
|
|
23915
|
-
/* @__PURE__ */ jsx164(Colorize84, { color, children: /* @__PURE__ */
|
|
24540
|
+
return /* @__PURE__ */ jsxs57(Fragment59, { children: [
|
|
24541
|
+
/* @__PURE__ */ jsx164(Colorize84, { color, children: /* @__PURE__ */ jsxs57(Rotate9, { rotation: [0, "90deg", 0], children: [
|
|
23916
24542
|
/* @__PURE__ */ jsx164(
|
|
23917
24543
|
RoundedCuboid4,
|
|
23918
24544
|
{
|
|
@@ -23961,7 +24587,7 @@ var MicroMELF = ({
|
|
|
23961
24587
|
|
|
23962
24588
|
// lib/MINIMELF.tsx
|
|
23963
24589
|
import { Colorize as Colorize85, Cylinder as Cylinder12, RoundedCylinder as RoundedCylinder3, Rotate as Rotate10 } from "jscad-fiber";
|
|
23964
|
-
import { Fragment as Fragment60, jsx as jsx165, jsxs as
|
|
24590
|
+
import { Fragment as Fragment60, jsx as jsx165, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
23965
24591
|
var MINIMELF = ({
|
|
23966
24592
|
bodyLength: bodyLength10 = 3.5,
|
|
23967
24593
|
bodyDiameter = 1.5,
|
|
@@ -23975,7 +24601,7 @@ var MINIMELF = ({
|
|
|
23975
24601
|
const contactRadius = bodyDiameter / 2 + 0.02;
|
|
23976
24602
|
const bandLength = 0.14;
|
|
23977
24603
|
const bandOffset = -bodyLength10 / 2 + contactLength + 0.35;
|
|
23978
|
-
return /* @__PURE__ */
|
|
24604
|
+
return /* @__PURE__ */ jsxs58(Fragment60, { children: [
|
|
23979
24605
|
/* @__PURE__ */ jsx165(Colorize85, { color, children: /* @__PURE__ */ jsx165(Rotate10, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx165(
|
|
23980
24606
|
RoundedCylinder3,
|
|
23981
24607
|
{
|
|
@@ -24016,7 +24642,7 @@ var MINIMELF = ({
|
|
|
24016
24642
|
|
|
24017
24643
|
// lib/MELF.tsx
|
|
24018
24644
|
import { Colorize as Colorize86, RoundedCylinder as RoundedCylinder4, Rotate as Rotate11 } from "jscad-fiber";
|
|
24019
|
-
import { Fragment as Fragment61, jsx as jsx166, jsxs as
|
|
24645
|
+
import { Fragment as Fragment61, jsx as jsx166, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
24020
24646
|
var MELF = ({
|
|
24021
24647
|
bodyLength: bodyLength10 = 3.9,
|
|
24022
24648
|
bodyDiameter = 2.5,
|
|
@@ -24024,7 +24650,7 @@ var MELF = ({
|
|
|
24024
24650
|
contactColor = "#c6c6c6"
|
|
24025
24651
|
}) => {
|
|
24026
24652
|
const padLength = 0.55;
|
|
24027
|
-
return /* @__PURE__ */
|
|
24653
|
+
return /* @__PURE__ */ jsxs59(Fragment61, { children: [
|
|
24028
24654
|
/* @__PURE__ */ jsx166(Colorize86, { color, children: /* @__PURE__ */ jsx166(Rotate11, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx166(
|
|
24029
24655
|
RoundedCylinder4,
|
|
24030
24656
|
{
|
|
@@ -24056,7 +24682,7 @@ var MELF = ({
|
|
|
24056
24682
|
};
|
|
24057
24683
|
|
|
24058
24684
|
// lib/ms012.tsx
|
|
24059
|
-
import { Fragment as Fragment62, jsx as jsx167, jsxs as
|
|
24685
|
+
import { Fragment as Fragment62, jsx as jsx167, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
24060
24686
|
var MS012 = ({
|
|
24061
24687
|
pinCount,
|
|
24062
24688
|
padContactLength = 0.6,
|
|
@@ -24071,7 +24697,7 @@ var MS012 = ({
|
|
|
24071
24697
|
const bodyLength10 = 3.9;
|
|
24072
24698
|
const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
|
|
24073
24699
|
const leadThickness = 0.2;
|
|
24074
|
-
return /* @__PURE__ */
|
|
24700
|
+
return /* @__PURE__ */ jsxs60(Fragment62, { children: [
|
|
24075
24701
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx167(
|
|
24076
24702
|
SmdChipLead,
|
|
24077
24703
|
{
|
|
@@ -24125,7 +24751,7 @@ var MS012 = ({
|
|
|
24125
24751
|
};
|
|
24126
24752
|
|
|
24127
24753
|
// lib/ms013.tsx
|
|
24128
|
-
import { Fragment as Fragment63, jsx as jsx168, jsxs as
|
|
24754
|
+
import { Fragment as Fragment63, jsx as jsx168, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
24129
24755
|
var MS013 = ({
|
|
24130
24756
|
pinCount = 16,
|
|
24131
24757
|
padContactLength = 0.6,
|
|
@@ -24140,7 +24766,7 @@ var MS013 = ({
|
|
|
24140
24766
|
const bodyLength10 = 10.3;
|
|
24141
24767
|
const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
|
|
24142
24768
|
const leadThickness = 0.2;
|
|
24143
|
-
return /* @__PURE__ */
|
|
24769
|
+
return /* @__PURE__ */ jsxs61(Fragment63, { children: [
|
|
24144
24770
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx168(
|
|
24145
24771
|
SmdChipLead,
|
|
24146
24772
|
{
|
|
@@ -24199,10 +24825,10 @@ import {
|
|
|
24199
24825
|
Cuboid as Cuboid40,
|
|
24200
24826
|
Cylinder as Cylinder13,
|
|
24201
24827
|
Rotate as Rotate12,
|
|
24202
|
-
Subtract as
|
|
24828
|
+
Subtract as Subtract11,
|
|
24203
24829
|
Translate as Translate29
|
|
24204
24830
|
} from "jscad-fiber";
|
|
24205
|
-
import { Fragment as Fragment64, jsx as jsx169, jsxs as
|
|
24831
|
+
import { Fragment as Fragment64, jsx as jsx169, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
24206
24832
|
var TO220_DEFAULT_LEADS = [
|
|
24207
24833
|
{ x: -2.54, y: -1 },
|
|
24208
24834
|
{ x: 0, y: -1 },
|
|
@@ -24232,7 +24858,7 @@ var TO220 = ({
|
|
|
24232
24858
|
const holeZ = tabTop - Math.max(mountingHoleDiameter * 0.8, 2.6);
|
|
24233
24859
|
const leadWidth = 0.8;
|
|
24234
24860
|
const leadThickness = 0.5;
|
|
24235
|
-
return /* @__PURE__ */
|
|
24861
|
+
return /* @__PURE__ */ jsxs62(Fragment64, { children: [
|
|
24236
24862
|
/* @__PURE__ */ jsx169(Colorize87, { color: bodyColor, children: /* @__PURE__ */ jsx169(
|
|
24237
24863
|
Cuboid40,
|
|
24238
24864
|
{
|
|
@@ -24240,7 +24866,7 @@ var TO220 = ({
|
|
|
24240
24866
|
center: [centerX, centerY, bodyBottom + bodyHeight / 2]
|
|
24241
24867
|
}
|
|
24242
24868
|
) }),
|
|
24243
|
-
/* @__PURE__ */ jsx169(Colorize87, { color: mouldedTab ? bodyColor : tabColor, children: /* @__PURE__ */
|
|
24869
|
+
/* @__PURE__ */ jsx169(Colorize87, { color: mouldedTab ? bodyColor : tabColor, children: /* @__PURE__ */ jsxs62(Subtract11, { children: [
|
|
24244
24870
|
/* @__PURE__ */ jsx169(
|
|
24245
24871
|
Cuboid40,
|
|
24246
24872
|
{
|
|
@@ -24267,7 +24893,7 @@ var TO220 = ({
|
|
|
24267
24893
|
};
|
|
24268
24894
|
|
|
24269
24895
|
// lib/SOT-457.tsx
|
|
24270
|
-
import { Fragment as Fragment65, jsx as jsx170, jsxs as
|
|
24896
|
+
import { Fragment as Fragment65, jsx as jsx170, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
24271
24897
|
var SOT457 = () => {
|
|
24272
24898
|
const fullWidth = 2.8;
|
|
24273
24899
|
const bodyWidth = 1.6;
|
|
@@ -24279,7 +24905,7 @@ var SOT457 = () => {
|
|
|
24279
24905
|
const padContactLength = 0.5;
|
|
24280
24906
|
const padPitch = 0.95;
|
|
24281
24907
|
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
24282
|
-
return /* @__PURE__ */
|
|
24908
|
+
return /* @__PURE__ */ jsxs63(Fragment65, { children: [
|
|
24283
24909
|
/* @__PURE__ */ jsx170(
|
|
24284
24910
|
SmdChipLead,
|
|
24285
24911
|
{
|
|
@@ -24400,7 +25026,7 @@ var SOT457 = () => {
|
|
|
24400
25026
|
|
|
24401
25027
|
// lib/SOT-963.tsx
|
|
24402
25028
|
import { Cuboid as Cuboid41 } from "jscad-fiber";
|
|
24403
|
-
import { Fragment as Fragment66, jsx as jsx171, jsxs as
|
|
25029
|
+
import { Fragment as Fragment66, jsx as jsx171, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
24404
25030
|
var SOT963 = () => {
|
|
24405
25031
|
const bodyWidth = 0.8;
|
|
24406
25032
|
const bodyLength10 = 1;
|
|
@@ -24411,7 +25037,7 @@ var SOT963 = () => {
|
|
|
24411
25037
|
const pitch = 0.35;
|
|
24412
25038
|
const pinsPerSide = 3;
|
|
24413
25039
|
const pinSpan = pitch * (pinsPerSide - 1);
|
|
24414
|
-
return /* @__PURE__ */
|
|
25040
|
+
return /* @__PURE__ */ jsxs64(Fragment66, { children: [
|
|
24415
25041
|
/* @__PURE__ */ jsx171(
|
|
24416
25042
|
ChipBody,
|
|
24417
25043
|
{
|
|
@@ -24470,9 +25096,9 @@ import {
|
|
|
24470
25096
|
Hull as Hull23,
|
|
24471
25097
|
Translate as Translate30,
|
|
24472
25098
|
Cylinder as Cylinder14,
|
|
24473
|
-
Subtract as
|
|
25099
|
+
Subtract as Subtract12
|
|
24474
25100
|
} from "jscad-fiber";
|
|
24475
|
-
import { Fragment as Fragment67, jsx as jsx172, jsxs as
|
|
25101
|
+
import { Fragment as Fragment67, jsx as jsx172, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
24476
25102
|
var TO92_DEFAULT_LEADS = [
|
|
24477
25103
|
{ x: -1.27, y: 0.98 },
|
|
24478
25104
|
{ x: 0, y: 2.25 },
|
|
@@ -24531,8 +25157,8 @@ var TO92 = ({
|
|
|
24531
25157
|
legWidth,
|
|
24532
25158
|
legThickness
|
|
24533
25159
|
];
|
|
24534
|
-
return /* @__PURE__ */
|
|
24535
|
-
/* @__PURE__ */ jsx172(Colorize88, { color: bodyColor, children: /* @__PURE__ */
|
|
25160
|
+
return /* @__PURE__ */ jsxs65(Fragment67, { children: [
|
|
25161
|
+
/* @__PURE__ */ jsx172(Colorize88, { color: bodyColor, children: /* @__PURE__ */ jsxs65(Subtract12, { children: [
|
|
24536
25162
|
/* @__PURE__ */ jsx172(
|
|
24537
25163
|
Translate30,
|
|
24538
25164
|
{
|
|
@@ -24554,8 +25180,8 @@ var TO92 = ({
|
|
|
24554
25180
|
] }) }),
|
|
24555
25181
|
leads.map((lead, index) => {
|
|
24556
25182
|
const exit = exitFor(index);
|
|
24557
|
-
return /* @__PURE__ */
|
|
24558
|
-
/* @__PURE__ */
|
|
25183
|
+
return /* @__PURE__ */ jsxs65(Translate30, { center: [0, 0, 0], children: [
|
|
25184
|
+
/* @__PURE__ */ jsxs65(Hull23, { children: [
|
|
24559
25185
|
/* @__PURE__ */ jsx172(Translate30, { center: [lead.x, lead.y, 0], children: /* @__PURE__ */ jsx172(Cuboid42, { size: leadSize }) }),
|
|
24560
25186
|
/* @__PURE__ */ jsx172(Translate30, { center: [exit.x, exit.y, standoff], children: /* @__PURE__ */ jsx172(Cuboid42, { size: leadSize }) })
|
|
24561
25187
|
] }),
|
|
@@ -24566,7 +25192,7 @@ var TO92 = ({
|
|
|
24566
25192
|
};
|
|
24567
25193
|
|
|
24568
25194
|
// lib/SOT-363.tsx
|
|
24569
|
-
import { Fragment as Fragment68, jsx as jsx173, jsxs as
|
|
25195
|
+
import { Fragment as Fragment68, jsx as jsx173, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
24570
25196
|
var SOT363 = () => {
|
|
24571
25197
|
const fullWidth = 2;
|
|
24572
25198
|
const bodyWidth = 1.25;
|
|
@@ -24577,7 +25203,7 @@ var SOT363 = () => {
|
|
|
24577
25203
|
const leadHeight = 0.85;
|
|
24578
25204
|
const padContactLength = 0.3;
|
|
24579
25205
|
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
24580
|
-
return /* @__PURE__ */
|
|
25206
|
+
return /* @__PURE__ */ jsxs66(Fragment68, { children: [
|
|
24581
25207
|
/* @__PURE__ */ jsx173(
|
|
24582
25208
|
SmdChipLead,
|
|
24583
25209
|
{
|
|
@@ -24699,7 +25325,7 @@ var SOT_363_default = SOT363;
|
|
|
24699
25325
|
|
|
24700
25326
|
// lib/SOT-886.tsx
|
|
24701
25327
|
import { Cuboid as Cuboid43 } from "jscad-fiber";
|
|
24702
|
-
import { Fragment as Fragment69, jsx as jsx174, jsxs as
|
|
25328
|
+
import { Fragment as Fragment69, jsx as jsx174, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
24703
25329
|
var SOT886 = () => {
|
|
24704
25330
|
const bodyWidth = 1;
|
|
24705
25331
|
const bodyLength10 = 1.45;
|
|
@@ -24710,7 +25336,7 @@ var SOT886 = () => {
|
|
|
24710
25336
|
const pitch = 0.5;
|
|
24711
25337
|
const pinsPerSide = 3;
|
|
24712
25338
|
const pinSpan = pitch * (pinsPerSide - 1);
|
|
24713
|
-
return /* @__PURE__ */
|
|
25339
|
+
return /* @__PURE__ */ jsxs67(Fragment69, { children: [
|
|
24714
25340
|
/* @__PURE__ */ jsx174(
|
|
24715
25341
|
ChipBody,
|
|
24716
25342
|
{
|
|
@@ -24759,7 +25385,7 @@ var SOT886 = () => {
|
|
|
24759
25385
|
|
|
24760
25386
|
// lib/sod-323.tsx
|
|
24761
25387
|
import { Colorize as Colorize89, Cuboid as Cuboid44 } from "jscad-fiber";
|
|
24762
|
-
import { Fragment as Fragment70, jsx as jsx175, jsxs as
|
|
25388
|
+
import { Fragment as Fragment70, jsx as jsx175, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
24763
25389
|
var SOD323 = () => {
|
|
24764
25390
|
const fullWidth = 2.5;
|
|
24765
25391
|
const bodyLength10 = 1.4;
|
|
@@ -24771,7 +25397,7 @@ var SOD323 = () => {
|
|
|
24771
25397
|
const padCenterX = bodyWidth / 2;
|
|
24772
25398
|
const bodyDistance = 0.45;
|
|
24773
25399
|
const leadHeight = 0.7;
|
|
24774
|
-
return /* @__PURE__ */
|
|
25400
|
+
return /* @__PURE__ */ jsxs68(Fragment70, { children: [
|
|
24775
25401
|
/* @__PURE__ */ jsx175(
|
|
24776
25402
|
SmdChipLead,
|
|
24777
25403
|
{
|
|
@@ -24831,7 +25457,7 @@ var SOD323 = () => {
|
|
|
24831
25457
|
|
|
24832
25458
|
// lib/sod-323F.tsx
|
|
24833
25459
|
import { Colorize as Colorize90, Cuboid as Cuboid45, Hull as Hull25, Translate as Translate32, Union as Union19 } from "jscad-fiber";
|
|
24834
|
-
import { Fragment as Fragment71, jsx as jsx176, jsxs as
|
|
25460
|
+
import { Fragment as Fragment71, jsx as jsx176, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
24835
25461
|
var SOD323F = () => {
|
|
24836
25462
|
const fullWidth = 1.7;
|
|
24837
25463
|
const bodyLength10 = 1.25;
|
|
@@ -24843,7 +25469,7 @@ var SOD323F = () => {
|
|
|
24843
25469
|
const rightPadCenterX = fullWidth / 2 + padLength / 2;
|
|
24844
25470
|
const taperOffset = 0.2;
|
|
24845
25471
|
const straightHeight = padThickness;
|
|
24846
|
-
return /* @__PURE__ */
|
|
25472
|
+
return /* @__PURE__ */ jsxs69(Fragment71, { children: [
|
|
24847
25473
|
/* @__PURE__ */ jsx176(
|
|
24848
25474
|
Cuboid45,
|
|
24849
25475
|
{
|
|
@@ -24860,9 +25486,9 @@ var SOD323F = () => {
|
|
|
24860
25486
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
24861
25487
|
}
|
|
24862
25488
|
),
|
|
24863
|
-
/* @__PURE__ */ jsx176(Colorize90, { color: "#222", children: /* @__PURE__ */
|
|
25489
|
+
/* @__PURE__ */ jsx176(Colorize90, { color: "#222", children: /* @__PURE__ */ jsxs69(Union19, { children: [
|
|
24864
25490
|
/* @__PURE__ */ jsx176(Translate32, { z: straightHeight / 2, children: /* @__PURE__ */ jsx176(Cuboid45, { size: [fullWidth, bodyLength10, straightHeight] }) }),
|
|
24865
|
-
/* @__PURE__ */
|
|
25491
|
+
/* @__PURE__ */ jsxs69(Hull25, { children: [
|
|
24866
25492
|
/* @__PURE__ */ jsx176(Translate32, { z: straightHeight, children: /* @__PURE__ */ jsx176(Cuboid45, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
24867
25493
|
/* @__PURE__ */ jsx176(Translate32, { z: bodyHeight, children: /* @__PURE__ */ jsx176(
|
|
24868
25494
|
Cuboid45,
|
|
@@ -24885,7 +25511,7 @@ var SOD323F = () => {
|
|
|
24885
25511
|
|
|
24886
25512
|
// lib/sod-323FL.tsx
|
|
24887
25513
|
import { Colorize as Colorize91, Cuboid as Cuboid46 } from "jscad-fiber";
|
|
24888
|
-
import { Fragment as Fragment72, jsx as jsx177, jsxs as
|
|
25514
|
+
import { Fragment as Fragment72, jsx as jsx177, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
24889
25515
|
var SOD323FL = () => {
|
|
24890
25516
|
const fullWidth = 1.775;
|
|
24891
25517
|
const bodyLength10 = 1.25;
|
|
@@ -24896,7 +25522,7 @@ var SOD323FL = () => {
|
|
|
24896
25522
|
const leftPadCenterX = -fullWidth / 2 - padLength / 2 + 0.04;
|
|
24897
25523
|
const rightPadCenterX = fullWidth / 2 + padLength / 2 - 0.04;
|
|
24898
25524
|
const taperOffset = 0.2;
|
|
24899
|
-
return /* @__PURE__ */
|
|
25525
|
+
return /* @__PURE__ */ jsxs70(Fragment72, { children: [
|
|
24900
25526
|
/* @__PURE__ */ jsx177(
|
|
24901
25527
|
Cuboid46,
|
|
24902
25528
|
{
|
|
@@ -24939,10 +25565,10 @@ var SOD323FL = () => {
|
|
|
24939
25565
|
|
|
24940
25566
|
// lib/AxialCapacitor.tsx
|
|
24941
25567
|
import { Colorize as Colorize92, Cylinder as Cylinder15, Rotate as Rotate13, Sphere as Sphere2, Translate as Translate34 } from "jscad-fiber";
|
|
24942
|
-
import { Fragment as Fragment73, jsx as jsx178, jsxs as
|
|
25568
|
+
import { Fragment as Fragment73, jsx as jsx178, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
24943
25569
|
var AxialCapacitor = ({ pitch = 10 }) => {
|
|
24944
25570
|
const heightToCenterOfCapacitor = 0.5 + 4 / 2;
|
|
24945
|
-
return /* @__PURE__ */
|
|
25571
|
+
return /* @__PURE__ */ jsxs71(Fragment73, { children: [
|
|
24946
25572
|
/* @__PURE__ */ jsx178(Cylinder15, { height: 4, radius: 0.5, center: [-pitch / 2, 0, 0.5] }),
|
|
24947
25573
|
/* @__PURE__ */ jsx178(
|
|
24948
25574
|
Sphere2,
|
|
@@ -24951,7 +25577,7 @@ var AxialCapacitor = ({ pitch = 10 }) => {
|
|
|
24951
25577
|
center: [-pitch / 2, 0, heightToCenterOfCapacitor]
|
|
24952
25578
|
}
|
|
24953
25579
|
),
|
|
24954
|
-
/* @__PURE__ */ jsx178(Translate34, { x: -2.5, y: 0, z: heightToCenterOfCapacitor, children: /* @__PURE__ */
|
|
25580
|
+
/* @__PURE__ */ jsx178(Translate34, { x: -2.5, y: 0, z: heightToCenterOfCapacitor, children: /* @__PURE__ */ jsxs71(Rotate13, { rotation: [0, Math.PI / 2, 0], children: [
|
|
24955
25581
|
/* @__PURE__ */ jsx178(
|
|
24956
25582
|
Cylinder15,
|
|
24957
25583
|
{
|
|
@@ -24975,8 +25601,8 @@ var AxialCapacitor = ({ pitch = 10 }) => {
|
|
|
24975
25601
|
};
|
|
24976
25602
|
|
|
24977
25603
|
// lib/stampboard.tsx
|
|
24978
|
-
import { Colorize as Colorize93, Cuboid as Cuboid47, Cylinder as Cylinder16, Subtract as
|
|
24979
|
-
import { Fragment as Fragment74, jsx as jsx179, jsxs as
|
|
25604
|
+
import { Colorize as Colorize93, Cuboid as Cuboid47, Cylinder as Cylinder16, Subtract as Subtract13, Union as Union21 } from "jscad-fiber";
|
|
25605
|
+
import { Fragment as Fragment74, jsx as jsx179, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
24980
25606
|
var StampBoard = ({
|
|
24981
25607
|
bodyWidth = 21,
|
|
24982
25608
|
boardThickness = 0.5,
|
|
@@ -25074,7 +25700,7 @@ var StampBoard = ({
|
|
|
25074
25700
|
}
|
|
25075
25701
|
}
|
|
25076
25702
|
}
|
|
25077
|
-
const boardBody = /* @__PURE__ */ jsx179(Colorize93, { color: "#051a0a", children: /* @__PURE__ */
|
|
25703
|
+
const boardBody = /* @__PURE__ */ jsx179(Colorize93, { color: "#051a0a", children: /* @__PURE__ */ jsxs72(Subtract13, { children: [
|
|
25078
25704
|
/* @__PURE__ */ jsx179(
|
|
25079
25705
|
Cuboid47,
|
|
25080
25706
|
{
|
|
@@ -25109,9 +25735,9 @@ var StampBoard = ({
|
|
|
25109
25735
|
},
|
|
25110
25736
|
index
|
|
25111
25737
|
));
|
|
25112
|
-
return /* @__PURE__ */
|
|
25738
|
+
return /* @__PURE__ */ jsxs72(Fragment74, { children: [
|
|
25113
25739
|
boardBody,
|
|
25114
|
-
/* @__PURE__ */ jsx179(Colorize93, { color: "#FFD700", children: innerHoles ? /* @__PURE__ */
|
|
25740
|
+
/* @__PURE__ */ jsx179(Colorize93, { color: "#FFD700", children: innerHoles ? /* @__PURE__ */ jsxs72(Subtract13, { children: [
|
|
25115
25741
|
/* @__PURE__ */ jsx179(Union21, { children: pads.map((pad, index) => /* @__PURE__ */ jsx179(
|
|
25116
25742
|
Cuboid47,
|
|
25117
25743
|
{
|
|
@@ -25126,8 +25752,8 @@ var StampBoard = ({
|
|
|
25126
25752
|
};
|
|
25127
25753
|
|
|
25128
25754
|
// lib/MountedPcbModule.tsx
|
|
25129
|
-
import { Colorize as Colorize94, Cuboid as Cuboid48, Cylinder as Cylinder17, Subtract as
|
|
25130
|
-
import { Fragment as Fragment75, jsx as jsx180, jsxs as
|
|
25755
|
+
import { Colorize as Colorize94, Cuboid as Cuboid48, Cylinder as Cylinder17, Subtract as Subtract14 } from "jscad-fiber";
|
|
25756
|
+
import { Fragment as Fragment75, jsx as jsx180, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
25131
25757
|
var MountedPcbModule = ({
|
|
25132
25758
|
numPins = 5,
|
|
25133
25759
|
rows = 1,
|
|
@@ -25228,7 +25854,7 @@ var MountedPcbModule = ({
|
|
|
25228
25854
|
const shortSidePinLength = 3;
|
|
25229
25855
|
const boardOffsetZ = nopin || female ? 0 : pinBodyHeight;
|
|
25230
25856
|
const boardTopZ = boardOffsetZ + boardThickness;
|
|
25231
|
-
const boardBody = /* @__PURE__ */ jsx180(Colorize94, { color: "#008080", children: /* @__PURE__ */
|
|
25857
|
+
const boardBody = /* @__PURE__ */ jsx180(Colorize94, { color: "#008080", children: /* @__PURE__ */ jsxs73(Subtract14, { children: [
|
|
25232
25858
|
/* @__PURE__ */ jsx180(
|
|
25233
25859
|
Cuboid48,
|
|
25234
25860
|
{
|
|
@@ -25255,7 +25881,7 @@ var MountedPcbModule = ({
|
|
|
25255
25881
|
`pin-hole-${index}`
|
|
25256
25882
|
))
|
|
25257
25883
|
] }) });
|
|
25258
|
-
const platedHoles = pins.map((pin, index) => /* @__PURE__ */ jsx180(Colorize94, { color: "#FFD700", children: /* @__PURE__ */
|
|
25884
|
+
const platedHoles = pins.map((pin, index) => /* @__PURE__ */ jsx180(Colorize94, { color: "#FFD700", children: /* @__PURE__ */ jsxs73(Subtract14, { children: [
|
|
25259
25885
|
/* @__PURE__ */ jsx180(
|
|
25260
25886
|
Cylinder17,
|
|
25261
25887
|
{
|
|
@@ -25295,7 +25921,7 @@ var MountedPcbModule = ({
|
|
|
25295
25921
|
},
|
|
25296
25922
|
`female-pin-3d-${index}`
|
|
25297
25923
|
));
|
|
25298
|
-
return /* @__PURE__ */
|
|
25924
|
+
return /* @__PURE__ */ jsxs73(Fragment75, { children: [
|
|
25299
25925
|
boardBody,
|
|
25300
25926
|
platedHoles,
|
|
25301
25927
|
!female && !nopin && headerPins,
|
|
@@ -25317,7 +25943,7 @@ var MountedPcbModule = ({
|
|
|
25317
25943
|
|
|
25318
25944
|
// lib/SOD723.tsx
|
|
25319
25945
|
import { Colorize as Colorize95, Cuboid as Cuboid49, Hull as Hull27, Translate as Translate35, Union as Union22 } from "jscad-fiber";
|
|
25320
|
-
import { Fragment as Fragment76, jsx as jsx181, jsxs as
|
|
25946
|
+
import { Fragment as Fragment76, jsx as jsx181, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
25321
25947
|
var SOD723 = () => {
|
|
25322
25948
|
const fullWidth = 1.4;
|
|
25323
25949
|
const bodyLength10 = 0.6;
|
|
@@ -25330,7 +25956,7 @@ var SOD723 = () => {
|
|
|
25330
25956
|
const rightPadCenterX = bodyWidth / 2 - padLength / 2 + 0.15;
|
|
25331
25957
|
const taperOffset = 0.2;
|
|
25332
25958
|
const straightHeight = bodyHeight * 0.24;
|
|
25333
|
-
return /* @__PURE__ */
|
|
25959
|
+
return /* @__PURE__ */ jsxs74(Fragment76, { children: [
|
|
25334
25960
|
/* @__PURE__ */ jsx181(
|
|
25335
25961
|
Cuboid49,
|
|
25336
25962
|
{
|
|
@@ -25347,9 +25973,9 @@ var SOD723 = () => {
|
|
|
25347
25973
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
25348
25974
|
}
|
|
25349
25975
|
),
|
|
25350
|
-
/* @__PURE__ */ jsx181(Colorize95, { color: "#222", children: /* @__PURE__ */
|
|
25976
|
+
/* @__PURE__ */ jsx181(Colorize95, { color: "#222", children: /* @__PURE__ */ jsxs74(Union22, { children: [
|
|
25351
25977
|
/* @__PURE__ */ jsx181(Translate35, { z: straightHeight / 2, children: /* @__PURE__ */ jsx181(Cuboid49, { size: [bodyWidth, bodyLength10, straightHeight] }) }),
|
|
25352
|
-
/* @__PURE__ */
|
|
25978
|
+
/* @__PURE__ */ jsxs74(Hull27, { children: [
|
|
25353
25979
|
/* @__PURE__ */ jsx181(Translate35, { z: straightHeight, children: /* @__PURE__ */ jsx181(Cuboid49, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
25354
25980
|
/* @__PURE__ */ jsx181(Translate35, { z: bodyHeight, children: /* @__PURE__ */ jsx181(
|
|
25355
25981
|
Cuboid49,
|
|
@@ -25377,10 +26003,10 @@ import {
|
|
|
25377
26003
|
Cuboid as Cuboid50,
|
|
25378
26004
|
Cylinder as Cylinder18,
|
|
25379
26005
|
Rotate as Rotate14,
|
|
25380
|
-
Subtract as
|
|
26006
|
+
Subtract as Subtract15,
|
|
25381
26007
|
Translate as Translate36
|
|
25382
26008
|
} from "jscad-fiber";
|
|
25383
|
-
import { Fragment as Fragment77, jsx as jsx182, jsxs as
|
|
26009
|
+
import { Fragment as Fragment77, jsx as jsx182, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
25384
26010
|
var JSTZH1_5mm = ({
|
|
25385
26011
|
numPins = 7,
|
|
25386
26012
|
showPins = true,
|
|
@@ -25396,13 +26022,13 @@ var JSTZH1_5mm = ({
|
|
|
25396
26022
|
const pinLength = 6;
|
|
25397
26023
|
const bodyWidth = (numPins - 1) * pitch + 4;
|
|
25398
26024
|
const startX = -((numPins - 1) * pitch) / 2;
|
|
25399
|
-
return /* @__PURE__ */
|
|
26025
|
+
return /* @__PURE__ */ jsxs75(Fragment77, { children: [
|
|
25400
26026
|
/* @__PURE__ */ jsx182(Translate36, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx182(Rotate14, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx182(
|
|
25401
26027
|
Colorize96,
|
|
25402
26028
|
{
|
|
25403
26029
|
material: componentMaterials.moldedPlastic,
|
|
25404
26030
|
color: bodyColor,
|
|
25405
|
-
children: /* @__PURE__ */
|
|
26031
|
+
children: /* @__PURE__ */ jsxs75(Subtract15, { children: [
|
|
25406
26032
|
/* @__PURE__ */ jsx182(
|
|
25407
26033
|
Cuboid50,
|
|
25408
26034
|
{
|
|
@@ -25554,10 +26180,10 @@ import {
|
|
|
25554
26180
|
Cuboid as Cuboid51,
|
|
25555
26181
|
Cylinder as Cylinder19,
|
|
25556
26182
|
Rotate as Rotate15,
|
|
25557
|
-
Subtract as
|
|
26183
|
+
Subtract as Subtract16,
|
|
25558
26184
|
Translate as Translate37
|
|
25559
26185
|
} from "jscad-fiber";
|
|
25560
|
-
import { Fragment as Fragment78, jsx as jsx183, jsxs as
|
|
26186
|
+
import { Fragment as Fragment78, jsx as jsx183, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
25561
26187
|
var JSTPH2_0mm = ({
|
|
25562
26188
|
numPins = 2,
|
|
25563
26189
|
showPins = true,
|
|
@@ -25581,13 +26207,13 @@ var JSTPH2_0mm = ({
|
|
|
25581
26207
|
const latchWindowInset = 0.7;
|
|
25582
26208
|
const topReliefWidth = 0.8;
|
|
25583
26209
|
const topReliefDepth = 0.65;
|
|
25584
|
-
return /* @__PURE__ */
|
|
26210
|
+
return /* @__PURE__ */ jsxs76(Fragment78, { children: [
|
|
25585
26211
|
/* @__PURE__ */ jsx183(Translate37, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx183(Rotate15, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx183(
|
|
25586
26212
|
Colorize97,
|
|
25587
26213
|
{
|
|
25588
26214
|
color: bodyColor,
|
|
25589
26215
|
material: componentMaterials.moldedPlastic,
|
|
25590
|
-
children: /* @__PURE__ */
|
|
26216
|
+
children: /* @__PURE__ */ jsxs76(Subtract16, { children: [
|
|
25591
26217
|
/* @__PURE__ */ jsx183(
|
|
25592
26218
|
Cuboid51,
|
|
25593
26219
|
{
|
|
@@ -25755,9 +26381,9 @@ var JSTPH2_0mm = ({
|
|
|
25755
26381
|
};
|
|
25756
26382
|
|
|
25757
26383
|
// lib/JSTXH2_5mm.tsx
|
|
25758
|
-
import { Colorize as Colorize98, Cuboid as Cuboid52, Subtract as
|
|
26384
|
+
import { Colorize as Colorize98, Cuboid as Cuboid52, Subtract as Subtract17, Translate as Translate38 } from "jscad-fiber";
|
|
25759
26385
|
import { fp as fp3 } from "@tscircuit/footprinter";
|
|
25760
|
-
import { Fragment as Fragment79, jsx as jsx184, jsxs as
|
|
26386
|
+
import { Fragment as Fragment79, jsx as jsx184, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
25761
26387
|
var JSTXH2_5mm = ({
|
|
25762
26388
|
numPins = 4,
|
|
25763
26389
|
showPins = true,
|
|
@@ -25785,8 +26411,8 @@ var JSTXH2_5mm = ({
|
|
|
25785
26411
|
Math.max(3, (numPins - 1) * pitch * 0.4 + 2.2)
|
|
25786
26412
|
);
|
|
25787
26413
|
const lockNotchHeight = 2.4;
|
|
25788
|
-
return /* @__PURE__ */
|
|
25789
|
-
/* @__PURE__ */ jsx184(Translate38, { offset: [0, 0, bodyHeight / 2], children: /* @__PURE__ */ jsx184(Colorize98, { material: componentMaterials.moldedPlastic, color: bodyColor, children: /* @__PURE__ */
|
|
26414
|
+
return /* @__PURE__ */ jsxs77(Fragment79, { children: [
|
|
26415
|
+
/* @__PURE__ */ jsx184(Translate38, { offset: [0, 0, bodyHeight / 2], children: /* @__PURE__ */ jsx184(Colorize98, { material: componentMaterials.moldedPlastic, color: bodyColor, children: /* @__PURE__ */ jsxs77(Subtract17, { children: [
|
|
25790
26416
|
/* @__PURE__ */ jsx184(Cuboid52, { size: [bodyWidth, bodyDepth, bodyHeight] }),
|
|
25791
26417
|
/* @__PURE__ */ jsx184(Translate38, { offset: [0, 0, (bodyHeight - hollowHeight) / 2 + 0.1], children: /* @__PURE__ */ jsx184(
|
|
25792
26418
|
Cuboid52,
|
|
@@ -25919,8 +26545,8 @@ var mm2 = (n) => {
|
|
|
25919
26545
|
};
|
|
25920
26546
|
|
|
25921
26547
|
// lib/JstSh.tsx
|
|
25922
|
-
import { Colorize as Colorize99, Cuboid as Cuboid53, Rotate as Rotate16, Subtract as
|
|
25923
|
-
import { jsx as jsx185, jsxs as
|
|
26548
|
+
import { Colorize as Colorize99, Cuboid as Cuboid53, Rotate as Rotate16, Subtract as Subtract18, Union as Union23 } from "jscad-fiber";
|
|
26549
|
+
import { jsx as jsx185, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
25924
26550
|
function isJstShFootprint(footprint) {
|
|
25925
26551
|
const p = fp4.string(footprint).json();
|
|
25926
26552
|
if (p.fn !== "jst") return false;
|
|
@@ -25948,8 +26574,8 @@ var JstSh = ({ footprint = "jst6_sh" }) => {
|
|
|
25948
26574
|
const direction = mounts[0].y > rowY ? 1 : -1;
|
|
25949
26575
|
const y = rowY + direction * 1.8, width10 = n + 2, depth = 2.9, height10 = 4.2;
|
|
25950
26576
|
const pinY = y - direction * 0.25;
|
|
25951
|
-
return /* @__PURE__ */
|
|
25952
|
-
/* @__PURE__ */ jsx185(Colorize99, { material: componentMaterials.moldedPlastic, color: "#e4e1d6", children: /* @__PURE__ */
|
|
26577
|
+
return /* @__PURE__ */ jsxs78(Rotate16, { rotation: [0, 0, angle], children: [
|
|
26578
|
+
/* @__PURE__ */ jsx185(Colorize99, { material: componentMaterials.moldedPlastic, color: "#e4e1d6", children: /* @__PURE__ */ jsxs78(Subtract18, { children: [
|
|
25953
26579
|
/* @__PURE__ */ jsx185(
|
|
25954
26580
|
Cuboid53,
|
|
25955
26581
|
{
|
|
@@ -25985,10 +26611,10 @@ var JstSh = ({ footprint = "jst6_sh" }) => {
|
|
|
25985
26611
|
side
|
|
25986
26612
|
))
|
|
25987
26613
|
] }) }),
|
|
25988
|
-
/* @__PURE__ */
|
|
26614
|
+
/* @__PURE__ */ jsxs78(Colorize99, { material: componentMaterials.tinnedLead, color: "#c6c7c9", children: [
|
|
25989
26615
|
signals.map((pad, i) => {
|
|
25990
26616
|
const tailY = pad.y - direction * pad.height * 0.4;
|
|
25991
|
-
return /* @__PURE__ */
|
|
26617
|
+
return /* @__PURE__ */ jsxs78(Union23, { children: [
|
|
25992
26618
|
/* @__PURE__ */ jsx185(
|
|
25993
26619
|
Cuboid53,
|
|
25994
26620
|
{
|
|
@@ -25999,7 +26625,7 @@ var JstSh = ({ footprint = "jst6_sh" }) => {
|
|
|
25999
26625
|
/* @__PURE__ */ jsx185(Cuboid53, { size: [0.2, 0.2, 3.45], center: [pad.x, pinY, 1.725] })
|
|
26000
26626
|
] }, i);
|
|
26001
26627
|
}),
|
|
26002
|
-
mounts.map((pad, i) => /* @__PURE__ */
|
|
26628
|
+
mounts.map((pad, i) => /* @__PURE__ */ jsxs78(Union23, { children: [
|
|
26003
26629
|
/* @__PURE__ */ jsx185(
|
|
26004
26630
|
Cuboid53,
|
|
26005
26631
|
{
|
|
@@ -26026,10 +26652,10 @@ import {
|
|
|
26026
26652
|
Cylinder as Cylinder20,
|
|
26027
26653
|
Rotate as Rotate17,
|
|
26028
26654
|
RoundedCuboid as RoundedCuboid5,
|
|
26029
|
-
Subtract as
|
|
26655
|
+
Subtract as Subtract19,
|
|
26030
26656
|
Translate as Translate39
|
|
26031
26657
|
} from "jscad-fiber";
|
|
26032
|
-
import { Fragment as Fragment80, jsx as jsx186, jsxs as
|
|
26658
|
+
import { Fragment as Fragment80, jsx as jsx186, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
26033
26659
|
var HOUSING_COLOR = "#303339";
|
|
26034
26660
|
var HOUSING_SHADOW = "#1f2227";
|
|
26035
26661
|
var ACTUATOR_COLOR = "#eee8d8";
|
|
@@ -26116,7 +26742,7 @@ var FPC = ({
|
|
|
26116
26742
|
const clipCapX = bodyWidth / 2 - 0.23;
|
|
26117
26743
|
const sideBossX = bodyWidth / 2 - 0.32;
|
|
26118
26744
|
const sideBossWidth = 0.68;
|
|
26119
|
-
return /* @__PURE__ */
|
|
26745
|
+
return /* @__PURE__ */ jsxs79(Fragment80, { children: [
|
|
26120
26746
|
[-1, 1].map((direction) => /* @__PURE__ */ jsx186(
|
|
26121
26747
|
Cuboid54,
|
|
26122
26748
|
{
|
|
@@ -26144,7 +26770,7 @@ var FPC = ({
|
|
|
26144
26770
|
roundRadius: 0.1
|
|
26145
26771
|
}
|
|
26146
26772
|
),
|
|
26147
|
-
/* @__PURE__ */ jsx186(Colorize100, { color: HOUSING_COLOR, children: /* @__PURE__ */
|
|
26773
|
+
/* @__PURE__ */ jsx186(Colorize100, { color: HOUSING_COLOR, children: /* @__PURE__ */ jsxs79(Subtract19, { children: [
|
|
26148
26774
|
/* @__PURE__ */ jsx186(
|
|
26149
26775
|
RoundedCuboid5,
|
|
26150
26776
|
{
|
|
@@ -26296,7 +26922,7 @@ var FPC = ({
|
|
|
26296
26922
|
|
|
26297
26923
|
// lib/SmdPinHeader.tsx
|
|
26298
26924
|
import { Colorize as Colorize101, Cuboid as Cuboid55, Hull as Hull28, Translate as Translate40 } from "jscad-fiber";
|
|
26299
|
-
import { Fragment as Fragment81, jsx as jsx187, jsxs as
|
|
26925
|
+
import { Fragment as Fragment81, jsx as jsx187, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
26300
26926
|
var SmdPinHeader = ({
|
|
26301
26927
|
numberOfPins,
|
|
26302
26928
|
pitch = 2.54,
|
|
@@ -26316,7 +26942,7 @@ var SmdPinHeader = ({
|
|
|
26316
26942
|
const tailDirection = index % 2 === 0 ? 1 : -1;
|
|
26317
26943
|
const postBodyLength = matingPinLength - tipChamferHeight;
|
|
26318
26944
|
const verticalTailLength = standoffHeight - pinThickness / 2;
|
|
26319
|
-
return /* @__PURE__ */
|
|
26945
|
+
return /* @__PURE__ */ jsxs80(Translate40, { x, children: [
|
|
26320
26946
|
/* @__PURE__ */ jsx187(
|
|
26321
26947
|
Cuboid55,
|
|
26322
26948
|
{
|
|
@@ -26325,7 +26951,7 @@ var SmdPinHeader = ({
|
|
|
26325
26951
|
center: [0, 0, standoffHeight + bodyHeight / 2]
|
|
26326
26952
|
}
|
|
26327
26953
|
),
|
|
26328
|
-
/* @__PURE__ */
|
|
26954
|
+
/* @__PURE__ */ jsxs80(Colorize101, { color: "#d4af37", children: [
|
|
26329
26955
|
/* @__PURE__ */ jsx187(
|
|
26330
26956
|
Cuboid55,
|
|
26331
26957
|
{
|
|
@@ -26347,7 +26973,7 @@ var SmdPinHeader = ({
|
|
|
26347
26973
|
center: [0, 0, bodyTop + postBodyLength / 2]
|
|
26348
26974
|
}
|
|
26349
26975
|
),
|
|
26350
|
-
/* @__PURE__ */
|
|
26976
|
+
/* @__PURE__ */ jsxs80(Hull28, { children: [
|
|
26351
26977
|
/* @__PURE__ */ jsx187(
|
|
26352
26978
|
Cuboid55,
|
|
26353
26979
|
{
|
|
@@ -26397,7 +27023,7 @@ var getSmtPadRects = (footprint) => {
|
|
|
26397
27023
|
};
|
|
26398
27024
|
|
|
26399
27025
|
// lib/GullWingBody.tsx
|
|
26400
|
-
import { Fragment as Fragment82, jsx as jsx188, jsxs as
|
|
27026
|
+
import { Fragment as Fragment82, jsx as jsx188, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
26401
27027
|
var GullWingBody = ({
|
|
26402
27028
|
bodyWidth,
|
|
26403
27029
|
bodyLength: bodyLength10,
|
|
@@ -26409,7 +27035,7 @@ var GullWingBody = ({
|
|
|
26409
27035
|
const centerX = pads.reduce((sum, pad) => sum + pad.x, 0) / (pads.length || 1);
|
|
26410
27036
|
const centerY = pads.reduce((sum, pad) => sum + pad.y, 0) / (pads.length || 1);
|
|
26411
27037
|
const leadHeight = bodyHeight * leadHeightRatio;
|
|
26412
|
-
return /* @__PURE__ */
|
|
27038
|
+
return /* @__PURE__ */ jsxs81(Fragment82, { children: [
|
|
26413
27039
|
/* @__PURE__ */ jsx188(
|
|
26414
27040
|
ChipBody,
|
|
26415
27041
|
{
|
|
@@ -26449,7 +27075,7 @@ var GullWingBody = ({
|
|
|
26449
27075
|
|
|
26450
27076
|
// lib/ParametricChip.tsx
|
|
26451
27077
|
import { Cuboid as Cuboid56 } from "jscad-fiber";
|
|
26452
|
-
import { Fragment as Fragment83, jsx as jsx189, jsxs as
|
|
27078
|
+
import { Fragment as Fragment83, jsx as jsx189, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
26453
27079
|
var ParametricChip = ({
|
|
26454
27080
|
padPitch,
|
|
26455
27081
|
padHeight,
|
|
@@ -26460,7 +27086,7 @@ var ParametricChip = ({
|
|
|
26460
27086
|
const height10 = width10;
|
|
26461
27087
|
const terminatorWidth9 = fullLength10 * 0.2;
|
|
26462
27088
|
const bodyLength10 = fullLength10 - terminatorWidth9 * 2;
|
|
26463
|
-
return /* @__PURE__ */
|
|
27089
|
+
return /* @__PURE__ */ jsxs82(Fragment83, { children: [
|
|
26464
27090
|
/* @__PURE__ */ jsx189(
|
|
26465
27091
|
Cuboid56,
|
|
26466
27092
|
{
|
|
@@ -26497,10 +27123,10 @@ import {
|
|
|
26497
27123
|
Cuboid as Cuboid57,
|
|
26498
27124
|
Cylinder as Cylinder21,
|
|
26499
27125
|
Rotate as Rotate18,
|
|
26500
|
-
Subtract as
|
|
27126
|
+
Subtract as Subtract20,
|
|
26501
27127
|
Translate as Translate41
|
|
26502
27128
|
} from "jscad-fiber";
|
|
26503
|
-
import { Fragment as Fragment84, jsx as jsx190, jsxs as
|
|
27129
|
+
import { Fragment as Fragment84, jsx as jsx190, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
26504
27130
|
var Led5050 = ({
|
|
26505
27131
|
color = "#ffff00",
|
|
26506
27132
|
bodyColor = "#ffffff",
|
|
@@ -26521,7 +27147,7 @@ var Led5050 = ({
|
|
|
26521
27147
|
const cornerCutDepth = 0.3;
|
|
26522
27148
|
const leadYPositions = [-1.7, 0, 1.7];
|
|
26523
27149
|
const leadSides = [-1, 1];
|
|
26524
|
-
return /* @__PURE__ */
|
|
27150
|
+
return /* @__PURE__ */ jsxs83(Fragment84, { children: [
|
|
26525
27151
|
leadYPositions.flatMap(
|
|
26526
27152
|
(y) => leadSides.map((side) => /* @__PURE__ */ jsx190(
|
|
26527
27153
|
Cuboid57,
|
|
@@ -26533,7 +27159,7 @@ var Led5050 = ({
|
|
|
26533
27159
|
`${side}-${y}`
|
|
26534
27160
|
))
|
|
26535
27161
|
),
|
|
26536
|
-
/* @__PURE__ */ jsx190(Colorize102, { color: bodyColor, children: /* @__PURE__ */
|
|
27162
|
+
/* @__PURE__ */ jsx190(Colorize102, { color: bodyColor, children: /* @__PURE__ */ jsxs83(Subtract20, { children: [
|
|
26537
27163
|
/* @__PURE__ */ jsx190(
|
|
26538
27164
|
ChipBody,
|
|
26539
27165
|
{
|
|
@@ -26582,7 +27208,7 @@ var Led5050 = ({
|
|
|
26582
27208
|
|
|
26583
27209
|
// lib/Led2835.tsx
|
|
26584
27210
|
import { Colorize as Colorize103, Cuboid as Cuboid58 } from "jscad-fiber";
|
|
26585
|
-
import { Fragment as Fragment85, jsx as jsx191, jsxs as
|
|
27211
|
+
import { Fragment as Fragment85, jsx as jsx191, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
26586
27212
|
var Led2835 = ({
|
|
26587
27213
|
bodyWidth = 3.5,
|
|
26588
27214
|
bodyLength: bodyLength10 = 2.8,
|
|
@@ -26601,7 +27227,7 @@ var Led2835 = ({
|
|
|
26601
27227
|
const bodyCenterX = (pad1X + pad2X) / 2;
|
|
26602
27228
|
const lensWidth = bodyWidth * 0.55;
|
|
26603
27229
|
const lensLength = bodyLength10 * 0.55;
|
|
26604
|
-
return /* @__PURE__ */
|
|
27230
|
+
return /* @__PURE__ */ jsxs84(Fragment85, { children: [
|
|
26605
27231
|
[
|
|
26606
27232
|
{ x: pad1X, w: pad1Width, key: "pad-1" },
|
|
26607
27233
|
{ x: pad2X, w: pad2Width, key: "pad-2" }
|
|
@@ -26640,10 +27266,10 @@ import {
|
|
|
26640
27266
|
Cylinder as Cylinder22,
|
|
26641
27267
|
Rotate as Rotate19,
|
|
26642
27268
|
RoundedCuboid as RoundedCuboid6,
|
|
26643
|
-
Subtract as
|
|
27269
|
+
Subtract as Subtract21,
|
|
26644
27270
|
Translate as Translate42
|
|
26645
27271
|
} from "jscad-fiber";
|
|
26646
|
-
import { Fragment as Fragment86, jsx as jsx192, jsxs as
|
|
27272
|
+
import { Fragment as Fragment86, jsx as jsx192, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
26647
27273
|
var range2 = (length32) => Array.from({ length: length32 }, (_, index) => index);
|
|
26648
27274
|
var RJ45 = ({
|
|
26649
27275
|
bodyWidth = 16.26,
|
|
@@ -26701,9 +27327,9 @@ var RJ45 = ({
|
|
|
26701
27327
|
const contactY = frontY - frontDirection * Math.max(cavityDepth * 0.48, 1.2);
|
|
26702
27328
|
const contactZ = openingCenterZ + openingHeight * 0.18;
|
|
26703
27329
|
const frontLipY = frontY + frontDirection * shellThickness * 0.2;
|
|
26704
|
-
return /* @__PURE__ */
|
|
26705
|
-
/* @__PURE__ */
|
|
26706
|
-
/* @__PURE__ */
|
|
27330
|
+
return /* @__PURE__ */ jsxs85(Fragment86, { children: [
|
|
27331
|
+
/* @__PURE__ */ jsxs85(Colorize104, { color: shellColor, children: [
|
|
27332
|
+
/* @__PURE__ */ jsxs85(Subtract21, { children: [
|
|
26707
27333
|
/* @__PURE__ */ jsx192(
|
|
26708
27334
|
Cuboid59,
|
|
26709
27335
|
{
|
|
@@ -26755,8 +27381,8 @@ var RJ45 = ({
|
|
|
26755
27381
|
`top-seam:${direction}`
|
|
26756
27382
|
))
|
|
26757
27383
|
] }),
|
|
26758
|
-
/* @__PURE__ */
|
|
26759
|
-
/* @__PURE__ */
|
|
27384
|
+
/* @__PURE__ */ jsxs85(Colorize104, { color: housingColor, children: [
|
|
27385
|
+
/* @__PURE__ */ jsxs85(Subtract21, { children: [
|
|
26760
27386
|
/* @__PURE__ */ jsx192(
|
|
26761
27387
|
RoundedCuboid6,
|
|
26762
27388
|
{
|
|
@@ -26810,7 +27436,7 @@ var RJ45 = ({
|
|
|
26810
27436
|
`locator:${direction}`
|
|
26811
27437
|
))
|
|
26812
27438
|
] }),
|
|
26813
|
-
/* @__PURE__ */
|
|
27439
|
+
/* @__PURE__ */ jsxs85(Colorize104, { color: contactColor, children: [
|
|
26814
27440
|
signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */ jsx192(
|
|
26815
27441
|
Cylinder22,
|
|
26816
27442
|
{
|
|
@@ -26848,7 +27474,7 @@ var RJ45 = ({
|
|
|
26848
27474
|
`led-lead:${index}`
|
|
26849
27475
|
))
|
|
26850
27476
|
] }),
|
|
26851
|
-
ledPins && /* @__PURE__ */
|
|
27477
|
+
ledPins && /* @__PURE__ */ jsxs85(Fragment86, { children: [
|
|
26852
27478
|
/* @__PURE__ */ jsx192(
|
|
26853
27479
|
RoundedCuboid6,
|
|
26854
27480
|
{
|
|
@@ -26881,7 +27507,7 @@ var RJ45 = ({
|
|
|
26881
27507
|
|
|
26882
27508
|
// lib/DPAK.tsx
|
|
26883
27509
|
import { Colorize as Colorize105, Cuboid as Cuboid60, Hull as Hull29 } from "jscad-fiber";
|
|
26884
|
-
import { Fragment as Fragment87, jsx as jsx193, jsxs as
|
|
27510
|
+
import { Fragment as Fragment87, jsx as jsx193, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
26885
27511
|
var DPAK = ({
|
|
26886
27512
|
bodyWidth = 6.1,
|
|
26887
27513
|
bodyLength: bodyLength10 = 6.5,
|
|
@@ -26903,7 +27529,7 @@ var DPAK = ({
|
|
|
26903
27529
|
const bodyFrontX = bodyCenterX - bodyWidth / 2;
|
|
26904
27530
|
const leadZ = tabThickness / 2;
|
|
26905
27531
|
const leadThickness = 0.4;
|
|
26906
|
-
return /* @__PURE__ */
|
|
27532
|
+
return /* @__PURE__ */ jsxs86(Fragment87, { children: [
|
|
26907
27533
|
/* @__PURE__ */ jsx193(Colorize105, { material: componentMaterials.tinnedLead, color: tabColor, children: /* @__PURE__ */ jsx193(
|
|
26908
27534
|
Cuboid60,
|
|
26909
27535
|
{
|
|
@@ -26919,7 +27545,7 @@ var DPAK = ({
|
|
|
26919
27545
|
}
|
|
26920
27546
|
) }),
|
|
26921
27547
|
[-1, 1].map((side) => {
|
|
26922
|
-
return /* @__PURE__ */
|
|
27548
|
+
return /* @__PURE__ */ jsxs86(
|
|
26923
27549
|
Colorize105,
|
|
26924
27550
|
{
|
|
26925
27551
|
material: componentMaterials.tinnedLead,
|
|
@@ -26936,7 +27562,7 @@ var DPAK = ({
|
|
|
26936
27562
|
]
|
|
26937
27563
|
}
|
|
26938
27564
|
),
|
|
26939
|
-
/* @__PURE__ */
|
|
27565
|
+
/* @__PURE__ */ jsxs86(Hull29, { children: [
|
|
26940
27566
|
/* @__PURE__ */ jsx193(
|
|
26941
27567
|
Cuboid60,
|
|
26942
27568
|
{
|
|
@@ -26970,9 +27596,9 @@ import {
|
|
|
26970
27596
|
Cuboid as Cuboid61,
|
|
26971
27597
|
Cylinder as Cylinder23,
|
|
26972
27598
|
RoundedCylinder as RoundedCylinder5,
|
|
26973
|
-
Subtract as
|
|
27599
|
+
Subtract as Subtract22
|
|
26974
27600
|
} from "jscad-fiber";
|
|
26975
|
-
import { Fragment as Fragment88, jsx as jsx194, jsxs as
|
|
27601
|
+
import { Fragment as Fragment88, jsx as jsx194, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
26976
27602
|
var ElectrolyticCapacitor = ({
|
|
26977
27603
|
diameter = 6.3,
|
|
26978
27604
|
heightToDiameterRatio = 1.4,
|
|
@@ -26990,7 +27616,7 @@ var ElectrolyticCapacitor = ({
|
|
|
26990
27616
|
const canTop = canBottom + canHeight;
|
|
26991
27617
|
const grooveWidth = Math.max(diameter * 0.06, 0.2);
|
|
26992
27618
|
const grooveDepth = 0.3;
|
|
26993
|
-
return /* @__PURE__ */
|
|
27619
|
+
return /* @__PURE__ */ jsxs87(Fragment88, { children: [
|
|
26994
27620
|
/* @__PURE__ */ jsx194(Colorize106, { color: baseColor, material: componentMaterials.rubber, children: /* @__PURE__ */ jsx194(
|
|
26995
27621
|
Cylinder23,
|
|
26996
27622
|
{
|
|
@@ -26999,7 +27625,7 @@ var ElectrolyticCapacitor = ({
|
|
|
26999
27625
|
center: [0, 0, baseHeight / 2]
|
|
27000
27626
|
}
|
|
27001
27627
|
) }),
|
|
27002
|
-
/* @__PURE__ */ jsx194(Colorize106, { color: sleeveColor, material: componentMaterials.sleeve, children: /* @__PURE__ */
|
|
27628
|
+
/* @__PURE__ */ jsx194(Colorize106, { color: sleeveColor, material: componentMaterials.sleeve, children: /* @__PURE__ */ jsxs87(Subtract22, { children: [
|
|
27003
27629
|
/* @__PURE__ */ jsx194(
|
|
27004
27630
|
RoundedCylinder5,
|
|
27005
27631
|
{
|
|
@@ -27044,8 +27670,8 @@ var ElectrolyticCapacitor = ({
|
|
|
27044
27670
|
};
|
|
27045
27671
|
|
|
27046
27672
|
// lib/Potentiometer.tsx
|
|
27047
|
-
import { Colorize as Colorize107, Cuboid as Cuboid62, Cylinder as Cylinder24, Subtract as
|
|
27048
|
-
import { Fragment as Fragment89, jsx as jsx195, jsxs as
|
|
27673
|
+
import { Colorize as Colorize107, Cuboid as Cuboid62, Cylinder as Cylinder24, Subtract as Subtract23 } from "jscad-fiber";
|
|
27674
|
+
import { Fragment as Fragment89, jsx as jsx195, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
27049
27675
|
var Potentiometer = ({
|
|
27050
27676
|
bodyWidth = 5.35,
|
|
27051
27677
|
bodyLength: bodyLength10 = 14,
|
|
@@ -27063,7 +27689,7 @@ var Potentiometer = ({
|
|
|
27063
27689
|
const adjusterHeight = 0.8;
|
|
27064
27690
|
const adjusterZ = bodyHeight + adjusterHeight / 2;
|
|
27065
27691
|
const slotWidth = Math.max(adjusterDiameter * 0.16, 0.3);
|
|
27066
|
-
return /* @__PURE__ */
|
|
27692
|
+
return /* @__PURE__ */ jsxs88(Fragment89, { children: [
|
|
27067
27693
|
/* @__PURE__ */ jsx195(Colorize107, { color: bodyColor, children: /* @__PURE__ */ jsx195(
|
|
27068
27694
|
Cuboid62,
|
|
27069
27695
|
{
|
|
@@ -27071,7 +27697,7 @@ var Potentiometer = ({
|
|
|
27071
27697
|
center: [bodyCenterX, 0, bodyHeight / 2]
|
|
27072
27698
|
}
|
|
27073
27699
|
) }),
|
|
27074
|
-
/* @__PURE__ */ jsx195(Colorize107, { color: adjusterColor, children: /* @__PURE__ */
|
|
27700
|
+
/* @__PURE__ */ jsx195(Colorize107, { color: adjusterColor, children: /* @__PURE__ */ jsxs88(Subtract23, { children: [
|
|
27075
27701
|
/* @__PURE__ */ jsx195(
|
|
27076
27702
|
Cylinder24,
|
|
27077
27703
|
{
|
|
@@ -27109,7 +27735,7 @@ var Potentiometer = ({
|
|
|
27109
27735
|
|
|
27110
27736
|
// lib/SmdPushButton.tsx
|
|
27111
27737
|
import { Colorize as Colorize108, Cuboid as Cuboid63, Cylinder as Cylinder25 } from "jscad-fiber";
|
|
27112
|
-
import { Fragment as Fragment90, jsx as jsx196, jsxs as
|
|
27738
|
+
import { Fragment as Fragment90, jsx as jsx196, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
27113
27739
|
var SmdPushButton = ({
|
|
27114
27740
|
bodyWidth = 2.9,
|
|
27115
27741
|
bodyLength: bodyLength10 = 3,
|
|
@@ -27125,7 +27751,7 @@ var SmdPushButton = ({
|
|
|
27125
27751
|
leadColor = "#cccccc"
|
|
27126
27752
|
}) => {
|
|
27127
27753
|
const leadThickness = 0.15;
|
|
27128
|
-
return /* @__PURE__ */
|
|
27754
|
+
return /* @__PURE__ */ jsxs89(Fragment90, { children: [
|
|
27129
27755
|
/* @__PURE__ */ jsx196(Colorize108, { color: bodyColor, children: /* @__PURE__ */ jsx196(
|
|
27130
27756
|
Cuboid63,
|
|
27131
27757
|
{
|
|
@@ -27159,8 +27785,8 @@ var SmdPushButton = ({
|
|
|
27159
27785
|
|
|
27160
27786
|
// lib/SmdSlideSwitch.tsx
|
|
27161
27787
|
import { fp as fp7 } from "@tscircuit/footprinter";
|
|
27162
|
-
import { Colorize as Colorize109, Cuboid as Cuboid64, Cylinder as Cylinder26, Rotate as Rotate20, Subtract as
|
|
27163
|
-
import { jsx as jsx197, jsxs as
|
|
27788
|
+
import { Colorize as Colorize109, Cuboid as Cuboid64, Cylinder as Cylinder26, Rotate as Rotate20, Subtract as Subtract24 } from "jscad-fiber";
|
|
27789
|
+
import { jsx as jsx197, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
27164
27790
|
var SmdSlideSwitch = ({
|
|
27165
27791
|
footprint = "smdslideswitch7",
|
|
27166
27792
|
position = 0
|
|
@@ -27178,8 +27804,8 @@ var SmdSlideSwitch = ({
|
|
|
27178
27804
|
throw new Error("SmdSlideSwitch needs signal pads and four mounting pads");
|
|
27179
27805
|
const angle = Math.atan2(target[1].y - target[0].y, target[1].x - target[0].x) - Math.atan2(pads[1].y - pads[0].y, pads[1].x - pads[0].x);
|
|
27180
27806
|
const width10 = params.mpx - 0.5, depth = 2.7, height10 = params.mpx > 6 ? 1.5 : 1.4, y = params.mounty;
|
|
27181
|
-
return /* @__PURE__ */
|
|
27182
|
-
/* @__PURE__ */ jsx197(Colorize109, { color: "#aeb4ba", children: /* @__PURE__ */
|
|
27807
|
+
return /* @__PURE__ */ jsxs90(Rotate20, { rotation: [0, 0, angle], children: [
|
|
27808
|
+
/* @__PURE__ */ jsx197(Colorize109, { color: "#aeb4ba", children: /* @__PURE__ */ jsxs90(Subtract24, { children: [
|
|
27183
27809
|
/* @__PURE__ */ jsx197(Cuboid64, { size: [width10, depth, height10], center: [0, y, height10 / 2] }),
|
|
27184
27810
|
/* @__PURE__ */ jsx197(
|
|
27185
27811
|
Cuboid64,
|
|
@@ -27190,7 +27816,7 @@ var SmdSlideSwitch = ({
|
|
|
27190
27816
|
),
|
|
27191
27817
|
/* @__PURE__ */ jsx197(Cuboid64, { size: [2.7, 0.5, 0.9], center: [0, y - depth / 2, 0.65] })
|
|
27192
27818
|
] }) }),
|
|
27193
|
-
/* @__PURE__ */
|
|
27819
|
+
/* @__PURE__ */ jsxs90(Colorize109, { color: "#28292c", children: [
|
|
27194
27820
|
/* @__PURE__ */ jsx197(
|
|
27195
27821
|
Cuboid64,
|
|
27196
27822
|
{
|
|
@@ -27239,7 +27865,7 @@ var SmdSlideSwitch = ({
|
|
|
27239
27865
|
|
|
27240
27866
|
// lib/SOT-563.tsx
|
|
27241
27867
|
import { Cuboid as Cuboid65, Translate as Translate44, Rotate as Rotate21, Colorize as Colorize110 } from "jscad-fiber";
|
|
27242
|
-
import { Fragment as Fragment91, jsx as jsx198, jsxs as
|
|
27868
|
+
import { Fragment as Fragment91, jsx as jsx198, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
27243
27869
|
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
27244
27870
|
const bodyWidth = 1.2;
|
|
27245
27871
|
const bodyLength10 = 1.6;
|
|
@@ -27249,7 +27875,7 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
27249
27875
|
const leadHeight = 0.13;
|
|
27250
27876
|
const leadSpacing = 0.5;
|
|
27251
27877
|
const bodyZOffset = -0.4;
|
|
27252
|
-
return /* @__PURE__ */
|
|
27878
|
+
return /* @__PURE__ */ jsxs91(Fragment91, { children: [
|
|
27253
27879
|
/* @__PURE__ */ jsx198(Rotate21, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx198(Translate44, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx198(Colorize110, { color: "grey", children: /* @__PURE__ */ jsx198(Cuboid65, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
|
|
27254
27880
|
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
27255
27881
|
// Left lead
|
|
@@ -27286,10 +27912,10 @@ import {
|
|
|
27286
27912
|
Cylinder as Cylinder27,
|
|
27287
27913
|
Hull as Hull30,
|
|
27288
27914
|
Rotate as Rotate22,
|
|
27289
|
-
Subtract as
|
|
27915
|
+
Subtract as Subtract25,
|
|
27290
27916
|
Translate as Translate45
|
|
27291
27917
|
} from "jscad-fiber";
|
|
27292
|
-
import { jsx as jsx199, jsxs as
|
|
27918
|
+
import { jsx as jsx199, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
27293
27919
|
var Capsule = ({
|
|
27294
27920
|
width: width10,
|
|
27295
27921
|
height: height10,
|
|
@@ -27317,8 +27943,8 @@ var UsbCMidmount = ({
|
|
|
27317
27943
|
"UsbCMidmount requires four mounting slots and a positive body depth"
|
|
27318
27944
|
);
|
|
27319
27945
|
const tabBottom = -0.9, tabTop = centerZ + 0.1;
|
|
27320
|
-
return /* @__PURE__ */
|
|
27321
|
-
/* @__PURE__ */ jsx199(Colorize111, { color: "#b8bdc4", material: componentMaterials.brushedMetal, children: /* @__PURE__ */ jsx199(Translate45, { offset: [0, centerY, centerZ], children: /* @__PURE__ */
|
|
27946
|
+
return /* @__PURE__ */ jsxs92(Rotate22, { rotation: [0, 0, angle], children: [
|
|
27947
|
+
/* @__PURE__ */ jsx199(Colorize111, { color: "#b8bdc4", material: componentMaterials.brushedMetal, children: /* @__PURE__ */ jsx199(Translate45, { offset: [0, centerY, centerZ], children: /* @__PURE__ */ jsxs92(Subtract25, { children: [
|
|
27322
27948
|
/* @__PURE__ */ jsx199(Capsule, { width: width10, height: height10, depth }),
|
|
27323
27949
|
/* @__PURE__ */ jsx199(
|
|
27324
27950
|
Capsule,
|
|
@@ -27329,7 +27955,7 @@ var UsbCMidmount = ({
|
|
|
27329
27955
|
}
|
|
27330
27956
|
)
|
|
27331
27957
|
] }) }) }),
|
|
27332
|
-
/* @__PURE__ */
|
|
27958
|
+
/* @__PURE__ */ jsxs92(Colorize111, { color: "#242529", material: componentMaterials.moldedPlastic, children: [
|
|
27333
27959
|
/* @__PURE__ */ jsx199(
|
|
27334
27960
|
Cuboid66,
|
|
27335
27961
|
{
|
|
@@ -27350,7 +27976,7 @@ var UsbCMidmount = ({
|
|
|
27350
27976
|
) : null
|
|
27351
27977
|
)
|
|
27352
27978
|
] }),
|
|
27353
|
-
/* @__PURE__ */
|
|
27979
|
+
/* @__PURE__ */ jsxs92(Colorize111, { color: "#d3ad57", material: componentMaterials.goldContact, children: [
|
|
27354
27980
|
[-1, 1].flatMap(
|
|
27355
27981
|
(side) => [-2.75, -2.25, -1.25, -0.25, 0.25, 1.25, 2.25, 2.75].map((x) => /* @__PURE__ */ jsx199(
|
|
27356
27982
|
Cuboid66,
|
|
@@ -27392,7 +28018,7 @@ var UsbCMidmount = ({
|
|
|
27392
28018
|
// lib/SOT143.tsx
|
|
27393
28019
|
import { fp as fp9 } from "@tscircuit/footprinter";
|
|
27394
28020
|
import { Rotate as Rotate23 } from "jscad-fiber";
|
|
27395
|
-
import { jsx as jsx200, jsxs as
|
|
28021
|
+
import { jsx as jsx200, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
27396
28022
|
var getPads = (footprint) => fp9.string(footprint).circuitJson().filter(
|
|
27397
28023
|
(element) => element.type === "pcb_smtpad" && (element.shape === "rect" || element.shape === "rotated_rect")
|
|
27398
28024
|
).map((pad) => ({ x: pad.x, y: pad.y, pin: pad.port_hints?.[0] }));
|
|
@@ -27411,7 +28037,7 @@ var SOT143 = ({ footprint = "sot143" }) => {
|
|
|
27411
28037
|
x: pad.x * Math.cos(angle) + pad.y * Math.sin(angle),
|
|
27412
28038
|
y: -pad.x * Math.sin(angle) + pad.y * Math.cos(angle)
|
|
27413
28039
|
}));
|
|
27414
|
-
return /* @__PURE__ */
|
|
28040
|
+
return /* @__PURE__ */ jsxs93(Rotate23, { rotation: [0, 0, angle], children: [
|
|
27415
28041
|
/* @__PURE__ */ jsx200(
|
|
27416
28042
|
ChipBody,
|
|
27417
28043
|
{
|
|
@@ -28116,8 +28742,8 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
28116
28742
|
};
|
|
28117
28743
|
|
|
28118
28744
|
// lib/utils/FlatLeadDiode.tsx
|
|
28119
|
-
import { Colorize as Colorize112, Cuboid as Cuboid67, Hull as Hull31, Subtract as
|
|
28120
|
-
import { Fragment as Fragment93, jsx as jsx202, jsxs as
|
|
28745
|
+
import { Colorize as Colorize112, Cuboid as Cuboid67, Hull as Hull31, Subtract as Subtract26 } from "jscad-fiber";
|
|
28746
|
+
import { Fragment as Fragment93, jsx as jsx202, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
28121
28747
|
function createFlatLeadDiode(p) {
|
|
28122
28748
|
const dimensions5 = [
|
|
28123
28749
|
"bodyLength",
|
|
@@ -28145,7 +28771,7 @@ function createFlatLeadDiode(p) {
|
|
|
28145
28771
|
"Diode dimensions leave disconnected terminals or an invalid mold"
|
|
28146
28772
|
);
|
|
28147
28773
|
const slice = Math.min(p.bodyHeight - p.standoff, p.bodyWidth) / 100;
|
|
28148
|
-
const body = /* @__PURE__ */
|
|
28774
|
+
const body = /* @__PURE__ */ jsxs94(Hull31, { children: [
|
|
28149
28775
|
/* @__PURE__ */ jsx202(
|
|
28150
28776
|
Cuboid67,
|
|
28151
28777
|
{
|
|
@@ -28176,12 +28802,12 @@ function createFlatLeadDiode(p) {
|
|
|
28176
28802
|
]
|
|
28177
28803
|
}
|
|
28178
28804
|
);
|
|
28179
|
-
return /* @__PURE__ */
|
|
28180
|
-
/* @__PURE__ */ jsx202(Colorize112, { color: "#25272a", children: p.markingWidth > 0 ? /* @__PURE__ */
|
|
28805
|
+
return /* @__PURE__ */ jsxs94(Fragment93, { children: [
|
|
28806
|
+
/* @__PURE__ */ jsx202(Colorize112, { color: "#25272a", children: p.markingWidth > 0 ? /* @__PURE__ */ jsxs94(Subtract26, { children: [
|
|
28181
28807
|
body,
|
|
28182
28808
|
stripe
|
|
28183
28809
|
] }) : body }),
|
|
28184
|
-
/* @__PURE__ */
|
|
28810
|
+
/* @__PURE__ */ jsxs94(Colorize112, { color: "#c7c9cd", children: [
|
|
28185
28811
|
/* @__PURE__ */ jsx202(
|
|
28186
28812
|
Cuboid67,
|
|
28187
28813
|
{
|
|
@@ -28245,7 +28871,7 @@ var SOD323HE = (props) => createFlatLeadDiode({
|
|
|
28245
28871
|
|
|
28246
28872
|
// lib/SOT89.tsx
|
|
28247
28873
|
import { Colorize as Colorize113, Cuboid as Cuboid68, Translate as Translate47, Hull as Hull32, Union as Union24 } from "jscad-fiber";
|
|
28248
|
-
import { Fragment as Fragment94, jsx as jsx203, jsxs as
|
|
28874
|
+
import { Fragment as Fragment94, jsx as jsx203, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
28249
28875
|
function SOT89(p) {
|
|
28250
28876
|
for (const k of [
|
|
28251
28877
|
"bodyWidth",
|
|
@@ -28267,8 +28893,8 @@ function SOT89(p) {
|
|
|
28267
28893
|
const front = -p.bodyWidth / 2, rear = p.bodyWidth / 2 + p.rearExtension, tabFront = rear - p.tabLength;
|
|
28268
28894
|
const slice = Math.min(2e-3, (p.bodyHeight - p.standoff) / 100);
|
|
28269
28895
|
const block = (x, y, length32, width10) => /* @__PURE__ */ jsx203(Translate47, { offset: [x, y, p.terminalThickness / 2], children: /* @__PURE__ */ jsx203(Cuboid68, { size: [length32, width10, p.terminalThickness] }) });
|
|
28270
|
-
return /* @__PURE__ */
|
|
28271
|
-
/* @__PURE__ */ jsx203(Colorize113, { color: "#353535", children: /* @__PURE__ */
|
|
28896
|
+
return /* @__PURE__ */ jsxs95(Fragment94, { children: [
|
|
28897
|
+
/* @__PURE__ */ jsx203(Colorize113, { color: "#353535", children: /* @__PURE__ */ jsxs95(Hull32, { children: [
|
|
28272
28898
|
/* @__PURE__ */ jsx203(Translate47, { z: p.standoff + slice / 2, children: /* @__PURE__ */ jsx203(Cuboid68, { size: [p.bodyWidth, p.bodyLength, slice] }) }),
|
|
28273
28899
|
/* @__PURE__ */ jsx203(Translate47, { z: p.bodyHeight - slice / 2, children: /* @__PURE__ */ jsx203(
|
|
28274
28900
|
Cuboid68,
|
|
@@ -28289,7 +28915,7 @@ function SOT89(p) {
|
|
|
28289
28915
|
p.leadWidth
|
|
28290
28916
|
)
|
|
28291
28917
|
) }),
|
|
28292
|
-
/* @__PURE__ */ jsx203(Colorize113, { color: "#bfc1c4", children: /* @__PURE__ */
|
|
28918
|
+
/* @__PURE__ */ jsx203(Colorize113, { color: "#bfc1c4", children: /* @__PURE__ */ jsxs95(Union24, { children: [
|
|
28293
28919
|
block(
|
|
28294
28920
|
(front - p.leadLength + tabFront + 0.15) / 2,
|
|
28295
28921
|
0,
|
|
@@ -28303,7 +28929,7 @@ function SOT89(p) {
|
|
|
28303
28929
|
|
|
28304
28930
|
// lib/TO277.tsx
|
|
28305
28931
|
import { Colorize as Colorize114, Cuboid as Cuboid69, Translate as Translate48, Union as Union25 } from "jscad-fiber";
|
|
28306
|
-
import { Fragment as Fragment95, jsx as jsx204, jsxs as
|
|
28932
|
+
import { Fragment as Fragment95, jsx as jsx204, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
28307
28933
|
function TO277(p) {
|
|
28308
28934
|
for (const k of [
|
|
28309
28935
|
"bodyWidth",
|
|
@@ -28327,7 +28953,7 @@ function TO277(p) {
|
|
|
28327
28953
|
if (p.terminalThickness >= p.bodyHeight || p.terminalSpan < p.bodyWidth || p.pitch + p.leadWidth >= p.bodyLength || p.leadWidth >= p.pitch || front + p.leadLength >= tabFront || front + p.leadLength <= -p.bodyWidth / 2 || tabFront >= p.bodyWidth / 2 || p.tabNeckWidth > p.tabWidth || p.tabWidth > p.bodyLength || p.tabBarWidth < p.tabWidth || p.tabNeckLength + p.tabBarLength >= p.tabLength)
|
|
28328
28954
|
throw new Error("Invalid TO-277 terminal geometry or clearance");
|
|
28329
28955
|
const block = (x, y, length32, width10) => /* @__PURE__ */ jsx204(Translate48, { offset: [x, y, p.terminalThickness / 2], children: /* @__PURE__ */ jsx204(Cuboid69, { size: [length32, width10, p.terminalThickness] }) });
|
|
28330
|
-
return /* @__PURE__ */
|
|
28956
|
+
return /* @__PURE__ */ jsxs96(Fragment95, { children: [
|
|
28331
28957
|
/* @__PURE__ */ jsx204(Colorize114, { color: "#353535", children: /* @__PURE__ */ jsx204(Translate48, { z: (p.bodyHeight + p.terminalThickness / 2) / 2, children: /* @__PURE__ */ jsx204(
|
|
28332
28958
|
Cuboid69,
|
|
28333
28959
|
{
|
|
@@ -28346,7 +28972,7 @@ function TO277(p) {
|
|
|
28346
28972
|
p.leadWidth
|
|
28347
28973
|
)
|
|
28348
28974
|
) }),
|
|
28349
|
-
/* @__PURE__ */ jsx204(Colorize114, { color: "#bfc1c4", children: /* @__PURE__ */
|
|
28975
|
+
/* @__PURE__ */ jsx204(Colorize114, { color: "#bfc1c4", children: /* @__PURE__ */ jsxs96(Union25, { children: [
|
|
28350
28976
|
block(
|
|
28351
28977
|
tabFront + (p.tabLength - p.tabNeckLength) / 2,
|
|
28352
28978
|
0,
|
|
@@ -28372,7 +28998,7 @@ function TO277(p) {
|
|
|
28372
28998
|
// lib/TantalumCapacitor.tsx
|
|
28373
28999
|
import { fp as fp11 } from "@tscircuit/footprinter";
|
|
28374
29000
|
import { Colorize as Colorize115, Cuboid as Cuboid70, Hull as Hull33, Rotate as Rotate25, Translate as Translate49, Union as Union26 } from "jscad-fiber";
|
|
28375
|
-
import { jsx as jsx205, jsxs as
|
|
29001
|
+
import { jsx as jsx205, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
28376
29002
|
var tantalumCases = {
|
|
28377
29003
|
A: [3.2, 1.6, 1.6, 1.2, 0.8],
|
|
28378
29004
|
B: [3.5, 2.8, 1.9, 2.2, 0.8],
|
|
@@ -28392,8 +29018,8 @@ var TantalumCapacitor = ({
|
|
|
28392
29018
|
if (pads.length !== 2) throw new Error("TantalumCapacitor requires two pads");
|
|
28393
29019
|
const [a, b] = pads;
|
|
28394
29020
|
const angle = Math.atan2(b.y - a.y, b.x - a.x);
|
|
28395
|
-
return /* @__PURE__ */ jsx205(Translate49, { offset: [(a.x + b.x) / 2, (a.y + b.y) / 2, 0], children: /* @__PURE__ */
|
|
28396
|
-
/* @__PURE__ */ jsx205(Colorize115, { color: "#d5a64e", children: /* @__PURE__ */
|
|
29021
|
+
return /* @__PURE__ */ jsx205(Translate49, { offset: [(a.x + b.x) / 2, (a.y + b.y) / 2, 0], children: /* @__PURE__ */ jsxs97(Rotate25, { rotation: [0, 0, angle], children: [
|
|
29022
|
+
/* @__PURE__ */ jsx205(Colorize115, { color: "#d5a64e", children: /* @__PURE__ */ jsxs97(Hull33, { children: [
|
|
28397
29023
|
/* @__PURE__ */ jsx205(Cuboid70, { size: [length32 - 0.1, width10, 0.02], center: [0, 0, 0.21] }),
|
|
28398
29024
|
/* @__PURE__ */ jsx205(
|
|
28399
29025
|
Cuboid70,
|
|
@@ -28403,7 +29029,7 @@ var TantalumCapacitor = ({
|
|
|
28403
29029
|
}
|
|
28404
29030
|
)
|
|
28405
29031
|
] }) }),
|
|
28406
|
-
/* @__PURE__ */ jsx205(Colorize115, { color: "#c5c8cb", children: [-1, 1].map((side) => /* @__PURE__ */
|
|
29032
|
+
/* @__PURE__ */ jsx205(Colorize115, { color: "#c5c8cb", children: [-1, 1].map((side) => /* @__PURE__ */ jsxs97(Union26, { children: [
|
|
28407
29033
|
/* @__PURE__ */ jsx205(
|
|
28408
29034
|
Cuboid70,
|
|
28409
29035
|
{
|
|
@@ -28433,7 +29059,7 @@ var TantalumCapacitor = ({
|
|
|
28433
29059
|
// lib/TwoPadCrystal.tsx
|
|
28434
29060
|
import { fp as fp12 } from "@tscircuit/footprinter";
|
|
28435
29061
|
import { Colorize as Colorize116, Cuboid as Cuboid71, RoundedCuboid as RoundedCuboid7, Rotate as Rotate26, Translate as Translate50 } from "jscad-fiber";
|
|
28436
|
-
import { jsx as jsx206, jsxs as
|
|
29062
|
+
import { jsx as jsx206, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
28437
29063
|
var twoPadCrystalPackages = {
|
|
28438
29064
|
FC135: [3.2, 1.5, 0.9, 0.7],
|
|
28439
29065
|
FC12M: [2.05, 1.2, 0.6, 0.5],
|
|
@@ -28453,7 +29079,7 @@ var TwoPadCrystal = ({
|
|
|
28453
29079
|
if (pads.length !== 2) throw new Error("TwoPadCrystal requires two pads");
|
|
28454
29080
|
const [a, b] = pads;
|
|
28455
29081
|
const angle = Math.atan2(b.y - a.y, b.x - a.x);
|
|
28456
|
-
return /* @__PURE__ */ jsx206(Translate50, { offset: [(a.x + b.x) / 2, (a.y + b.y) / 2, 0], children: /* @__PURE__ */
|
|
29082
|
+
return /* @__PURE__ */ jsx206(Translate50, { offset: [(a.x + b.x) / 2, (a.y + b.y) / 2, 0], children: /* @__PURE__ */ jsxs98(Rotate26, { rotation: [0, 0, angle], children: [
|
|
28457
29083
|
/* @__PURE__ */ jsx206(Colorize116, { color: "#e0dcca", children: /* @__PURE__ */ jsx206(Cuboid71, { size: [length32, width10, 0.2], center: [0, 0, 0.13] }) }),
|
|
28458
29084
|
/* @__PURE__ */ jsx206(Colorize116, { color: "#acb1b8", children: /* @__PURE__ */ jsx206(
|
|
28459
29085
|
RoundedCuboid7,
|
|
@@ -28477,7 +29103,7 @@ var TwoPadCrystal = ({
|
|
|
28477
29103
|
// lib/CeramicChipAntenna.tsx
|
|
28478
29104
|
import { fp as fp13 } from "@tscircuit/footprinter";
|
|
28479
29105
|
import { Colorize as Colorize117, Cuboid as Cuboid72, Rotate as Rotate27, Translate as Translate51 } from "jscad-fiber";
|
|
28480
|
-
import { jsx as jsx207, jsxs as
|
|
29106
|
+
import { jsx as jsx207, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
28481
29107
|
var CeramicChipAntenna = ({
|
|
28482
29108
|
footprint = "smdpads2_p5.4mm_pw1mm_ph2mm"
|
|
28483
29109
|
}) => {
|
|
@@ -28487,7 +29113,7 @@ var CeramicChipAntenna = ({
|
|
|
28487
29113
|
if (pads.length !== 2) throw new Error("CeramicChipAntenna requires two pads");
|
|
28488
29114
|
const [a, b] = pads;
|
|
28489
29115
|
const angle = Math.atan2(b.y - a.y, b.x - a.x);
|
|
28490
|
-
return /* @__PURE__ */ jsx207(Translate51, { offset: [(a.x + b.x) / 2, (a.y + b.y) / 2, 0], children: /* @__PURE__ */
|
|
29116
|
+
return /* @__PURE__ */ jsx207(Translate51, { offset: [(a.x + b.x) / 2, (a.y + b.y) / 2, 0], children: /* @__PURE__ */ jsxs99(Rotate27, { rotation: [0, 0, angle], children: [
|
|
28491
29117
|
/* @__PURE__ */ jsx207(
|
|
28492
29118
|
Cuboid72,
|
|
28493
29119
|
{
|
|
@@ -28519,7 +29145,7 @@ var CeramicChipAntenna = ({
|
|
|
28519
29145
|
// lib/MelfResistor.tsx
|
|
28520
29146
|
import { fp as fp14 } from "@tscircuit/footprinter";
|
|
28521
29147
|
import { Colorize as Colorize118, Cylinder as Cylinder28, Rotate as Rotate28, Translate as Translate52 } from "jscad-fiber";
|
|
28522
|
-
import { jsx as jsx208, jsxs as
|
|
29148
|
+
import { jsx as jsx208, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
28523
29149
|
var melfResistorSizes = {
|
|
28524
29150
|
"0102": [2.2, 1.1, 0.4],
|
|
28525
29151
|
"0204": [3.6, 1.4, 0.75],
|
|
@@ -28538,7 +29164,7 @@ var MelfResistor = ({
|
|
|
28538
29164
|
if (pads.length !== 2) throw new Error("MelfResistor requires two pads");
|
|
28539
29165
|
const [a, b] = pads;
|
|
28540
29166
|
const angle = Math.atan2(b.y - a.y, b.x - a.x);
|
|
28541
|
-
return /* @__PURE__ */ jsx208(Translate52, { offset: [(a.x + b.x) / 2, (a.y + b.y) / 2, diameter / 2], children: /* @__PURE__ */ jsx208(Rotate28, { rotation: [0, 0, angle], children: /* @__PURE__ */
|
|
29167
|
+
return /* @__PURE__ */ jsx208(Translate52, { offset: [(a.x + b.x) / 2, (a.y + b.y) / 2, diameter / 2], children: /* @__PURE__ */ jsx208(Rotate28, { rotation: [0, 0, angle], children: /* @__PURE__ */ jsxs100(Rotate28, { rotation: [0, Math.PI / 2, 0], children: [
|
|
28542
29168
|
/* @__PURE__ */ jsx208(Colorize118, { color: "#426d63", children: /* @__PURE__ */ jsx208(
|
|
28543
29169
|
Cylinder28,
|
|
28544
29170
|
{
|
|
@@ -28557,6 +29183,29 @@ var MelfResistor = ({
|
|
|
28557
29183
|
)) })
|
|
28558
29184
|
] }) }) });
|
|
28559
29185
|
};
|
|
29186
|
+
|
|
29187
|
+
// lib/models/rectangulartube/model.tsx
|
|
29188
|
+
import jscad21 from "@jscad/modeling";
|
|
29189
|
+
import { renderToJscadModel } from "jscad-fiber/model";
|
|
29190
|
+
import { jsx as jsx209 } from "react/jsx-runtime";
|
|
29191
|
+
function createRectangularTubeModel(input) {
|
|
29192
|
+
const model108 = renderToJscadModel(
|
|
29193
|
+
/* @__PURE__ */ jsx209(RectangularTube, { ...input }),
|
|
29194
|
+
jscad21
|
|
29195
|
+
);
|
|
29196
|
+
if (model108.geometries.length !== 1 || !jscad21.geometries.geom3.isA(model108.geometries[0]))
|
|
29197
|
+
throw new Error("RectangularTube must render exactly one native solid");
|
|
29198
|
+
return model108;
|
|
29199
|
+
}
|
|
29200
|
+
|
|
29201
|
+
// lib/models/rectangulartube/geometry.ts
|
|
29202
|
+
function createRectangularTubeGeom(input) {
|
|
29203
|
+
const model108 = createRectangularTubeModel(input);
|
|
29204
|
+
return model108.geometries[0];
|
|
29205
|
+
}
|
|
29206
|
+
function createRectangularTubeMesh(input) {
|
|
29207
|
+
return geom3ToIndexedMesh(createRectangularTubeGeom(input));
|
|
29208
|
+
}
|
|
28560
29209
|
export {
|
|
28561
29210
|
A01005,
|
|
28562
29211
|
A0201,
|
|
@@ -28780,6 +29429,7 @@ export {
|
|
|
28780
29429
|
createRectangularGasketMesh,
|
|
28781
29430
|
createRectangularTubeGeom,
|
|
28782
29431
|
createRectangularTubeMesh,
|
|
29432
|
+
createRectangularTubeModel,
|
|
28783
29433
|
createRigidCouplerGeom,
|
|
28784
29434
|
createRigidCouplerMesh,
|
|
28785
29435
|
createSetScrewGeom,
|
|
@@ -28815,8 +29465,13 @@ export {
|
|
|
28815
29465
|
createWormGearMesh,
|
|
28816
29466
|
createZeeBarGeom,
|
|
28817
29467
|
createZeeBarMesh,
|
|
29468
|
+
geom3ToIndexedMesh,
|
|
28818
29469
|
isJstShFootprint,
|
|
29470
|
+
listJscadNamedEdges,
|
|
29471
|
+
listJscadReferenceFeatures,
|
|
28819
29472
|
melfResistorSizes,
|
|
29473
|
+
readJscadNamedEdge,
|
|
29474
|
+
readJscadReferenceFeature,
|
|
28820
29475
|
resolveFlexScreenSize,
|
|
28821
29476
|
smdLedDimensions,
|
|
28822
29477
|
tantalumCases,
|