jscad-electronics 0.0.238 → 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 +36 -6
- package/dist/index.js +1044 -537
- package/dist/index.js.map +1 -1
- package/dist/vanilla.d.ts +51 -7
- package/dist/vanilla.js +1029 -407
- 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";
|
|
@@ -12903,7 +13401,7 @@ function getNemaMotorReferencePoints(input) {
|
|
|
12903
13401
|
(p.bodyWidth - p.faceCornerChamfer) / (Math.abs(x) + Math.abs(y))
|
|
12904
13402
|
);
|
|
12905
13403
|
if (p.nemaSize !== 34 || p.stepped) {
|
|
12906
|
-
const
|
|
13404
|
+
const profile5 = p.nemaSize === 34 ? {
|
|
12907
13405
|
width: p.bodyWidth,
|
|
12908
13406
|
chamfer: p.bodyCornerChamfer,
|
|
12909
13407
|
stepped: p.stepped,
|
|
@@ -12919,7 +13417,7 @@ function getNemaMotorReferencePoints(input) {
|
|
|
12919
13417
|
let low = 0, high = p.bodyWidth;
|
|
12920
13418
|
for (let i = 0; i < 50; i++) {
|
|
12921
13419
|
const mid = (low + high) / 2;
|
|
12922
|
-
if (isInsideNemaFace(mid * x, mid * y,
|
|
13420
|
+
if (isInsideNemaFace(mid * x, mid * y, profile5)) low = mid;
|
|
12923
13421
|
else high = mid;
|
|
12924
13422
|
}
|
|
12925
13423
|
radius = low;
|
|
@@ -13285,11 +13783,11 @@ var ModelRendererRegistry = class {
|
|
|
13285
13783
|
import { Colorize as Colorize7, Custom } from "jscad-fiber";
|
|
13286
13784
|
|
|
13287
13785
|
// lib/models/anglebar/geometry.ts
|
|
13288
|
-
import
|
|
13289
|
-
var { primitives, extrusions, geometries, modifiers, measurements } =
|
|
13290
|
-
var generalize =
|
|
13291
|
-
var { rectangle, roundedRectangle, polygon } =
|
|
13292
|
-
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);
|
|
13293
13791
|
function filletProfile(points, radii, width10, height10) {
|
|
13294
13792
|
const outline = [];
|
|
13295
13793
|
for (let i = 0; i < points.length; i++) {
|
|
@@ -13348,7 +13846,7 @@ function createAngleBarMesh(input) {
|
|
|
13348
13846
|
{ snap: true, triangulate: true },
|
|
13349
13847
|
createAngleBarGeom(input)
|
|
13350
13848
|
);
|
|
13351
|
-
const epsilon = Math.max(...
|
|
13849
|
+
const epsilon = Math.max(...measurements2.measureDimensions(geom)) * 1e-10;
|
|
13352
13850
|
const positions = [];
|
|
13353
13851
|
const indices = [];
|
|
13354
13852
|
const lookup = /* @__PURE__ */ new Map();
|
|
@@ -13362,7 +13860,7 @@ function createAngleBarMesh(input) {
|
|
|
13362
13860
|
}
|
|
13363
13861
|
return index;
|
|
13364
13862
|
};
|
|
13365
|
-
for (const poly of
|
|
13863
|
+
for (const poly of geometries2.geom3.toPolygons(geom)) {
|
|
13366
13864
|
for (let i = 1; i < poly.vertices.length - 1; i++) {
|
|
13367
13865
|
const a = poly.vertices[0], b = poly.vertices[i], c = poly.vertices[i + 1];
|
|
13368
13866
|
const u = b.map((x, j) => x - a[j]), v = c.map((x, j) => x - a[j]);
|
|
@@ -13400,7 +13898,7 @@ function register55(registry2) {
|
|
|
13400
13898
|
import { Colorize as Colorize8, Custom as Custom2 } from "jscad-fiber";
|
|
13401
13899
|
|
|
13402
13900
|
// lib/mechanical/indexedMeshToGeom3.ts
|
|
13403
|
-
import
|
|
13901
|
+
import jscad5 from "@jscad/modeling";
|
|
13404
13902
|
function indexedMeshToGeom3(mesh) {
|
|
13405
13903
|
const polygons = [];
|
|
13406
13904
|
for (let i = 0; i < mesh.indices.length; i += 3)
|
|
@@ -13411,7 +13909,7 @@ function indexedMeshToGeom3(mesh) {
|
|
|
13411
13909
|
mesh.positions[index * 3 + 2]
|
|
13412
13910
|
])
|
|
13413
13911
|
);
|
|
13414
|
-
return
|
|
13912
|
+
return jscad5.geometries.geom3.fromPoints(polygons);
|
|
13415
13913
|
}
|
|
13416
13914
|
|
|
13417
13915
|
// lib/models/ballbearing/mesh.ts
|
|
@@ -13540,11 +14038,11 @@ function createBallBearingMesh(input = {}, options = {}) {
|
|
|
13540
14038
|
[ri + 0.15 * (ro - ri), 0.5 * t],
|
|
13541
14039
|
[ro - 0.15 * (ro - ri), 0.5 * t]
|
|
13542
14040
|
];
|
|
13543
|
-
const
|
|
14041
|
+
const profile5 = sign === -1 ? shape49 : shape49.map(([r, z]) => [r, d.width - z]).reverse();
|
|
13544
14042
|
parts.push({
|
|
13545
14043
|
name: `${face2} ${sign < 0 ? "lower" : "upper"}`,
|
|
13546
14044
|
color: face2 === "sealed" ? "#252a30" : "#b5bbc3",
|
|
13547
|
-
mesh: revolve(
|
|
14045
|
+
mesh: revolve(profile5, segments)
|
|
13548
14046
|
});
|
|
13549
14047
|
}
|
|
13550
14048
|
return { ...combine(parts), parts };
|
|
@@ -13561,21 +14059,21 @@ function checkPrecision(lengths25) {
|
|
|
13561
14059
|
"Bearing dimensions exceed the renderer's numerical resolution"
|
|
13562
14060
|
);
|
|
13563
14061
|
}
|
|
13564
|
-
function revolve(
|
|
14062
|
+
function revolve(profile5, segments) {
|
|
13565
14063
|
const positions = [];
|
|
13566
14064
|
const indices = [];
|
|
13567
|
-
for (const [radius, z] of
|
|
14065
|
+
for (const [radius, z] of profile5)
|
|
13568
14066
|
for (let i = 0; i < segments; i++) {
|
|
13569
14067
|
const angle = i * Math.PI * 2 / segments;
|
|
13570
14068
|
const r = typeof radius === "number" ? radius : radius(angle);
|
|
13571
14069
|
positions.push(r * Math.cos(angle), r * Math.sin(angle), z);
|
|
13572
14070
|
}
|
|
13573
|
-
for (let j = 0; j <
|
|
14071
|
+
for (let j = 0; j < profile5.length; j++)
|
|
13574
14072
|
for (let i = 0; i < segments; i++) {
|
|
13575
14073
|
const a = j * segments + i;
|
|
13576
14074
|
const b = j * segments + (i + 1) % segments;
|
|
13577
|
-
const c = (j + 1) %
|
|
13578
|
-
const e = (j + 1) %
|
|
14075
|
+
const c = (j + 1) % profile5.length * segments + (i + 1) % segments;
|
|
14076
|
+
const e = (j + 1) % profile5.length * segments + i;
|
|
13579
14077
|
indices.push(a, b, c, a, c, e);
|
|
13580
14078
|
}
|
|
13581
14079
|
return { positions, indices };
|
|
@@ -13586,7 +14084,7 @@ function annularSector(inner, outer, z0, z1, start, end, segments) {
|
|
|
13586
14084
|
Math.ceil((end - start) / (2 * Math.PI) * segments)
|
|
13587
14085
|
);
|
|
13588
14086
|
const count = steps + 1;
|
|
13589
|
-
const
|
|
14087
|
+
const profile5 = [
|
|
13590
14088
|
[outer, z0],
|
|
13591
14089
|
[outer, z1],
|
|
13592
14090
|
[inner, z1],
|
|
@@ -13594,7 +14092,7 @@ function annularSector(inner, outer, z0, z1, start, end, segments) {
|
|
|
13594
14092
|
];
|
|
13595
14093
|
const positions = [];
|
|
13596
14094
|
const indices = [];
|
|
13597
|
-
for (const [r, z] of
|
|
14095
|
+
for (const [r, z] of profile5)
|
|
13598
14096
|
for (let i = 0; i <= steps; i++) {
|
|
13599
14097
|
const angle = start + (end - start) * i / steps;
|
|
13600
14098
|
positions.push(r * Math.cos(angle), r * Math.sin(angle), z);
|
|
@@ -13790,7 +14288,7 @@ function createBallTransferUnitMesh(input = {}) {
|
|
|
13790
14288
|
);
|
|
13791
14289
|
const segments = 96;
|
|
13792
14290
|
const latitude = 48;
|
|
13793
|
-
const
|
|
14291
|
+
const profile5 = [
|
|
13794
14292
|
[d.bodyRadius, 0],
|
|
13795
14293
|
[d.bodyRadius, d.flangeBottomZ],
|
|
13796
14294
|
[d.flangeRadius, d.flangeBottomZ],
|
|
@@ -13803,12 +14301,12 @@ function createBallTransferUnitMesh(input = {}) {
|
|
|
13803
14301
|
for (let j = 1; j < latitude; j++) {
|
|
13804
14302
|
const angle = j * Math.PI / latitude;
|
|
13805
14303
|
if ((angle - openingAngle) * d.socketRadius > resolution7)
|
|
13806
|
-
|
|
14304
|
+
profile5.push([
|
|
13807
14305
|
d.socketRadius * Math.sin(angle),
|
|
13808
14306
|
d.ballCenterZ + d.socketRadius * Math.cos(angle)
|
|
13809
14307
|
]);
|
|
13810
14308
|
}
|
|
13811
|
-
|
|
14309
|
+
profile5.push([0, d.socketBottomZ], [0, 0]);
|
|
13812
14310
|
const holes = d.mountingHoles.map(
|
|
13813
14311
|
({ x, y, diameter }) => circularProfile(x, y, diameter / 2, segments)
|
|
13814
14312
|
);
|
|
@@ -13816,7 +14314,7 @@ function createBallTransferUnitMesh(input = {}) {
|
|
|
13816
14314
|
const housing = joinProfileMeshes([
|
|
13817
14315
|
// Cap faces are triangulated with all openings, rather than covered by
|
|
13818
14316
|
// annular triangles and repaired afterward with Boolean subtraction.
|
|
13819
|
-
revolve2(
|
|
14317
|
+
revolve2(profile5, segments, /* @__PURE__ */ new Set([1, 3])),
|
|
13820
14318
|
cap(
|
|
13821
14319
|
flangeOutline,
|
|
13822
14320
|
[circularProfile(0, 0, d.bodyRadius, segments), ...holes],
|
|
@@ -13853,10 +14351,10 @@ function createBallTransferUnitMesh(input = {}) {
|
|
|
13853
14351
|
];
|
|
13854
14352
|
return { positions, indices, parts };
|
|
13855
14353
|
}
|
|
13856
|
-
function revolve2(
|
|
14354
|
+
function revolve2(profile5, segments, omittedEdges = /* @__PURE__ */ new Set()) {
|
|
13857
14355
|
const positions = [];
|
|
13858
14356
|
const indices = [];
|
|
13859
|
-
const rings =
|
|
14357
|
+
const rings = profile5.map(([radius, z]) => {
|
|
13860
14358
|
const start = positions.length / 3;
|
|
13861
14359
|
const count = radius === 0 ? 1 : segments;
|
|
13862
14360
|
for (let i = 0; i < count; i++) {
|
|
@@ -14153,11 +14651,11 @@ function register59(registry2) {
|
|
|
14153
14651
|
import { Colorize as Colorize12, Custom as Custom6 } from "jscad-fiber";
|
|
14154
14652
|
|
|
14155
14653
|
// lib/models/channelbar/geometry.ts
|
|
14156
|
-
import
|
|
14157
|
-
var { primitives:
|
|
14158
|
-
var generalize2 =
|
|
14159
|
-
var { rectangle: rectangle2, roundedRectangle: roundedRectangle2, polygon: polygon2 } =
|
|
14160
|
-
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);
|
|
14161
14659
|
function filletProfile2(points, radii, width10, height10) {
|
|
14162
14660
|
const outline = [];
|
|
14163
14661
|
for (let i = 0; i < points.length; i++) {
|
|
@@ -14227,7 +14725,7 @@ function createChannelBarMesh(input) {
|
|
|
14227
14725
|
{ snap: true, triangulate: true },
|
|
14228
14726
|
createChannelBarGeom(input)
|
|
14229
14727
|
);
|
|
14230
|
-
const epsilon = Math.max(...
|
|
14728
|
+
const epsilon = Math.max(...measurements3.measureDimensions(geom)) * 1e-10;
|
|
14231
14729
|
const positions = [];
|
|
14232
14730
|
const indices = [];
|
|
14233
14731
|
const lookup = /* @__PURE__ */ new Map();
|
|
@@ -14241,7 +14739,7 @@ function createChannelBarMesh(input) {
|
|
|
14241
14739
|
}
|
|
14242
14740
|
return index;
|
|
14243
14741
|
};
|
|
14244
|
-
for (const poly of
|
|
14742
|
+
for (const poly of geometries3.geom3.toPolygons(geom)) {
|
|
14245
14743
|
for (let i = 1; i < poly.vertices.length - 1; i++) {
|
|
14246
14744
|
const a = poly.vertices[0], b = poly.vertices[i], c = poly.vertices[i + 1];
|
|
14247
14745
|
const u = b.map((x, j) => x - a[j]), v = c.map((x, j) => x - a[j]);
|
|
@@ -14279,10 +14777,10 @@ function register60(registry2) {
|
|
|
14279
14777
|
import { Colorize as Colorize13, Custom as Custom7 } from "jscad-fiber";
|
|
14280
14778
|
|
|
14281
14779
|
// lib/models/clampingshaftcollar/mesh.ts
|
|
14282
|
-
import
|
|
14780
|
+
import jscad8 from "@jscad/modeling";
|
|
14283
14781
|
|
|
14284
14782
|
// lib/mechanical/shaft-mount-geometry.ts
|
|
14285
|
-
import
|
|
14783
|
+
import jscad7 from "@jscad/modeling";
|
|
14286
14784
|
var bodySegments = 64;
|
|
14287
14785
|
var threadSegments = 24;
|
|
14288
14786
|
var samplesPerTurn = 12;
|
|
@@ -14325,22 +14823,22 @@ function createAnnularSleeve({
|
|
|
14325
14823
|
[chamfer, boreARadius, true],
|
|
14326
14824
|
[0, boreARadius + chamfer, true]
|
|
14327
14825
|
];
|
|
14328
|
-
const
|
|
14826
|
+
const profile5 = raw.filter(
|
|
14329
14827
|
([z, r], i) => i === 0 || z !== raw[i - 1][0] || r !== raw[i - 1][1]
|
|
14330
14828
|
);
|
|
14331
14829
|
const positions = [];
|
|
14332
14830
|
const indices = [];
|
|
14333
|
-
for (const [z, r, isBore] of
|
|
14831
|
+
for (const [z, r, isBore] of profile5)
|
|
14334
14832
|
for (let i = 0; i < bodySegments; i++) {
|
|
14335
14833
|
const angle = (i + (isBore ? 0.5 : 0)) * Math.PI * 2 / bodySegments;
|
|
14336
14834
|
const radius = isBore ? r / cosine : r;
|
|
14337
14835
|
positions.push(radius * Math.cos(angle), radius * Math.sin(angle), z);
|
|
14338
14836
|
}
|
|
14339
|
-
for (let row = 0; row <
|
|
14837
|
+
for (let row = 0; row < profile5.length; row++)
|
|
14340
14838
|
for (let i = 0; i < bodySegments; i++) {
|
|
14341
14839
|
const next = (i + 1) % bodySegments;
|
|
14342
14840
|
const a = row * bodySegments + i, b = row * bodySegments + next;
|
|
14343
|
-
const c = (row + 1) %
|
|
14841
|
+
const c = (row + 1) % profile5.length * bodySegments + next, d = (row + 1) % profile5.length * bodySegments + i;
|
|
14344
14842
|
indices.push(a, b, c, a, c, d);
|
|
14345
14843
|
}
|
|
14346
14844
|
return indexedMeshToGeom3({ positions, indices });
|
|
@@ -14398,10 +14896,10 @@ function createMountingHoleCutter(hole) {
|
|
|
14398
14896
|
function subtractShaftMountParts(body, ...cutters) {
|
|
14399
14897
|
const factor = 100;
|
|
14400
14898
|
const scaled = [body, ...cutters].map(
|
|
14401
|
-
(geometry) =>
|
|
14899
|
+
(geometry) => jscad7.transforms.scale([factor, factor, factor], geometry)
|
|
14402
14900
|
);
|
|
14403
|
-
const result =
|
|
14404
|
-
return
|
|
14901
|
+
const result = jscad7.booleans.subtract(scaled[0], ...scaled.slice(1));
|
|
14902
|
+
return jscad7.transforms.scale([1 / factor, 1 / factor, 1 / factor], result);
|
|
14405
14903
|
}
|
|
14406
14904
|
function finishShaftMountMesh(geometry) {
|
|
14407
14905
|
const positions = [];
|
|
@@ -14427,7 +14925,7 @@ function finishShaftMountMesh(geometry) {
|
|
|
14427
14925
|
vertices.set(key, [...vertices.get(key) ?? [], index]);
|
|
14428
14926
|
return index;
|
|
14429
14927
|
};
|
|
14430
|
-
const polygons =
|
|
14928
|
+
const polygons = jscad7.geometries.geom3.toPolygons(geometry).map(
|
|
14431
14929
|
(polygon4) => polygon4.vertices.map(weld).filter((id, i, ids) => id !== ids[(i + ids.length - 1) % ids.length])
|
|
14432
14930
|
).map((ids) => [...new Set(ids)]).filter((ids) => ids.length >= 3).filter((ids) => {
|
|
14433
14931
|
let longest = 0;
|
|
@@ -14450,11 +14948,11 @@ function finishShaftMountMesh(geometry) {
|
|
|
14450
14948
|
return Math.hypot(...delta.map((v, axis) => v - t * direction[axis])) >= tolerance;
|
|
14451
14949
|
});
|
|
14452
14950
|
});
|
|
14453
|
-
const
|
|
14951
|
+
const edgeKey2 = (a, b) => `${Math.min(a, b)},${Math.max(a, b)}`;
|
|
14454
14952
|
const edges = /* @__PURE__ */ new Map();
|
|
14455
14953
|
for (const polygon4 of polygons)
|
|
14456
14954
|
for (let i = 0; i < polygon4.length; i++) {
|
|
14457
|
-
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);
|
|
14458
14956
|
const edge = edges.get(key) ?? { a, b, count: 0 };
|
|
14459
14957
|
edge.count++;
|
|
14460
14958
|
edges.set(key, edge);
|
|
@@ -14539,7 +15037,7 @@ function createClampingShaftCollarMesh(input) {
|
|
|
14539
15037
|
});
|
|
14540
15038
|
const s = dimensions5.split;
|
|
14541
15039
|
const epsilon = 1e-4;
|
|
14542
|
-
const slit =
|
|
15040
|
+
const slit = jscad8.primitives.cuboid({
|
|
14543
15041
|
size: [
|
|
14544
15042
|
s.xMax - s.xMin + epsilon,
|
|
14545
15043
|
s.yMax - s.yMin,
|
|
@@ -15139,7 +15637,7 @@ function createFlangedBushingMesh(input) {
|
|
|
15139
15637
|
const ri = d.innerDiameter / 2;
|
|
15140
15638
|
const ro = d.outerDiameter / 2;
|
|
15141
15639
|
const rf = d.flangeDiameter / 2;
|
|
15142
|
-
const
|
|
15640
|
+
const profile5 = [
|
|
15143
15641
|
[rf, 0],
|
|
15144
15642
|
[rf, d.shoulderZ],
|
|
15145
15643
|
[ro, d.shoulderZ],
|
|
@@ -15150,14 +15648,14 @@ function createFlangedBushingMesh(input) {
|
|
|
15150
15648
|
const segments = 96;
|
|
15151
15649
|
const positions = [];
|
|
15152
15650
|
const indices = [];
|
|
15153
|
-
for (const [radius, z] of
|
|
15651
|
+
for (const [radius, z] of profile5)
|
|
15154
15652
|
for (let i = 0; i < segments; i++) {
|
|
15155
15653
|
const angle = i * Math.PI * 2 / segments;
|
|
15156
15654
|
positions.push(radius * Math.cos(angle), radius * Math.sin(angle), z);
|
|
15157
15655
|
}
|
|
15158
|
-
for (let ring = 0; ring <
|
|
15656
|
+
for (let ring = 0; ring < profile5.length; ring++) {
|
|
15159
15657
|
const a = ring * segments;
|
|
15160
|
-
const b = (ring + 1) %
|
|
15658
|
+
const b = (ring + 1) % profile5.length * segments;
|
|
15161
15659
|
for (let i = 0; i < segments; i++) {
|
|
15162
15660
|
const next = (i + 1) % segments;
|
|
15163
15661
|
indices.push(a + i, a + next, b + next, a + i, b + next, b + i);
|
|
@@ -15312,15 +15810,15 @@ function register67(registry2) {
|
|
|
15312
15810
|
import { Colorize as Colorize20, Custom as Custom14 } from "jscad-fiber";
|
|
15313
15811
|
|
|
15314
15812
|
// lib/models/flatcableclip/geometry.ts
|
|
15315
|
-
import
|
|
15813
|
+
import jscad9 from "@jscad/modeling";
|
|
15316
15814
|
var {
|
|
15317
|
-
primitives:
|
|
15318
|
-
extrusions:
|
|
15319
|
-
transforms,
|
|
15320
|
-
booleans,
|
|
15321
|
-
geometries:
|
|
15322
|
-
measurements:
|
|
15323
|
-
} =
|
|
15815
|
+
primitives: primitives4,
|
|
15816
|
+
extrusions: extrusions4,
|
|
15817
|
+
transforms: transforms2,
|
|
15818
|
+
booleans: booleans2,
|
|
15819
|
+
geometries: geometries4,
|
|
15820
|
+
measurements: measurements4
|
|
15821
|
+
} = jscad9;
|
|
15324
15822
|
function createFlatCableClipSolid(input) {
|
|
15325
15823
|
const p = flatCableClipModelPropsSchema.parse(input);
|
|
15326
15824
|
const legOuter = p.innerWidth / 2 + p.thickness, half = legOuter + p.footLength;
|
|
@@ -15338,25 +15836,25 @@ function createFlatCableClipSolid(input) {
|
|
|
15338
15836
|
[-legOuter, p.thickness],
|
|
15339
15837
|
[-half, p.thickness]
|
|
15340
15838
|
];
|
|
15341
|
-
const bridge =
|
|
15839
|
+
const bridge = transforms2.translate(
|
|
15342
15840
|
[0, p.depth / 2, 0],
|
|
15343
|
-
|
|
15841
|
+
transforms2.rotateX(
|
|
15344
15842
|
Math.PI / 2,
|
|
15345
|
-
|
|
15843
|
+
extrusions4.extrudeLinear(
|
|
15346
15844
|
{ height: p.depth },
|
|
15347
|
-
|
|
15845
|
+
primitives4.polygon({ points })
|
|
15348
15846
|
)
|
|
15349
15847
|
)
|
|
15350
15848
|
);
|
|
15351
15849
|
const bores = [-1, 1].map(
|
|
15352
|
-
(sign) =>
|
|
15850
|
+
(sign) => primitives4.cylinder({
|
|
15353
15851
|
radius: p.holeDiameter / 2,
|
|
15354
15852
|
height: p.thickness + 2,
|
|
15355
15853
|
center: [sign * p.holePitch / 2, 0, p.thickness / 2],
|
|
15356
15854
|
segments: 96
|
|
15357
15855
|
})
|
|
15358
15856
|
);
|
|
15359
|
-
return
|
|
15857
|
+
return booleans2.subtract(bridge, ...bores);
|
|
15360
15858
|
}
|
|
15361
15859
|
function createFlatCableClipMesh(input) {
|
|
15362
15860
|
const p = flatCableClipModelPropsSchema.parse(input);
|
|
@@ -15367,8 +15865,8 @@ function createFlatCableClipMesh(input) {
|
|
|
15367
15865
|
[0, p.thickness, p.innerHeight, p.innerHeight + p.thickness]
|
|
15368
15866
|
];
|
|
15369
15867
|
const geom = createFlatCableClipSolid(p);
|
|
15370
|
-
const tolerance = Math.max(...
|
|
15371
|
-
const polygons =
|
|
15868
|
+
const tolerance = Math.max(...measurements4.measureDimensions(geom)) * 1e-5;
|
|
15869
|
+
const polygons = geometries4.geom3.toPolygons(geom).map(
|
|
15372
15870
|
(poly) => poly.vertices.map(
|
|
15373
15871
|
(point) => point.map((value, axis) => {
|
|
15374
15872
|
const nearest = planes[axis].reduce(
|
|
@@ -15378,7 +15876,7 @@ function createFlatCableClipMesh(input) {
|
|
|
15378
15876
|
})
|
|
15379
15877
|
)
|
|
15380
15878
|
);
|
|
15381
|
-
return finishShaftMountMesh(
|
|
15879
|
+
return finishShaftMountMesh(geometries4.geom3.fromPoints(polygons));
|
|
15382
15880
|
}
|
|
15383
15881
|
function createFlatCableClipGeom(input) {
|
|
15384
15882
|
return indexedMeshToGeom3(createFlatCableClipMesh(input));
|
|
@@ -17349,7 +17847,7 @@ function register79(registry2) {
|
|
|
17349
17847
|
}
|
|
17350
17848
|
|
|
17351
17849
|
// lib/utils/nemaMotorAssemblyGeometry.ts
|
|
17352
|
-
import
|
|
17850
|
+
import jscad10 from "@jscad/modeling";
|
|
17353
17851
|
function nema34AssemblyCenters(p) {
|
|
17354
17852
|
const edge = p.bodyWidth / 2;
|
|
17355
17853
|
return [-1, 1].flatMap(
|
|
@@ -17359,16 +17857,16 @@ function nema34AssemblyCenters(p) {
|
|
|
17359
17857
|
);
|
|
17360
17858
|
}
|
|
17361
17859
|
function cutNema34FrontRecesses(geometry, p) {
|
|
17362
|
-
return
|
|
17860
|
+
return jscad10.booleans.subtract(
|
|
17363
17861
|
geometry,
|
|
17364
17862
|
...nema34AssemblyCenters(p).flatMap(([x, y]) => [
|
|
17365
|
-
|
|
17863
|
+
jscad10.primitives.cylinder({
|
|
17366
17864
|
radius: 1.6,
|
|
17367
17865
|
height: p.frontCapLength + 0.2,
|
|
17368
17866
|
center: [x, y, -p.frontCapLength / 2],
|
|
17369
17867
|
segments: 32
|
|
17370
17868
|
}),
|
|
17371
|
-
|
|
17869
|
+
jscad10.primitives.cylinder({
|
|
17372
17870
|
radius: 5,
|
|
17373
17871
|
height: Math.min(4, p.frontCapLength / 2) + 0.1,
|
|
17374
17872
|
center: [
|
|
@@ -17382,8 +17880,8 @@ function cutNema34FrontRecesses(geometry, p) {
|
|
|
17382
17880
|
);
|
|
17383
17881
|
}
|
|
17384
17882
|
function createNema34FrontScrews(p) {
|
|
17385
|
-
const head =
|
|
17386
|
-
|
|
17883
|
+
const head = jscad10.booleans.subtract(
|
|
17884
|
+
jscad10.primitives.ellipsoid({
|
|
17387
17885
|
radius: [3.2, 3.2, 1.5],
|
|
17388
17886
|
center: [0, 0, -1.8],
|
|
17389
17887
|
segments: 32
|
|
@@ -17392,22 +17890,22 @@ function createNema34FrontScrews(p) {
|
|
|
17392
17890
|
[3.7, 0.8, 1.1],
|
|
17393
17891
|
[0.8, 3.7, 1.1]
|
|
17394
17892
|
].map(
|
|
17395
|
-
(size) =>
|
|
17893
|
+
(size) => jscad10.primitives.cuboid({
|
|
17396
17894
|
size,
|
|
17397
17895
|
center: [0, 0, -0.8]
|
|
17398
17896
|
})
|
|
17399
17897
|
)
|
|
17400
17898
|
);
|
|
17401
17899
|
return nema34AssemblyCenters(p).map(
|
|
17402
|
-
([x, y]) =>
|
|
17900
|
+
([x, y]) => jscad10.transforms.translate([x, y, 0], head)
|
|
17403
17901
|
);
|
|
17404
17902
|
}
|
|
17405
17903
|
|
|
17406
17904
|
// lib/NemaMotor.tsx
|
|
17407
|
-
import
|
|
17905
|
+
import jscad12 from "@jscad/modeling";
|
|
17408
17906
|
|
|
17409
17907
|
// lib/utils/nemaMotorWireGeometry.ts
|
|
17410
|
-
import
|
|
17908
|
+
import jscad11 from "@jscad/modeling";
|
|
17411
17909
|
|
|
17412
17910
|
// lib/utils/nemaMotorParameters.ts
|
|
17413
17911
|
var resolveNemaMotorProps = nemaMotorModelPropsSchema.parse.bind(nemaMotorModelPropsSchema);
|
|
@@ -17418,12 +17916,12 @@ function createNemaMotorWireGeometry(input) {
|
|
|
17418
17916
|
if (p.noWires) return [];
|
|
17419
17917
|
const { position } = getNemaMotorReferencePoints(p).wireside;
|
|
17420
17918
|
const angle = p.wireSideAngle * Math.PI / 180;
|
|
17421
|
-
const place = (geometry) =>
|
|
17919
|
+
const place = (geometry) => jscad11.transforms.translate(
|
|
17422
17920
|
[position.x, position.y, position.z],
|
|
17423
|
-
|
|
17921
|
+
jscad11.transforms.rotateZ(angle, geometry)
|
|
17424
17922
|
);
|
|
17425
17923
|
if (p.wireStubs) {
|
|
17426
|
-
const
|
|
17924
|
+
const colors2 = [
|
|
17427
17925
|
"#d53f3f",
|
|
17428
17926
|
"#2463af",
|
|
17429
17927
|
"#3b934b",
|
|
@@ -17434,17 +17932,17 @@ function createNemaMotorWireGeometry(input) {
|
|
|
17434
17932
|
"#803e91"
|
|
17435
17933
|
];
|
|
17436
17934
|
const wires = Array.from({ length: p.wireCount }, (_, i) => ({
|
|
17437
|
-
color:
|
|
17935
|
+
color: colors2[i],
|
|
17438
17936
|
geometry: place(
|
|
17439
|
-
|
|
17937
|
+
jscad11.transforms.translate(
|
|
17440
17938
|
[
|
|
17441
17939
|
(p.wireLength - 0.15) / 2,
|
|
17442
17940
|
(i - (p.wireCount - 1) / 2) * p.wireDiameter * 1.5,
|
|
17443
17941
|
0
|
|
17444
17942
|
],
|
|
17445
|
-
|
|
17943
|
+
jscad11.transforms.rotateY(
|
|
17446
17944
|
Math.PI / 2,
|
|
17447
|
-
|
|
17945
|
+
jscad11.primitives.cylinder({
|
|
17448
17946
|
height: p.wireLength + 0.15,
|
|
17449
17947
|
radius: p.wireDiameter / 2,
|
|
17450
17948
|
segments: 24
|
|
@@ -17457,7 +17955,7 @@ function createNemaMotorWireGeometry(input) {
|
|
|
17457
17955
|
wires.unshift({
|
|
17458
17956
|
color: "#252830",
|
|
17459
17957
|
geometry: place(
|
|
17460
|
-
|
|
17958
|
+
jscad11.primitives.roundedCuboid({
|
|
17461
17959
|
size: [3, p.wireCount * p.wireDiameter * 1.5 + 3, 6],
|
|
17462
17960
|
center: [0.8, 0, 0],
|
|
17463
17961
|
roundRadius: 1,
|
|
@@ -17472,12 +17970,12 @@ function createNemaMotorWireGeometry(input) {
|
|
|
17472
17970
|
const wall = pitch === 2 ? 0.6 : 0.3;
|
|
17473
17971
|
const contactLength = pitch === 2 ? 3.4 : 2.4;
|
|
17474
17972
|
const contactSize = pitch === 2 ? 0.5 : 0.3;
|
|
17475
|
-
const shell =
|
|
17476
|
-
|
|
17973
|
+
const shell = jscad11.booleans.subtract(
|
|
17974
|
+
jscad11.primitives.cuboid({
|
|
17477
17975
|
size: [matingDepth + 0.1, bodyWidth, bodyHeight],
|
|
17478
17976
|
center: [(matingDepth - 0.1) / 2, 0, 0]
|
|
17479
17977
|
}),
|
|
17480
|
-
|
|
17978
|
+
jscad11.primitives.cuboid({
|
|
17481
17979
|
size: [matingDepth - 0.5, bodyWidth - 2 * wall, bodyHeight - 2 * wall],
|
|
17482
17980
|
center: [matingDepth / 2 + 0.55, 0, 0]
|
|
17483
17981
|
})
|
|
@@ -17487,7 +17985,7 @@ function createNemaMotorWireGeometry(input) {
|
|
|
17487
17985
|
...Array.from({ length: pinCount }, (_, i) => ({
|
|
17488
17986
|
color: "#b8bec6",
|
|
17489
17987
|
geometry: place(
|
|
17490
|
-
|
|
17988
|
+
jscad11.primitives.cuboid({
|
|
17491
17989
|
size: [contactLength, contactSize, contactSize],
|
|
17492
17990
|
center: [contactLength / 2, (i - (pinCount - 1) / 2) * pitch, 0]
|
|
17493
17991
|
})
|
|
@@ -17631,12 +18129,12 @@ function createNemaMotorSections(input) {
|
|
|
17631
18129
|
else {
|
|
17632
18130
|
const cut = r - p.shaftFlatDepth;
|
|
17633
18131
|
const angle = Math.acos(cut / r);
|
|
17634
|
-
const
|
|
18132
|
+
const profile5 = Array.from({ length: 97 }, (_, i) => {
|
|
17635
18133
|
const a = angle + (2 * Math.PI - 2 * angle) * i / 96;
|
|
17636
18134
|
return [r * Math.cos(a), r * Math.sin(a)];
|
|
17637
18135
|
});
|
|
17638
18136
|
const rotation = p.shaftFlatAngle * Math.PI / 180;
|
|
17639
|
-
const d =
|
|
18137
|
+
const d = profile5.map(([x, y]) => [
|
|
17640
18138
|
x * Math.cos(rotation) - y * Math.sin(rotation),
|
|
17641
18139
|
x * Math.sin(rotation) + y * Math.cos(rotation)
|
|
17642
18140
|
]);
|
|
@@ -17649,7 +18147,7 @@ function createNemaMotorSections(input) {
|
|
|
17649
18147
|
// lib/NemaMotor.tsx
|
|
17650
18148
|
import { Colorize as Colorize33, Custom as Custom25 } from "jscad-fiber";
|
|
17651
18149
|
import { Fragment as Fragment17, jsx as jsx67, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
17652
|
-
var generalize3 =
|
|
18150
|
+
var generalize3 = jscad12.modifiers.generalize;
|
|
17653
18151
|
function NemaMotor({
|
|
17654
18152
|
bodyColor = "#242830",
|
|
17655
18153
|
capColor = "#aeb5bd",
|
|
@@ -17658,7 +18156,7 @@ function NemaMotor({
|
|
|
17658
18156
|
...props
|
|
17659
18157
|
}) {
|
|
17660
18158
|
const p = resolveNemaMotorProps(props);
|
|
17661
|
-
const screw = p.backFaceScrews ?
|
|
18159
|
+
const screw = p.backFaceScrews ? jscad12.transforms.rotateX(
|
|
17662
18160
|
Math.PI,
|
|
17663
18161
|
createHexSocketBoltGeom({
|
|
17664
18162
|
metricSize: p.backFaceScrewSize,
|
|
@@ -17670,16 +18168,16 @@ function NemaMotor({
|
|
|
17670
18168
|
const halfPitchY = p.backFaceHoleSpacingY / 2;
|
|
17671
18169
|
return /* @__PURE__ */ jsxs17(Fragment17, { children: [
|
|
17672
18170
|
createNemaMotorSections(p).map((section, index) => {
|
|
17673
|
-
const outline =
|
|
17674
|
-
const
|
|
18171
|
+
const outline = jscad12.geometries.geom2.fromPoints(section.outline);
|
|
18172
|
+
const profile5 = section.holes.length ? jscad12.booleans.subtract(
|
|
17675
18173
|
outline,
|
|
17676
|
-
...section.holes.map((h) =>
|
|
18174
|
+
...section.holes.map((h) => jscad12.geometries.geom2.fromPoints(h))
|
|
17677
18175
|
) : outline;
|
|
17678
|
-
let geometry =
|
|
18176
|
+
let geometry = jscad12.transforms.translate(
|
|
17679
18177
|
[0, 0, section.zMin],
|
|
17680
|
-
|
|
18178
|
+
jscad12.extrusions.extrudeLinear(
|
|
17681
18179
|
{ height: section.zMax - section.zMin },
|
|
17682
|
-
|
|
18180
|
+
profile5
|
|
17683
18181
|
)
|
|
17684
18182
|
);
|
|
17685
18183
|
if (p.nemaSize === 34 && section.name === "frontCap")
|
|
@@ -17721,7 +18219,7 @@ function NemaMotor({
|
|
|
17721
18219
|
children: /* @__PURE__ */ jsx67(
|
|
17722
18220
|
Custom25,
|
|
17723
18221
|
{
|
|
17724
|
-
geometry:
|
|
18222
|
+
geometry: jscad12.transforms.translate(
|
|
17725
18223
|
[x, y, -p.bodyLength],
|
|
17726
18224
|
generalize3({ simplify: true }, screw)
|
|
17727
18225
|
)
|
|
@@ -18230,19 +18728,19 @@ function register83(registry2) {
|
|
|
18230
18728
|
import { Colorize as Colorize37, Custom as Custom29 } from "jscad-fiber";
|
|
18231
18729
|
|
|
18232
18730
|
// lib/models/perforatedsheet/geometry.ts
|
|
18233
|
-
import
|
|
18731
|
+
import jscad13 from "@jscad/modeling";
|
|
18234
18732
|
var {
|
|
18235
|
-
booleans:
|
|
18236
|
-
primitives:
|
|
18237
|
-
extrusions:
|
|
18238
|
-
geometries:
|
|
18239
|
-
modifiers:
|
|
18240
|
-
measurements:
|
|
18241
|
-
} =
|
|
18242
|
-
var generalize4 =
|
|
18243
|
-
var { subtract } =
|
|
18244
|
-
var { rectangle: rectangle3, roundedRectangle: roundedRectangle3, circle: circle2 } =
|
|
18245
|
-
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);
|
|
18246
18744
|
function perforated(p) {
|
|
18247
18745
|
const holes = [];
|
|
18248
18746
|
const rows = Math.floor((p.width - 2 * p.edgeY) / p.pitchY + 1 + 1e-10);
|
|
@@ -18273,7 +18771,7 @@ function createPerforatedSheetMesh(input) {
|
|
|
18273
18771
|
{ snap: true, triangulate: true },
|
|
18274
18772
|
createPerforatedSheetGeom(input)
|
|
18275
18773
|
);
|
|
18276
|
-
const epsilon = Math.max(...
|
|
18774
|
+
const epsilon = Math.max(...measurements5.measureDimensions(geom)) * 1e-10;
|
|
18277
18775
|
const positions = [];
|
|
18278
18776
|
const indices = [];
|
|
18279
18777
|
const lookup = /* @__PURE__ */ new Map();
|
|
@@ -18287,7 +18785,7 @@ function createPerforatedSheetMesh(input) {
|
|
|
18287
18785
|
}
|
|
18288
18786
|
return index;
|
|
18289
18787
|
};
|
|
18290
|
-
for (const poly of
|
|
18788
|
+
for (const poly of geometries5.geom3.toPolygons(geom)) {
|
|
18291
18789
|
for (let i = 1; i < poly.vertices.length - 1; i++) {
|
|
18292
18790
|
const a = poly.vertices[0], b = poly.vertices[i], c = poly.vertices[i + 1];
|
|
18293
18791
|
const u = b.map((x, j) => x - a[j]), v = c.map((x, j) => x - a[j]);
|
|
@@ -18334,7 +18832,7 @@ function createPlainBushingMesh(input) {
|
|
|
18334
18832
|
const ri = d.innerDiameter / 2;
|
|
18335
18833
|
const ro = d.outerDiameter / 2;
|
|
18336
18834
|
const c = props.edgeChamfer;
|
|
18337
|
-
const
|
|
18835
|
+
const profile5 = c > 0 ? [
|
|
18338
18836
|
[d.endOuterDiameter / 2, 0],
|
|
18339
18837
|
[ro, c],
|
|
18340
18838
|
[ro, d.length - c],
|
|
@@ -18352,14 +18850,14 @@ function createPlainBushingMesh(input) {
|
|
|
18352
18850
|
const segments = 96;
|
|
18353
18851
|
const positions = [];
|
|
18354
18852
|
const indices = [];
|
|
18355
|
-
for (const [radius, z] of
|
|
18853
|
+
for (const [radius, z] of profile5)
|
|
18356
18854
|
for (let i = 0; i < segments; i++) {
|
|
18357
18855
|
const angle = i * Math.PI * 2 / segments;
|
|
18358
18856
|
positions.push(radius * Math.cos(angle), radius * Math.sin(angle), z);
|
|
18359
18857
|
}
|
|
18360
|
-
for (let ring = 0; ring <
|
|
18858
|
+
for (let ring = 0; ring < profile5.length; ring++) {
|
|
18361
18859
|
const a = ring * segments;
|
|
18362
|
-
const b = (ring + 1) %
|
|
18860
|
+
const b = (ring + 1) % profile5.length * segments;
|
|
18363
18861
|
for (let i = 0; i < segments; i++) {
|
|
18364
18862
|
const next = (i + 1) % segments;
|
|
18365
18863
|
indices.push(a + i, a + next, b + next, a + i, b + next, b + i);
|
|
@@ -18396,13 +18894,13 @@ function register85(registry2) {
|
|
|
18396
18894
|
import { Colorize as Colorize39, Custom as Custom31 } from "jscad-fiber";
|
|
18397
18895
|
|
|
18398
18896
|
// lib/models/pushfitplug/geometry.ts
|
|
18399
|
-
import
|
|
18400
|
-
var { primitives:
|
|
18401
|
-
var generalize5 =
|
|
18402
|
-
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;
|
|
18403
18901
|
function createPushFitPlugGeom(input) {
|
|
18404
18902
|
const p = pushFitPlugModelPropsSchema.parse(input);
|
|
18405
|
-
return
|
|
18903
|
+
return extrusions6.extrudeRotate(
|
|
18406
18904
|
{ segments: 64 },
|
|
18407
18905
|
polygon3({
|
|
18408
18906
|
points: [
|
|
@@ -18421,7 +18919,7 @@ function createPushFitPlugMesh(input) {
|
|
|
18421
18919
|
{ snap: true, triangulate: true },
|
|
18422
18920
|
createPushFitPlugGeom(input)
|
|
18423
18921
|
);
|
|
18424
|
-
const epsilon = Math.max(...
|
|
18922
|
+
const epsilon = Math.max(...measurements6.measureDimensions(geom)) * 1e-10;
|
|
18425
18923
|
const positions = [];
|
|
18426
18924
|
const indices = [];
|
|
18427
18925
|
const lookup = /* @__PURE__ */ new Map();
|
|
@@ -18435,7 +18933,7 @@ function createPushFitPlugMesh(input) {
|
|
|
18435
18933
|
}
|
|
18436
18934
|
return index;
|
|
18437
18935
|
};
|
|
18438
|
-
for (const poly of
|
|
18936
|
+
for (const poly of geometries6.geom3.toPolygons(geom)) {
|
|
18439
18937
|
for (let i = 1; i < poly.vertices.length - 1; i++) {
|
|
18440
18938
|
const a = poly.vertices[0], b = poly.vertices[i], c = poly.vertices[i + 1];
|
|
18441
18939
|
const u = b.map((x, j) => x - a[j]), v = c.map((x, j) => x - a[j]);
|
|
@@ -18473,11 +18971,11 @@ function register86(registry2) {
|
|
|
18473
18971
|
import { Colorize as Colorize40, Custom as Custom32 } from "jscad-fiber";
|
|
18474
18972
|
|
|
18475
18973
|
// lib/models/rectangularbar/geometry.ts
|
|
18476
|
-
import
|
|
18477
|
-
var { primitives:
|
|
18478
|
-
var generalize6 =
|
|
18479
|
-
var { rectangle: rectangle5, roundedRectangle: roundedRectangle5 } =
|
|
18480
|
-
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);
|
|
18481
18979
|
var roundedRect = (width10, height10, radius) => radius ? roundedRectangle5({
|
|
18482
18980
|
size: [width10, height10],
|
|
18483
18981
|
roundRadius: radius,
|
|
@@ -18492,7 +18990,7 @@ function createRectangularBarMesh(input) {
|
|
|
18492
18990
|
{ snap: true, triangulate: true },
|
|
18493
18991
|
createRectangularBarGeom(input)
|
|
18494
18992
|
);
|
|
18495
|
-
const epsilon = Math.max(...
|
|
18993
|
+
const epsilon = Math.max(...measurements7.measureDimensions(geom)) * 1e-10;
|
|
18496
18994
|
const positions = [];
|
|
18497
18995
|
const indices = [];
|
|
18498
18996
|
const lookup = /* @__PURE__ */ new Map();
|
|
@@ -18506,7 +19004,7 @@ function createRectangularBarMesh(input) {
|
|
|
18506
19004
|
}
|
|
18507
19005
|
return index;
|
|
18508
19006
|
};
|
|
18509
|
-
for (const poly of
|
|
19007
|
+
for (const poly of geometries7.geom3.toPolygons(geom)) {
|
|
18510
19008
|
for (let i = 1; i < poly.vertices.length - 1; i++) {
|
|
18511
19009
|
const a = poly.vertices[0], b = poly.vertices[i], c = poly.vertices[i + 1];
|
|
18512
19010
|
const u = b.map((x, j) => x - a[j]), v = c.map((x, j) => x - a[j]);
|
|
@@ -18658,83 +19156,63 @@ function register88(registry2) {
|
|
|
18658
19156
|
}
|
|
18659
19157
|
|
|
18660
19158
|
// lib/models/rectangulartube/RectangularTube.tsx
|
|
18661
|
-
import {
|
|
19159
|
+
import {
|
|
19160
|
+
Colorize as Colorize42,
|
|
19161
|
+
ExtrudeLinear as ExtrudeLinear3,
|
|
19162
|
+
Polygon as Polygon3,
|
|
19163
|
+
Subtract as Subtract5
|
|
19164
|
+
} from "jscad-fiber/headless";
|
|
18662
19165
|
|
|
18663
|
-
// lib/models/rectangulartube/
|
|
18664
|
-
import
|
|
18665
|
-
var {
|
|
18666
|
-
booleans: booleans3,
|
|
18667
|
-
primitives: primitives7,
|
|
18668
|
-
extrusions: extrusions7,
|
|
18669
|
-
geometries: geometries7,
|
|
18670
|
-
modifiers: modifiers6,
|
|
18671
|
-
measurements: measurements7
|
|
18672
|
-
} = jscad13;
|
|
18673
|
-
var generalize7 = modifiers6.generalize;
|
|
18674
|
-
var { subtract: subtract2 } = booleans3;
|
|
18675
|
-
var { rectangle: rectangle6, roundedRectangle: roundedRectangle6 } = primitives7;
|
|
18676
|
-
var profile5 = (shape49, height10) => extrusions7.extrudeLinear({ height: height10 }, shape49);
|
|
18677
|
-
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({
|
|
18678
19169
|
size: [width10, height10],
|
|
18679
19170
|
roundRadius: radius,
|
|
18680
19171
|
segments: 64
|
|
18681
|
-
}) :
|
|
18682
|
-
function
|
|
19172
|
+
}) : jscad16.primitives.rectangle({ size: [width10, height10] });
|
|
19173
|
+
function getRectangularTubeProfiles(input) {
|
|
18683
19174
|
const p = rectangularTubeModelPropsSchema.parse(input);
|
|
18684
|
-
|
|
18685
|
-
|
|
18686
|
-
|
|
18687
|
-
|
|
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(
|
|
18688
19181
|
p.width - 2 * p.wallThickness,
|
|
18689
19182
|
p.height - 2 * p.wallThickness,
|
|
18690
19183
|
p.innerRadius
|
|
18691
19184
|
)
|
|
18692
|
-
)
|
|
18693
|
-
p.length
|
|
18694
|
-
);
|
|
18695
|
-
}
|
|
18696
|
-
function createRectangularTubeMesh(input) {
|
|
18697
|
-
const geom = generalize7(
|
|
18698
|
-
{ snap: true, triangulate: true },
|
|
18699
|
-
createRectangularTubeGeom(input)
|
|
18700
|
-
);
|
|
18701
|
-
const epsilon = Math.max(...measurements7.measureDimensions(geom)) * 1e-10;
|
|
18702
|
-
const positions = [];
|
|
18703
|
-
const indices = [];
|
|
18704
|
-
const lookup = /* @__PURE__ */ new Map();
|
|
18705
|
-
const vertex = (v) => {
|
|
18706
|
-
const key = v.map((x) => Math.round(x / epsilon)).join(",");
|
|
18707
|
-
let index = lookup.get(key);
|
|
18708
|
-
if (index === void 0) {
|
|
18709
|
-
index = positions.length / 3;
|
|
18710
|
-
positions.push(...v);
|
|
18711
|
-
lookup.set(key, index);
|
|
18712
|
-
}
|
|
18713
|
-
return index;
|
|
19185
|
+
)
|
|
18714
19186
|
};
|
|
18715
|
-
for (const poly of geometries7.geom3.toPolygons(geom)) {
|
|
18716
|
-
for (let i = 1; i < poly.vertices.length - 1; i++) {
|
|
18717
|
-
const a = poly.vertices[0], b = poly.vertices[i], c = poly.vertices[i + 1];
|
|
18718
|
-
const u = b.map((x, j) => x - a[j]), v = c.map((x, j) => x - a[j]);
|
|
18719
|
-
const area = Math.hypot(
|
|
18720
|
-
u[1] * v[2] - u[2] * v[1],
|
|
18721
|
-
u[2] * v[0] - u[0] * v[2],
|
|
18722
|
-
u[0] * v[1] - u[1] * v[0]
|
|
18723
|
-
);
|
|
18724
|
-
if (area > epsilon * epsilon)
|
|
18725
|
-
indices.push(vertex(a), vertex(b), vertex(c));
|
|
18726
|
-
}
|
|
18727
|
-
}
|
|
18728
|
-
return { positions, indices };
|
|
18729
19187
|
}
|
|
18730
19188
|
|
|
18731
19189
|
// lib/models/rectangulartube/RectangularTube.tsx
|
|
18732
|
-
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
19190
|
+
import { jsx as jsx85, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
18733
19191
|
function RectangularTube({
|
|
18734
19192
|
color = "#929da9",
|
|
18735
19193
|
...props
|
|
18736
19194
|
}) {
|
|
18737
|
-
|
|
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
|
+
] }) });
|
|
18738
19216
|
}
|
|
18739
19217
|
|
|
18740
19218
|
// lib/models/rectangulartube/register.tsx
|
|
@@ -18750,7 +19228,7 @@ function register89(registry2) {
|
|
|
18750
19228
|
}
|
|
18751
19229
|
|
|
18752
19230
|
// lib/models/rigidcoupler/RigidCoupler.tsx
|
|
18753
|
-
import { Colorize as Colorize43, Custom as
|
|
19231
|
+
import { Colorize as Colorize43, Custom as Custom34 } from "jscad-fiber";
|
|
18754
19232
|
|
|
18755
19233
|
// lib/models/rigidcoupler/mesh.ts
|
|
18756
19234
|
import "@jscad/modeling";
|
|
@@ -18784,7 +19262,7 @@ function RigidCoupler({
|
|
|
18784
19262
|
color = "#737e8f",
|
|
18785
19263
|
...props
|
|
18786
19264
|
}) {
|
|
18787
|
-
return /* @__PURE__ */ jsx87(Colorize43, { color, children: /* @__PURE__ */ jsx87(
|
|
19265
|
+
return /* @__PURE__ */ jsx87(Colorize43, { color, children: /* @__PURE__ */ jsx87(Custom34, { geometry: createRigidCouplerGeom(props) }) });
|
|
18788
19266
|
}
|
|
18789
19267
|
|
|
18790
19268
|
// lib/models/rigidcoupler/register.tsx
|
|
@@ -18800,7 +19278,7 @@ function register90(registry2) {
|
|
|
18800
19278
|
}
|
|
18801
19279
|
|
|
18802
19280
|
// lib/models/setscrew/SetScrew.tsx
|
|
18803
|
-
import { Colorize as Colorize44, Custom as
|
|
19281
|
+
import { Colorize as Colorize44, Custom as Custom35 } from "jscad-fiber";
|
|
18804
19282
|
|
|
18805
19283
|
// lib/models/setscrew/mesh.ts
|
|
18806
19284
|
function createSetScrewMesh(input, options = {}) {
|
|
@@ -18911,7 +19389,7 @@ function createSetScrewGeom(input, options) {
|
|
|
18911
19389
|
return indexedMeshToGeom3(createSetScrewMesh(input, options));
|
|
18912
19390
|
}
|
|
18913
19391
|
function SetScrew({ color = "#737e8f", ...props }) {
|
|
18914
|
-
return /* @__PURE__ */ jsx89(Colorize44, { color, children: /* @__PURE__ */ jsx89(
|
|
19392
|
+
return /* @__PURE__ */ jsx89(Colorize44, { color, children: /* @__PURE__ */ jsx89(Custom35, { geometry: createSetScrewGeom(props) }) });
|
|
18915
19393
|
}
|
|
18916
19394
|
|
|
18917
19395
|
// lib/models/setscrew/register.tsx
|
|
@@ -18927,7 +19405,7 @@ function register91(registry2) {
|
|
|
18927
19405
|
}
|
|
18928
19406
|
|
|
18929
19407
|
// lib/models/shaftcollar/ShaftCollar.tsx
|
|
18930
|
-
import { Colorize as Colorize45, Custom as
|
|
19408
|
+
import { Colorize as Colorize45, Custom as Custom36 } from "jscad-fiber";
|
|
18931
19409
|
|
|
18932
19410
|
// lib/models/shaftcollar/mesh.ts
|
|
18933
19411
|
import "@jscad/modeling";
|
|
@@ -18956,7 +19434,7 @@ function createShaftCollarGeom(input) {
|
|
|
18956
19434
|
return indexedMeshToGeom3(createShaftCollarMesh(input));
|
|
18957
19435
|
}
|
|
18958
19436
|
function ShaftCollar({ color = "#737e8f", ...props }) {
|
|
18959
|
-
return /* @__PURE__ */ jsx91(Colorize45, { color, children: /* @__PURE__ */ jsx91(
|
|
19437
|
+
return /* @__PURE__ */ jsx91(Colorize45, { color, children: /* @__PURE__ */ jsx91(Custom36, { geometry: createShaftCollarGeom(props) }) });
|
|
18960
19438
|
}
|
|
18961
19439
|
|
|
18962
19440
|
// lib/models/shaftcollar/register.tsx
|
|
@@ -18972,7 +19450,7 @@ function register92(registry2) {
|
|
|
18972
19450
|
}
|
|
18973
19451
|
|
|
18974
19452
|
// lib/SheetMetal.tsx
|
|
18975
|
-
import { Colorize as Colorize46, Custom as
|
|
19453
|
+
import { Colorize as Colorize46, Custom as Custom37 } from "jscad-fiber";
|
|
18976
19454
|
|
|
18977
19455
|
// lib/mechanical/sheet-metal-mesh.ts
|
|
18978
19456
|
import earcut5 from "earcut";
|
|
@@ -18998,7 +19476,7 @@ function holeOutline(hole) {
|
|
|
18998
19476
|
function createSheetMetalMesh(input) {
|
|
18999
19477
|
const props = sheetMetalModelPropsSchema.parse(input);
|
|
19000
19478
|
const { width: width10, baseLength, flangeHeight, thickness } = props;
|
|
19001
|
-
const
|
|
19479
|
+
const profile5 = props.channel ? "channel" : props.angle ? "angle" : "plate";
|
|
19002
19480
|
const radius = props.insideBendRadius + thickness / 2;
|
|
19003
19481
|
const positions = [];
|
|
19004
19482
|
const indices = [];
|
|
@@ -19011,10 +19489,10 @@ function createSheetMetalMesh(input) {
|
|
|
19011
19489
|
addTriangle([vertices[0], vertices[1], vertices[2]], reverse);
|
|
19012
19490
|
addTriangle([vertices[0], vertices[2], vertices[3]], reverse);
|
|
19013
19491
|
};
|
|
19014
|
-
const panels =
|
|
19492
|
+
const panels = profile5 === "plate" ? ["base"] : profile5 === "angle" ? ["base", "right"] : ["base", "left", "right"];
|
|
19015
19493
|
for (const hole of props.holes) {
|
|
19016
19494
|
if (!panels.includes(hole.panel))
|
|
19017
|
-
throw new Error(`No ${hole.panel} panel on ${
|
|
19495
|
+
throw new Error(`No ${hole.panel} panel on ${profile5}`);
|
|
19018
19496
|
}
|
|
19019
19497
|
for (const panel of panels) {
|
|
19020
19498
|
const length32 = panel === "base" ? baseLength : flangeHeight;
|
|
@@ -19065,7 +19543,7 @@ function createSheetMetalMesh(input) {
|
|
|
19065
19543
|
for (const [loopIndex, loop] of loops.entries())
|
|
19066
19544
|
for (let i = 0; i < loop.length; i++) {
|
|
19067
19545
|
const a = loop[i], b = loop[(i + 1) % loop.length];
|
|
19068
|
-
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))
|
|
19069
19547
|
continue;
|
|
19070
19548
|
addQuad(
|
|
19071
19549
|
[
|
|
@@ -19078,7 +19556,7 @@ function createSheetMetalMesh(input) {
|
|
|
19078
19556
|
);
|
|
19079
19557
|
}
|
|
19080
19558
|
}
|
|
19081
|
-
const sides =
|
|
19559
|
+
const sides = profile5 === "plate" ? [] : profile5 === "angle" ? [1] : [-1, 1];
|
|
19082
19560
|
for (const side of sides) {
|
|
19083
19561
|
const project = (angle, crossSection) => {
|
|
19084
19562
|
const r = radius - crossSection.offset;
|
|
@@ -19123,7 +19601,7 @@ function createSheetMetalGeom(input) {
|
|
|
19123
19601
|
return indexedMeshToGeom3(createSheetMetalMesh(input));
|
|
19124
19602
|
}
|
|
19125
19603
|
function SheetMetal({ color = "#737e8f", ...props }) {
|
|
19126
|
-
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) }) });
|
|
19127
19605
|
}
|
|
19128
19606
|
|
|
19129
19607
|
// lib/models/sheetmetal/register.tsx
|
|
@@ -19139,7 +19617,7 @@ function register93(registry2) {
|
|
|
19139
19617
|
}
|
|
19140
19618
|
|
|
19141
19619
|
// lib/models/slottedchannel/SlottedChannel.tsx
|
|
19142
|
-
import { Colorize as Colorize47, Custom as
|
|
19620
|
+
import { Colorize as Colorize47, Custom as Custom38 } from "jscad-fiber";
|
|
19143
19621
|
|
|
19144
19622
|
// lib/models/slottedchannel/mesh.ts
|
|
19145
19623
|
function quarterBend2(radius, thickness) {
|
|
@@ -19267,7 +19745,7 @@ function SlottedChannel({
|
|
|
19267
19745
|
color = "#8995a3",
|
|
19268
19746
|
...props
|
|
19269
19747
|
}) {
|
|
19270
|
-
return /* @__PURE__ */ jsx95(Colorize47, { color, children: /* @__PURE__ */ jsx95(
|
|
19748
|
+
return /* @__PURE__ */ jsx95(Colorize47, { color, children: /* @__PURE__ */ jsx95(Custom38, { geometry: createSlottedChannelGeom(props) }) });
|
|
19271
19749
|
}
|
|
19272
19750
|
|
|
19273
19751
|
// lib/models/slottedchannel/register.tsx
|
|
@@ -19283,7 +19761,7 @@ function register94(registry2) {
|
|
|
19283
19761
|
}
|
|
19284
19762
|
|
|
19285
19763
|
// lib/models/spacer/Spacer.tsx
|
|
19286
|
-
import { Colorize as Colorize48, Custom as
|
|
19764
|
+
import { Colorize as Colorize48, Custom as Custom39 } from "jscad-fiber";
|
|
19287
19765
|
|
|
19288
19766
|
// lib/models/spacer/mesh.ts
|
|
19289
19767
|
function createSpacerMesh(input) {
|
|
@@ -19302,7 +19780,7 @@ function createSpacerGeom(input) {
|
|
|
19302
19780
|
return indexedMeshToGeom3(createSpacerMesh(input));
|
|
19303
19781
|
}
|
|
19304
19782
|
function Spacer({ color = "#a18450", ...props }) {
|
|
19305
|
-
return /* @__PURE__ */ jsx97(Colorize48, { color, children: /* @__PURE__ */ jsx97(
|
|
19783
|
+
return /* @__PURE__ */ jsx97(Colorize48, { color, children: /* @__PURE__ */ jsx97(Custom39, { geometry: createSpacerGeom(props) }) });
|
|
19306
19784
|
}
|
|
19307
19785
|
|
|
19308
19786
|
// lib/models/spacer/register.tsx
|
|
@@ -19318,7 +19796,7 @@ function register95(registry2) {
|
|
|
19318
19796
|
}
|
|
19319
19797
|
|
|
19320
19798
|
// lib/models/splitgrommet/SplitGrommet.tsx
|
|
19321
|
-
import { Colorize as Colorize49, Custom as
|
|
19799
|
+
import { Colorize as Colorize49, Custom as Custom40 } from "jscad-fiber";
|
|
19322
19800
|
|
|
19323
19801
|
// lib/models/splitgrommet/geometry.ts
|
|
19324
19802
|
import earcut6 from "earcut";
|
|
@@ -19396,7 +19874,7 @@ function SplitGrommet({
|
|
|
19396
19874
|
color = "#394553",
|
|
19397
19875
|
...props
|
|
19398
19876
|
}) {
|
|
19399
|
-
return /* @__PURE__ */ jsx99(Colorize49, { color, children: /* @__PURE__ */ jsx99(
|
|
19877
|
+
return /* @__PURE__ */ jsx99(Colorize49, { color, children: /* @__PURE__ */ jsx99(Custom40, { geometry: createSplitGrommetGeom(props) }) });
|
|
19400
19878
|
}
|
|
19401
19879
|
|
|
19402
19880
|
// lib/models/splitgrommet/register.tsx
|
|
@@ -19412,7 +19890,7 @@ function register96(registry2) {
|
|
|
19412
19890
|
}
|
|
19413
19891
|
|
|
19414
19892
|
// lib/models/splitwasher/SplitWasher.tsx
|
|
19415
|
-
import { Colorize as Colorize50, Custom as
|
|
19893
|
+
import { Colorize as Colorize50, Custom as Custom41 } from "jscad-fiber";
|
|
19416
19894
|
|
|
19417
19895
|
// lib/models/splitwasher/mesh.ts
|
|
19418
19896
|
function createSplitWasherMesh(input, options = {}) {
|
|
@@ -19471,7 +19949,7 @@ function createSplitWasherGeom(input) {
|
|
|
19471
19949
|
return indexedMeshToGeom3(createSplitWasherMesh(input));
|
|
19472
19950
|
}
|
|
19473
19951
|
function SplitWasher({ color = "#929ba6", ...props }) {
|
|
19474
|
-
return /* @__PURE__ */ jsx101(Colorize50, { color, children: /* @__PURE__ */ jsx101(
|
|
19952
|
+
return /* @__PURE__ */ jsx101(Colorize50, { color, children: /* @__PURE__ */ jsx101(Custom41, { geometry: createSplitWasherGeom(props) }) });
|
|
19475
19953
|
}
|
|
19476
19954
|
|
|
19477
19955
|
// lib/models/splitwasher/register.tsx
|
|
@@ -19487,13 +19965,13 @@ function register97(registry2) {
|
|
|
19487
19965
|
}
|
|
19488
19966
|
|
|
19489
19967
|
// lib/SpurGear.tsx
|
|
19490
|
-
import { Colorize as Colorize51, Custom as
|
|
19968
|
+
import { Colorize as Colorize51, Custom as Custom42 } from "jscad-fiber";
|
|
19491
19969
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
19492
19970
|
function createSpurGearGeom(input) {
|
|
19493
19971
|
return indexedMeshToGeom3(createSpurGearMesh(input));
|
|
19494
19972
|
}
|
|
19495
19973
|
function SpurGear({ color = "#737e8f", ...props }) {
|
|
19496
|
-
return /* @__PURE__ */ jsx103(Colorize51, { color, children: /* @__PURE__ */ jsx103(
|
|
19974
|
+
return /* @__PURE__ */ jsx103(Colorize51, { color, children: /* @__PURE__ */ jsx103(Custom42, { geometry: createSpurGearGeom(props) }) });
|
|
19497
19975
|
}
|
|
19498
19976
|
|
|
19499
19977
|
// lib/models/spurgear/register.tsx
|
|
@@ -19509,7 +19987,7 @@ function register98(registry2) {
|
|
|
19509
19987
|
}
|
|
19510
19988
|
|
|
19511
19989
|
// lib/models/threadedrod/ThreadedRod.tsx
|
|
19512
|
-
import { Colorize as Colorize52, Custom as
|
|
19990
|
+
import { Colorize as Colorize52, Custom as Custom43 } from "jscad-fiber";
|
|
19513
19991
|
|
|
19514
19992
|
// lib/models/threadedrod/mesh.ts
|
|
19515
19993
|
function resolution6(options) {
|
|
@@ -19595,7 +20073,7 @@ function createThreadedRodGeom(input, resolution7) {
|
|
|
19595
20073
|
return indexedMeshToGeom3(createThreadedRodMesh(input, resolution7));
|
|
19596
20074
|
}
|
|
19597
20075
|
function ThreadedRod({ color = "#737e8f", ...props }) {
|
|
19598
|
-
return /* @__PURE__ */ jsx105(Colorize52, { color, children: /* @__PURE__ */ jsx105(
|
|
20076
|
+
return /* @__PURE__ */ jsx105(Colorize52, { color, children: /* @__PURE__ */ jsx105(Custom43, { geometry: createThreadedRodGeom(props) }) });
|
|
19599
20077
|
}
|
|
19600
20078
|
|
|
19601
20079
|
// lib/models/threadedrod/register.tsx
|
|
@@ -19611,7 +20089,7 @@ function register99(registry2) {
|
|
|
19611
20089
|
}
|
|
19612
20090
|
|
|
19613
20091
|
// lib/models/torsionspring/TorsionSpring.tsx
|
|
19614
|
-
import { Colorize as Colorize53, Custom as
|
|
20092
|
+
import { Colorize as Colorize53, Custom as Custom44 } from "jscad-fiber";
|
|
19615
20093
|
|
|
19616
20094
|
// lib/models/torsionspring/mesh.ts
|
|
19617
20095
|
function createTorsionSpringMesh(input, options = {}) {
|
|
@@ -19696,7 +20174,7 @@ function TorsionSpring({
|
|
|
19696
20174
|
color = "#929ba6",
|
|
19697
20175
|
...props
|
|
19698
20176
|
}) {
|
|
19699
|
-
return /* @__PURE__ */ jsx107(Colorize53, { color, children: /* @__PURE__ */ jsx107(
|
|
20177
|
+
return /* @__PURE__ */ jsx107(Colorize53, { color, children: /* @__PURE__ */ jsx107(Custom44, { geometry: createTorsionSpringGeom(props) }) });
|
|
19700
20178
|
}
|
|
19701
20179
|
|
|
19702
20180
|
// lib/models/torsionspring/register.tsx
|
|
@@ -19712,10 +20190,10 @@ function register100(registry2) {
|
|
|
19712
20190
|
}
|
|
19713
20191
|
|
|
19714
20192
|
// lib/models/tslotcoverstrip/TSlotCoverStrip.tsx
|
|
19715
|
-
import { Colorize as Colorize54, Custom as
|
|
20193
|
+
import { Colorize as Colorize54, Custom as Custom45 } from "jscad-fiber";
|
|
19716
20194
|
|
|
19717
20195
|
// lib/models/tslotcoverstrip/geometry.ts
|
|
19718
|
-
import
|
|
20196
|
+
import jscad19 from "@jscad/modeling";
|
|
19719
20197
|
var {
|
|
19720
20198
|
primitives: primitives8,
|
|
19721
20199
|
extrusions: extrusions8,
|
|
@@ -19723,8 +20201,8 @@ var {
|
|
|
19723
20201
|
geometries: geometries8,
|
|
19724
20202
|
modifiers: modifiers7,
|
|
19725
20203
|
measurements: measurements8
|
|
19726
|
-
} =
|
|
19727
|
-
var
|
|
20204
|
+
} = jscad19;
|
|
20205
|
+
var generalize7 = modifiers7.generalize;
|
|
19728
20206
|
function createTSlotCoverStripGeom(input) {
|
|
19729
20207
|
const p = tSlotCoverStripModelPropsSchema.parse(input);
|
|
19730
20208
|
const w = p.width / 2;
|
|
@@ -19751,7 +20229,7 @@ function createTSlotCoverStripGeom(input) {
|
|
|
19751
20229
|
return extrusions8.extrudeLinear({ height: p.length }, outline);
|
|
19752
20230
|
}
|
|
19753
20231
|
function createTSlotCoverStripMesh(input) {
|
|
19754
|
-
const geom =
|
|
20232
|
+
const geom = generalize7(
|
|
19755
20233
|
{ snap: false, triangulate: true },
|
|
19756
20234
|
createTSlotCoverStripGeom(input)
|
|
19757
20235
|
);
|
|
@@ -19791,7 +20269,7 @@ function TSlotCoverStrip({
|
|
|
19791
20269
|
color = "#465564",
|
|
19792
20270
|
...props
|
|
19793
20271
|
}) {
|
|
19794
|
-
return /* @__PURE__ */ jsx109(Colorize54, { color, children: /* @__PURE__ */ jsx109(
|
|
20272
|
+
return /* @__PURE__ */ jsx109(Colorize54, { color, children: /* @__PURE__ */ jsx109(Custom45, { geometry: createTSlotCoverStripGeom(props) }) });
|
|
19795
20273
|
}
|
|
19796
20274
|
|
|
19797
20275
|
// lib/models/tslotcoverstrip/register.tsx
|
|
@@ -19807,7 +20285,7 @@ function register101(registry2) {
|
|
|
19807
20285
|
}
|
|
19808
20286
|
|
|
19809
20287
|
// lib/models/tslotextrusion/TSlotExtrusion.tsx
|
|
19810
|
-
import { Colorize as Colorize55, Custom as
|
|
20288
|
+
import { Colorize as Colorize55, Custom as Custom46 } from "jscad-fiber";
|
|
19811
20289
|
|
|
19812
20290
|
// lib/models/tslotextrusion/mesh.ts
|
|
19813
20291
|
function createTSlotExtrusionMesh(input = {}) {
|
|
@@ -19862,7 +20340,7 @@ function TSlotExtrusion({
|
|
|
19862
20340
|
color = "#8995a3",
|
|
19863
20341
|
...props
|
|
19864
20342
|
}) {
|
|
19865
|
-
return /* @__PURE__ */ jsx111(Colorize55, { color, children: /* @__PURE__ */ jsx111(
|
|
20343
|
+
return /* @__PURE__ */ jsx111(Colorize55, { color, children: /* @__PURE__ */ jsx111(Custom46, { geometry: createTSlotExtrusionGeom(props) }) });
|
|
19866
20344
|
}
|
|
19867
20345
|
|
|
19868
20346
|
// lib/models/tslotextrusion/register.tsx
|
|
@@ -19878,7 +20356,7 @@ function register102(registry2) {
|
|
|
19878
20356
|
}
|
|
19879
20357
|
|
|
19880
20358
|
// lib/models/tslotgusset/TSlotGusset.tsx
|
|
19881
|
-
import { Colorize as Colorize56, Custom as
|
|
20359
|
+
import { Colorize as Colorize56, Custom as Custom47 } from "jscad-fiber";
|
|
19882
20360
|
|
|
19883
20361
|
// lib/models/tslotgusset/mesh.ts
|
|
19884
20362
|
function createTSlotGussetMesh(input = {}) {
|
|
@@ -19920,7 +20398,7 @@ function createTSlotGussetGeom(input = {}) {
|
|
|
19920
20398
|
return indexedMeshToGeom3(createTSlotGussetMesh(input));
|
|
19921
20399
|
}
|
|
19922
20400
|
function TSlotGusset({ color = "#8995a3", ...props }) {
|
|
19923
|
-
return /* @__PURE__ */ jsx113(Colorize56, { color, children: /* @__PURE__ */ jsx113(
|
|
20401
|
+
return /* @__PURE__ */ jsx113(Colorize56, { color, children: /* @__PURE__ */ jsx113(Custom47, { geometry: createTSlotGussetGeom(props) }) });
|
|
19924
20402
|
}
|
|
19925
20403
|
|
|
19926
20404
|
// lib/models/tslotgusset/register.tsx
|
|
@@ -19936,7 +20414,7 @@ function register103(registry2) {
|
|
|
19936
20414
|
}
|
|
19937
20415
|
|
|
19938
20416
|
// lib/models/tslotinsidecorner/TSlotInsideCorner.tsx
|
|
19939
|
-
import { Colorize as Colorize57, Custom as
|
|
20417
|
+
import { Colorize as Colorize57, Custom as Custom48 } from "jscad-fiber";
|
|
19940
20418
|
|
|
19941
20419
|
// lib/models/tslotinsidecorner/mesh.ts
|
|
19942
20420
|
function createTSlotInsideCornerMesh(input = {}) {
|
|
@@ -20006,7 +20484,7 @@ function TSlotInsideCorner({
|
|
|
20006
20484
|
color = "#8995a3",
|
|
20007
20485
|
...props
|
|
20008
20486
|
}) {
|
|
20009
|
-
return /* @__PURE__ */ jsx115(Colorize57, { color, children: /* @__PURE__ */ jsx115(
|
|
20487
|
+
return /* @__PURE__ */ jsx115(Colorize57, { color, children: /* @__PURE__ */ jsx115(Custom48, { geometry: createTSlotInsideCornerGeom(props) }) });
|
|
20010
20488
|
}
|
|
20011
20489
|
|
|
20012
20490
|
// lib/models/tslotinsidecorner/register.tsx
|
|
@@ -20022,13 +20500,13 @@ function register104(registry2) {
|
|
|
20022
20500
|
}
|
|
20023
20501
|
|
|
20024
20502
|
// lib/models/ufl/Ufl.tsx
|
|
20025
|
-
import { Colorize as Colorize58, Custom as
|
|
20503
|
+
import { Colorize as Colorize58, Custom as Custom49 } from "jscad-fiber";
|
|
20026
20504
|
|
|
20027
20505
|
// lib/models/ufl/geometry.ts
|
|
20028
|
-
import
|
|
20506
|
+
import jscad20 from "@jscad/modeling";
|
|
20029
20507
|
function createUflGeometries(input = {}) {
|
|
20030
20508
|
const d = getUflDimensions(input);
|
|
20031
|
-
const { booleans: booleans5, primitives: primitives9 } =
|
|
20509
|
+
const { booleans: booleans5, primitives: primitives9 } = jscad20;
|
|
20032
20510
|
const silver = "#bcbfc3";
|
|
20033
20511
|
const dielectric = "#eee9d5";
|
|
20034
20512
|
const gold = "#d9b45b";
|
|
@@ -20121,7 +20599,7 @@ function createUflGeometries(input = {}) {
|
|
|
20121
20599
|
// lib/models/ufl/Ufl.tsx
|
|
20122
20600
|
import { Fragment as Fragment19, jsx as jsx117 } from "react/jsx-runtime";
|
|
20123
20601
|
function Ufl(props) {
|
|
20124
|
-
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)) });
|
|
20125
20603
|
}
|
|
20126
20604
|
|
|
20127
20605
|
// lib/models/ufl/register.tsx
|
|
@@ -20137,7 +20615,7 @@ function register105(registry2) {
|
|
|
20137
20615
|
}
|
|
20138
20616
|
|
|
20139
20617
|
// lib/WormGear.tsx
|
|
20140
|
-
import { Colorize as Colorize59, Custom as
|
|
20618
|
+
import { Colorize as Colorize59, Custom as Custom50 } from "jscad-fiber";
|
|
20141
20619
|
|
|
20142
20620
|
// lib/mechanical/worm-gear-mesh.ts
|
|
20143
20621
|
import earcut7 from "earcut";
|
|
@@ -20190,17 +20668,17 @@ var createWormGearMesh = (input) => {
|
|
|
20190
20668
|
fractions.push(fraction);
|
|
20191
20669
|
}
|
|
20192
20670
|
}
|
|
20193
|
-
const
|
|
20671
|
+
const profile5 = [];
|
|
20194
20672
|
for (let start = 0; start < props.starts; start++) {
|
|
20195
20673
|
for (const fraction of fractions) {
|
|
20196
20674
|
const distance2 = Math.min(fraction, 1 - fraction) * axialPitch;
|
|
20197
|
-
|
|
20675
|
+
profile5.push({
|
|
20198
20676
|
angle: (start + fraction) * Math.PI * 2 / props.starts,
|
|
20199
20677
|
radius: distance2 <= tipHalfWidth ? outsideRadius : distance2 >= rootHalfWidth ? rootRadius : pitchRadius + (toothThickness / 2 - distance2) / pressureTangent
|
|
20200
20678
|
});
|
|
20201
20679
|
}
|
|
20202
20680
|
}
|
|
20203
|
-
const count =
|
|
20681
|
+
const count = profile5.length;
|
|
20204
20682
|
const positions = [];
|
|
20205
20683
|
const indices = [];
|
|
20206
20684
|
const phase = props.phase % 360 * Math.PI / 180;
|
|
@@ -20208,7 +20686,7 @@ var createWormGearMesh = (input) => {
|
|
|
20208
20686
|
const ring = (z) => {
|
|
20209
20687
|
const first = positions.length / 3;
|
|
20210
20688
|
const rotation = phase + direction * (z / lead) * Math.PI * 2;
|
|
20211
|
-
for (const sample of
|
|
20689
|
+
for (const sample of profile5) {
|
|
20212
20690
|
const angle = sample.angle + rotation;
|
|
20213
20691
|
positions.push(
|
|
20214
20692
|
sample.radius * Math.cos(angle),
|
|
@@ -20318,7 +20796,7 @@ function createWormGearGeom(input) {
|
|
|
20318
20796
|
return indexedMeshToGeom3(createWormGearMesh(input));
|
|
20319
20797
|
}
|
|
20320
20798
|
function WormGear({ color = "#737e8f", ...props }) {
|
|
20321
|
-
return /* @__PURE__ */ jsx119(Colorize59, { color, children: /* @__PURE__ */ jsx119(
|
|
20799
|
+
return /* @__PURE__ */ jsx119(Colorize59, { color, children: /* @__PURE__ */ jsx119(Custom50, { geometry: createWormGearGeom(props) }) });
|
|
20322
20800
|
}
|
|
20323
20801
|
|
|
20324
20802
|
// lib/models/wormgear/register.tsx
|
|
@@ -20334,7 +20812,7 @@ function register106(registry2) {
|
|
|
20334
20812
|
}
|
|
20335
20813
|
|
|
20336
20814
|
// lib/models/zeebar/ZeeBar.tsx
|
|
20337
|
-
import { Colorize as Colorize60, Custom as
|
|
20815
|
+
import { Colorize as Colorize60, Custom as Custom51 } from "jscad-fiber";
|
|
20338
20816
|
|
|
20339
20817
|
// lib/models/zeebar/mesh.ts
|
|
20340
20818
|
function filletedOutline2(points, radii) {
|
|
@@ -20401,7 +20879,7 @@ function createZeeBarGeom(input) {
|
|
|
20401
20879
|
return indexedMeshToGeom3(createZeeBarMesh(input));
|
|
20402
20880
|
}
|
|
20403
20881
|
function ZeeBar({ color = "#8995a3", ...props }) {
|
|
20404
|
-
return /* @__PURE__ */ jsx121(Colorize60, { color, children: /* @__PURE__ */ jsx121(
|
|
20882
|
+
return /* @__PURE__ */ jsx121(Colorize60, { color, children: /* @__PURE__ */ jsx121(Custom51, { geometry: createZeeBarGeom(props) }) });
|
|
20405
20883
|
}
|
|
20406
20884
|
|
|
20407
20885
|
// lib/models/zeebar/register.tsx
|
|
@@ -20478,7 +20956,7 @@ var modelRendererRegistry = new ModelRendererRegistry();
|
|
|
20478
20956
|
registerAllModelRenderers(modelRendererRegistry);
|
|
20479
20957
|
|
|
20480
20958
|
// lib/ExtrudedPads.tsx
|
|
20481
|
-
import { Fragment as Fragment20, jsx as jsx123, jsxs as
|
|
20959
|
+
import { Fragment as Fragment20, jsx as jsx123, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
20482
20960
|
var ExtrudedPads = ({
|
|
20483
20961
|
circuitJson,
|
|
20484
20962
|
footprint
|
|
@@ -20494,7 +20972,7 @@ var ExtrudedPads = ({
|
|
|
20494
20972
|
}
|
|
20495
20973
|
if (!circuitJson)
|
|
20496
20974
|
throw new Error("No circuit json or footprint provided to ExtrudedPads");
|
|
20497
|
-
return /* @__PURE__ */
|
|
20975
|
+
return /* @__PURE__ */ jsxs20(Fragment20, { children: [
|
|
20498
20976
|
circuitJson.filter((s) => s.type === "pcb_smtpad").map((pad, i) => {
|
|
20499
20977
|
const isPin1 = pad.port_hints?.includes("1");
|
|
20500
20978
|
return (
|
|
@@ -20518,11 +20996,11 @@ import {
|
|
|
20518
20996
|
Cuboid as Cuboid17,
|
|
20519
20997
|
Cylinder as Cylinder6,
|
|
20520
20998
|
Hull as Hull5,
|
|
20521
|
-
Subtract as
|
|
20999
|
+
Subtract as Subtract6,
|
|
20522
21000
|
Translate as Translate9,
|
|
20523
21001
|
Union as Union3
|
|
20524
21002
|
} from "jscad-fiber";
|
|
20525
|
-
import { Fragment as Fragment21, jsx as jsx124, jsxs as
|
|
21003
|
+
import { Fragment as Fragment21, jsx as jsx124, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
20526
21004
|
function createDualRowGullWing(p) {
|
|
20527
21005
|
const {
|
|
20528
21006
|
pinCount,
|
|
@@ -20570,7 +21048,7 @@ function createDualRowGullWing(p) {
|
|
|
20570
21048
|
throw new Error("Exposed pad must fit inside the bottom mold face");
|
|
20571
21049
|
const midZ = standoff + moldHeight / 2;
|
|
20572
21050
|
const slice = Math.min(2e-3, moldHeight / 100);
|
|
20573
|
-
const body = /* @__PURE__ */
|
|
21051
|
+
const body = /* @__PURE__ */ jsxs21(Hull5, { children: [
|
|
20574
21052
|
/* @__PURE__ */ jsx124(Translate9, { z: standoff + slice / 2, children: /* @__PURE__ */ jsx124(
|
|
20575
21053
|
Cuboid17,
|
|
20576
21054
|
{
|
|
@@ -20613,13 +21091,13 @@ function createDualRowGullWing(p) {
|
|
|
20613
21091
|
}
|
|
20614
21092
|
points.push([root, midZ]);
|
|
20615
21093
|
const section = ([x, z]) => /* @__PURE__ */ jsx124(Translate9, { offset: { x: side * x, y, z }, children: /* @__PURE__ */ jsx124(Cuboid17, { size: [slice, leadWidth, leadThickness] }) });
|
|
20616
|
-
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: [
|
|
20617
21095
|
section(points[i]),
|
|
20618
21096
|
section(point)
|
|
20619
21097
|
] }, i)) });
|
|
20620
21098
|
};
|
|
20621
|
-
return /* @__PURE__ */
|
|
20622
|
-
/* @__PURE__ */ jsx124(Colorize61, { color: "#353535", children: /* @__PURE__ */
|
|
21099
|
+
return /* @__PURE__ */ jsxs21(Fragment21, { children: [
|
|
21100
|
+
/* @__PURE__ */ jsx124(Colorize61, { color: "#353535", children: /* @__PURE__ */ jsxs21(Subtract6, { children: [
|
|
20623
21101
|
body,
|
|
20624
21102
|
/* @__PURE__ */ jsx124(
|
|
20625
21103
|
Translate9,
|
|
@@ -20727,7 +21205,7 @@ import { fp as fp10 } from "@tscircuit/footprinter";
|
|
|
20727
21205
|
import { Rotate as Rotate24, Translate as Translate46 } from "jscad-fiber";
|
|
20728
21206
|
|
|
20729
21207
|
// lib/DualInlinePackage.tsx
|
|
20730
|
-
import { Polygon as
|
|
21208
|
+
import { Polygon as Polygon4, ExtrudeLinear as ExtrudeLinear4, Rotate as Rotate5, Translate as Translate10 } from "jscad-fiber";
|
|
20731
21209
|
|
|
20732
21210
|
// lib/utils/range.ts
|
|
20733
21211
|
var range = (end) => Array.from({ length: end }, (_, i) => i);
|
|
@@ -20792,7 +21270,7 @@ function getExpandedStroke(strokeInput, width10) {
|
|
|
20792
21270
|
}
|
|
20793
21271
|
|
|
20794
21272
|
// lib/DualInlinePackage.tsx
|
|
20795
|
-
import { Fragment as Fragment22, jsx as jsx126, jsxs as
|
|
21273
|
+
import { Fragment as Fragment22, jsx as jsx126, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
20796
21274
|
var normalizeOnY = (points) => {
|
|
20797
21275
|
const minX = Math.min(...points.map((p) => p.x));
|
|
20798
21276
|
const maxX = Math.max(...points.map((p) => p.x));
|
|
@@ -20821,14 +21299,14 @@ var DIP_PIN_HEIGHT = 5.47;
|
|
|
20821
21299
|
var heightAboveSurface = 0.5;
|
|
20822
21300
|
var DipPinLeg = ({ x, y, z }) => {
|
|
20823
21301
|
const isRotated = x > 0;
|
|
20824
|
-
return /* @__PURE__ */
|
|
21302
|
+
return /* @__PURE__ */ jsxs22(Fragment22, { children: [
|
|
20825
21303
|
/* @__PURE__ */ jsx126(
|
|
20826
21304
|
Translate10,
|
|
20827
21305
|
{
|
|
20828
21306
|
material: componentMaterials.tinnedLead,
|
|
20829
21307
|
offset: { x: x + 0.25 / 2, y, z },
|
|
20830
|
-
children: /* @__PURE__ */ jsx126(Rotate5, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx126(
|
|
20831
|
-
|
|
21308
|
+
children: /* @__PURE__ */ jsx126(Rotate5, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx126(ExtrudeLinear4, { height: 0.25, children: /* @__PURE__ */ jsx126(
|
|
21309
|
+
Polygon4,
|
|
20832
21310
|
{
|
|
20833
21311
|
points: svgPathPoints.slice().reverse().map((p) => [p.x, p.y])
|
|
20834
21312
|
}
|
|
@@ -20843,8 +21321,8 @@ var DipPinLeg = ({ x, y, z }) => {
|
|
|
20843
21321
|
y: y + (isRotated ? 1 : -1),
|
|
20844
21322
|
z
|
|
20845
21323
|
},
|
|
20846
|
-
children: /* @__PURE__ */ jsx126(Rotate5, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ jsx126(
|
|
20847
|
-
|
|
21324
|
+
children: /* @__PURE__ */ jsx126(Rotate5, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ jsx126(ExtrudeLinear4, { height: 2, children: /* @__PURE__ */ jsx126(
|
|
21325
|
+
Polygon4,
|
|
20848
21326
|
{
|
|
20849
21327
|
points: getExpandedStroke(
|
|
20850
21328
|
[
|
|
@@ -20869,7 +21347,7 @@ var Dip = ({
|
|
|
20869
21347
|
const numPinsOnEachSide = Math.floor(numPins / 2);
|
|
20870
21348
|
const pinRowSpacing = rowSpacing ?? (bodyWidth >= 7 ? bodyWidth : bodyWidth + 1.22);
|
|
20871
21349
|
const chipBodyWidth = bodyWidth >= 7 ? pinRowSpacing - 1.22 : bodyWidth;
|
|
20872
|
-
return /* @__PURE__ */
|
|
21350
|
+
return /* @__PURE__ */ jsxs22(Fragment22, { children: [
|
|
20873
21351
|
range(numPins).map((i) => {
|
|
20874
21352
|
const yRow = i % numPinsOnEachSide;
|
|
20875
21353
|
const xRow = (Math.floor(i / numPinsOnEachSide) - 0.5) * 2;
|
|
@@ -20898,8 +21376,8 @@ var Dip = ({
|
|
|
20898
21376
|
|
|
20899
21377
|
// lib/SmdChipLead.tsx
|
|
20900
21378
|
import {
|
|
20901
|
-
Polygon as
|
|
20902
|
-
ExtrudeLinear as
|
|
21379
|
+
Polygon as Polygon5,
|
|
21380
|
+
ExtrudeLinear as ExtrudeLinear5,
|
|
20903
21381
|
Translate as Translate11,
|
|
20904
21382
|
Rotate as Rotate6,
|
|
20905
21383
|
Colorize as Colorize62
|
|
@@ -20930,11 +21408,11 @@ var SmdChipLead = (props) => {
|
|
|
20930
21408
|
const N = 15;
|
|
20931
21409
|
const points = Array.from({ length: N }).map((_, i) => i / (N - 1) * bodyDistance).map((x) => [x, calculateSCurve(x, props)]);
|
|
20932
21410
|
const polygon4 = getExpandedStroke(points, thickness);
|
|
20933
|
-
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]) }) }) }) }) }) });
|
|
20934
21412
|
};
|
|
20935
21413
|
|
|
20936
21414
|
// lib/Tssop.tsx
|
|
20937
|
-
import { Fragment as Fragment23, jsx as jsx128, jsxs as
|
|
21415
|
+
import { Fragment as Fragment23, jsx as jsx128, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
20938
21416
|
var LegacyTssop = ({
|
|
20939
21417
|
pinCount,
|
|
20940
21418
|
leadLength,
|
|
@@ -20960,7 +21438,7 @@ var LegacyTssop = ({
|
|
|
20960
21438
|
Math.min(bodyVisualWidth, bodyLength10) * 0.12,
|
|
20961
21439
|
0.45
|
|
20962
21440
|
);
|
|
20963
|
-
return /* @__PURE__ */
|
|
21441
|
+
return /* @__PURE__ */ jsxs23(Fragment23, { children: [
|
|
20964
21442
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx128(
|
|
20965
21443
|
SmdChipLead,
|
|
20966
21444
|
{
|
|
@@ -21016,7 +21494,7 @@ var LegacyTssop = ({
|
|
|
21016
21494
|
var Tssop = (props) => "leadSpan" in props ? createDualRowGullWing(props) : LegacyTssop(props);
|
|
21017
21495
|
|
|
21018
21496
|
// lib/MSOP.tsx
|
|
21019
|
-
import { Fragment as Fragment24, jsx as jsx129, jsxs as
|
|
21497
|
+
import { Fragment as Fragment24, jsx as jsx129, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
21020
21498
|
var LegacyMSOP = ({
|
|
21021
21499
|
pinCount,
|
|
21022
21500
|
padContactLength = 0.4,
|
|
@@ -21027,7 +21505,7 @@ var LegacyMSOP = ({
|
|
|
21027
21505
|
const sidePinCount = Math.ceil(pinCount / 2);
|
|
21028
21506
|
const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
|
|
21029
21507
|
const leadThickness = 0.2;
|
|
21030
|
-
return /* @__PURE__ */
|
|
21508
|
+
return /* @__PURE__ */ jsxs24(Fragment24, { children: [
|
|
21031
21509
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx129(
|
|
21032
21510
|
SmdChipLead,
|
|
21033
21511
|
{
|
|
@@ -21079,7 +21557,7 @@ var MSOP = (props) => "leadSpan" in props ? createDualRowGullWing(props) : Legac
|
|
|
21079
21557
|
|
|
21080
21558
|
// lib/SmdLED.tsx
|
|
21081
21559
|
import { Colorize as Colorize63, Cuboid as Cuboid18, RoundedCuboid as RoundedCuboid2, Translate as Translate12 } from "jscad-fiber";
|
|
21082
|
-
import { Fragment as Fragment25, jsx as jsx130, jsxs as
|
|
21560
|
+
import { Fragment as Fragment25, jsx as jsx130, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
21083
21561
|
var smdLedDimensions = {
|
|
21084
21562
|
"0402": { length: 1, width: 0.5, height: 0.5, terminalLength: 0.2 },
|
|
21085
21563
|
"0603": { length: 1.62, width: 0.8, height: 0.615, terminalLength: 0.21 },
|
|
@@ -21091,7 +21569,7 @@ function SmdLED({
|
|
|
21091
21569
|
}) {
|
|
21092
21570
|
const p = smdLedDimensions[footprint];
|
|
21093
21571
|
if (footprint === "0603")
|
|
21094
|
-
return /* @__PURE__ */
|
|
21572
|
+
return /* @__PURE__ */ jsxs25(Fragment25, { children: [
|
|
21095
21573
|
/* @__PURE__ */ jsx130(Colorize63, { color: "#f0eee7", children: /* @__PURE__ */ jsx130(
|
|
21096
21574
|
RoundedCuboid2,
|
|
21097
21575
|
{
|
|
@@ -21112,7 +21590,7 @@ function SmdLED({
|
|
|
21112
21590
|
] });
|
|
21113
21591
|
const terminalThickness = Math.min(0.1, p.height / 4);
|
|
21114
21592
|
const apertureHeight = 0.02;
|
|
21115
|
-
return /* @__PURE__ */
|
|
21593
|
+
return /* @__PURE__ */ jsxs25(Fragment25, { children: [
|
|
21116
21594
|
/* @__PURE__ */ jsx130(Colorize63, { color: "#f0eee7", children: /* @__PURE__ */ jsx130(Translate12, { z: (p.height + terminalThickness - apertureHeight) / 2, children: /* @__PURE__ */ jsx130(
|
|
21117
21595
|
Cuboid18,
|
|
21118
21596
|
{
|
|
@@ -21140,7 +21618,7 @@ function SmdLED({
|
|
|
21140
21618
|
}
|
|
21141
21619
|
|
|
21142
21620
|
// lib/qfp.tsx
|
|
21143
|
-
import { Fragment as Fragment26, jsx as jsx131, jsxs as
|
|
21621
|
+
import { Fragment as Fragment26, jsx as jsx131, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
21144
21622
|
var QFP = ({
|
|
21145
21623
|
pinCount,
|
|
21146
21624
|
pitch,
|
|
@@ -21164,7 +21642,7 @@ var QFP = ({
|
|
|
21164
21642
|
const bodyDistance = leadReach;
|
|
21165
21643
|
const fullPadContactLength = leadReach * 0.5;
|
|
21166
21644
|
const curveLength = leadReach * 0.18;
|
|
21167
|
-
return /* @__PURE__ */
|
|
21645
|
+
return /* @__PURE__ */ jsxs26(Fragment26, { children: [
|
|
21168
21646
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx131(
|
|
21169
21647
|
SmdChipLead,
|
|
21170
21648
|
{
|
|
@@ -21299,7 +21777,7 @@ var getLeadWidth = (pinCount, width10) => {
|
|
|
21299
21777
|
|
|
21300
21778
|
// lib/PinHeader.tsx
|
|
21301
21779
|
import { Colorize as Colorize64, Cuboid as Cuboid19, Hull as Hull6, Rotate as Rotate7, Translate as Translate13 } from "jscad-fiber";
|
|
21302
|
-
import { Fragment as Fragment27, jsx as jsx132, jsxs as
|
|
21780
|
+
import { Fragment as Fragment27, jsx as jsx132, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
21303
21781
|
var PIN_METAL_COLOR = "#c0c0c0";
|
|
21304
21782
|
var PinHeader = ({
|
|
21305
21783
|
x,
|
|
@@ -21314,7 +21792,7 @@ var PinHeader = ({
|
|
|
21314
21792
|
smd,
|
|
21315
21793
|
rightangle
|
|
21316
21794
|
}) => {
|
|
21317
|
-
return /* @__PURE__ */
|
|
21795
|
+
return /* @__PURE__ */ jsxs27(Fragment27, { children: [
|
|
21318
21796
|
/* @__PURE__ */ jsx132(Translate13, { y: rightangle ? -3 : 0, children: /* @__PURE__ */ jsx132(
|
|
21319
21797
|
Cuboid19,
|
|
21320
21798
|
{
|
|
@@ -21344,7 +21822,7 @@ var PinHeader = ({
|
|
|
21344
21822
|
padContactLength: 2,
|
|
21345
21823
|
bodyDistance: 3
|
|
21346
21824
|
}
|
|
21347
|
-
) : /* @__PURE__ */
|
|
21825
|
+
) : /* @__PURE__ */ jsxs27(Hull6, { children: [
|
|
21348
21826
|
/* @__PURE__ */ jsx132(
|
|
21349
21827
|
Cuboid19,
|
|
21350
21828
|
{
|
|
@@ -21373,7 +21851,7 @@ var PinHeader = ({
|
|
|
21373
21851
|
{
|
|
21374
21852
|
color: PIN_METAL_COLOR,
|
|
21375
21853
|
material: componentMaterials.goldContact,
|
|
21376
|
-
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: [
|
|
21377
21855
|
/* @__PURE__ */ jsx132(
|
|
21378
21856
|
Cuboid19,
|
|
21379
21857
|
{
|
|
@@ -21444,8 +21922,8 @@ var PinRow = ({
|
|
|
21444
21922
|
};
|
|
21445
21923
|
|
|
21446
21924
|
// lib/utils/PhysicalQfn.tsx
|
|
21447
|
-
import { Colorize as Colorize65, Cuboid as Cuboid20, Cylinder as Cylinder7, Subtract as
|
|
21448
|
-
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";
|
|
21449
21927
|
function createPhysicalQfn(p) {
|
|
21450
21928
|
const {
|
|
21451
21929
|
num_pins,
|
|
@@ -21490,8 +21968,8 @@ function createPhysicalQfn(p) {
|
|
|
21490
21968
|
);
|
|
21491
21969
|
const body = /* @__PURE__ */ jsx134(Translate14, { z: (bodyHeight + standoff) / 2, children: /* @__PURE__ */ jsx134(Cuboid20, { size: [bodyWidth, bodyLength10, bodyHeight - standoff] }) });
|
|
21492
21970
|
const radius = Math.min(bodyWidth, bodyLength10) * 0.035;
|
|
21493
|
-
return /* @__PURE__ */
|
|
21494
|
-
/* @__PURE__ */ jsx134(Colorize65, { color: "#353535", children: /* @__PURE__ */
|
|
21971
|
+
return /* @__PURE__ */ jsxs28(Fragment29, { children: [
|
|
21972
|
+
/* @__PURE__ */ jsx134(Colorize65, { color: "#353535", children: /* @__PURE__ */ jsxs28(Subtract7, { children: [
|
|
21495
21973
|
body,
|
|
21496
21974
|
/* @__PURE__ */ jsx134(
|
|
21497
21975
|
Translate14,
|
|
@@ -21635,7 +22113,7 @@ var getQuadPinMap = ({
|
|
|
21635
22113
|
};
|
|
21636
22114
|
|
|
21637
22115
|
// lib/qfn.tsx
|
|
21638
|
-
import { Fragment as Fragment30, jsx as jsx135, jsxs as
|
|
22116
|
+
import { Fragment as Fragment30, jsx as jsx135, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
21639
22117
|
var LegacyQFN = ({
|
|
21640
22118
|
num_pins = 16,
|
|
21641
22119
|
bodyWidth = 9,
|
|
@@ -21677,7 +22155,7 @@ var LegacyQFN = ({
|
|
|
21677
22155
|
const pn = pin_map[i + 1];
|
|
21678
22156
|
pinPositions.push({ pn, x, y, pw, pl });
|
|
21679
22157
|
}
|
|
21680
|
-
return /* @__PURE__ */
|
|
22158
|
+
return /* @__PURE__ */ jsxs29(Fragment30, { children: [
|
|
21681
22159
|
/* @__PURE__ */ jsx135(Colorize66, { material: componentMaterials.tinnedLead, color: "grey", children: /* @__PURE__ */ jsx135(
|
|
21682
22160
|
Cuboid21,
|
|
21683
22161
|
{
|
|
@@ -21710,7 +22188,7 @@ var QFN = (props) => "bodyHeight" in props ? createPhysicalQfn(props) : LegacyQF
|
|
|
21710
22188
|
var qfn_default = QFN;
|
|
21711
22189
|
|
|
21712
22190
|
// lib/SOT-235.tsx
|
|
21713
|
-
import { Fragment as Fragment31, jsx as jsx136, jsxs as
|
|
22191
|
+
import { Fragment as Fragment31, jsx as jsx136, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
21714
22192
|
var SOT235 = () => {
|
|
21715
22193
|
const fullWidth = 2.8;
|
|
21716
22194
|
const bodyWidth = 1.6;
|
|
@@ -21722,7 +22200,7 @@ var SOT235 = () => {
|
|
|
21722
22200
|
const padContactLength = 0.5;
|
|
21723
22201
|
const padPitch = 0.95;
|
|
21724
22202
|
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
21725
|
-
return /* @__PURE__ */
|
|
22203
|
+
return /* @__PURE__ */ jsxs30(Fragment31, { children: [
|
|
21726
22204
|
/* @__PURE__ */ jsx136(
|
|
21727
22205
|
SmdChipLead,
|
|
21728
22206
|
{
|
|
@@ -21819,7 +22297,7 @@ var SOT235 = () => {
|
|
|
21819
22297
|
var SOT_235_default = SOT235;
|
|
21820
22298
|
|
|
21821
22299
|
// lib/SOT-23-3P.tsx
|
|
21822
|
-
import { Fragment as Fragment32, jsx as jsx137, jsxs as
|
|
22300
|
+
import { Fragment as Fragment32, jsx as jsx137, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
21823
22301
|
var SOT233P = ({
|
|
21824
22302
|
fullWidth = 2.9,
|
|
21825
22303
|
fullLength: fullLength10 = 2.8,
|
|
@@ -21834,7 +22312,7 @@ var SOT233P = ({
|
|
|
21834
22312
|
const padContactLength = 0.4;
|
|
21835
22313
|
const padThickness = leadThickness / 2;
|
|
21836
22314
|
const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
|
|
21837
|
-
return /* @__PURE__ */
|
|
22315
|
+
return /* @__PURE__ */ jsxs31(Fragment32, { children: [
|
|
21838
22316
|
/* @__PURE__ */ jsx137(
|
|
21839
22317
|
SmdChipLead,
|
|
21840
22318
|
{
|
|
@@ -21898,7 +22376,7 @@ var SOT233P = ({
|
|
|
21898
22376
|
};
|
|
21899
22377
|
|
|
21900
22378
|
// lib/SOT-23W.tsx
|
|
21901
|
-
import { Fragment as Fragment33, jsx as jsx138, jsxs as
|
|
22379
|
+
import { Fragment as Fragment33, jsx as jsx138, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
21902
22380
|
var SOT23W = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
21903
22381
|
const bodyWidth = 1.92;
|
|
21904
22382
|
const bodyLength10 = 2.9;
|
|
@@ -21909,7 +22387,7 @@ var SOT23W = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
21909
22387
|
const padContactLength = 0.25;
|
|
21910
22388
|
const padThickness = leadThickness / 2;
|
|
21911
22389
|
const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
|
|
21912
|
-
return /* @__PURE__ */
|
|
22390
|
+
return /* @__PURE__ */ jsxs32(Fragment33, { children: [
|
|
21913
22391
|
/* @__PURE__ */ jsx138(
|
|
21914
22392
|
SmdChipLead,
|
|
21915
22393
|
{
|
|
@@ -21974,8 +22452,8 @@ var SOT23W = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
21974
22452
|
};
|
|
21975
22453
|
|
|
21976
22454
|
// lib/FemaleHeader.tsx
|
|
21977
|
-
import { Colorize as Colorize67, Cuboid as Cuboid22, Hull as Hull7, Subtract as
|
|
21978
|
-
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";
|
|
21979
22457
|
var FemaleHeader = ({
|
|
21980
22458
|
x,
|
|
21981
22459
|
y,
|
|
@@ -21997,8 +22475,8 @@ var FemaleHeader = ({
|
|
|
21997
22475
|
const socketCenterZ = flipZ(z + socketDepth / 2);
|
|
21998
22476
|
const socketEntryBaseZ = z + bodyHeight - socketEntryHeight;
|
|
21999
22477
|
const gapWidth = pinThickness * 1.6;
|
|
22000
|
-
return /* @__PURE__ */
|
|
22001
|
-
/* @__PURE__ */ jsx139(Colorize67, { color: "#1a1a1a", children: /* @__PURE__ */
|
|
22478
|
+
return /* @__PURE__ */ jsxs33(Fragment34, { children: [
|
|
22479
|
+
/* @__PURE__ */ jsx139(Colorize67, { color: "#1a1a1a", children: /* @__PURE__ */ jsxs33(Subtract8, { children: [
|
|
22002
22480
|
/* @__PURE__ */ jsx139(
|
|
22003
22481
|
Cuboid22,
|
|
22004
22482
|
{
|
|
@@ -22014,7 +22492,7 @@ var FemaleHeader = ({
|
|
|
22014
22492
|
center: [x, y, socketCenterZ]
|
|
22015
22493
|
}
|
|
22016
22494
|
),
|
|
22017
|
-
/* @__PURE__ */
|
|
22495
|
+
/* @__PURE__ */ jsxs33(Hull7, { children: [
|
|
22018
22496
|
/* @__PURE__ */ jsx139(
|
|
22019
22497
|
Cuboid22,
|
|
22020
22498
|
{
|
|
@@ -22031,8 +22509,8 @@ var FemaleHeader = ({
|
|
|
22031
22509
|
)
|
|
22032
22510
|
] })
|
|
22033
22511
|
] }) }),
|
|
22034
|
-
/* @__PURE__ */
|
|
22035
|
-
/* @__PURE__ */
|
|
22512
|
+
/* @__PURE__ */ jsxs33(Colorize67, { color: "silver", children: [
|
|
22513
|
+
/* @__PURE__ */ jsxs33(Hull7, { children: [
|
|
22036
22514
|
/* @__PURE__ */ jsx139(
|
|
22037
22515
|
Cuboid22,
|
|
22038
22516
|
{
|
|
@@ -22101,13 +22579,13 @@ var FemaleHeaderRow = ({
|
|
|
22101
22579
|
import {
|
|
22102
22580
|
Colorize as Colorize68,
|
|
22103
22581
|
Cylinder as Cylinder8,
|
|
22104
|
-
ExtrudeLinear as
|
|
22105
|
-
Polygon as
|
|
22582
|
+
ExtrudeLinear as ExtrudeLinear6,
|
|
22583
|
+
Polygon as Polygon6,
|
|
22106
22584
|
Rotate as Rotate8,
|
|
22107
22585
|
RoundedCuboid as RoundedCuboid3,
|
|
22108
22586
|
Translate as Translate15
|
|
22109
22587
|
} from "jscad-fiber";
|
|
22110
|
-
import { Fragment as Fragment36, jsx as jsx141, jsxs as
|
|
22588
|
+
import { Fragment as Fragment36, jsx as jsx141, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
22111
22589
|
var PushButton = ({
|
|
22112
22590
|
width: width10,
|
|
22113
22591
|
length: length32,
|
|
@@ -22117,7 +22595,7 @@ var PushButton = ({
|
|
|
22117
22595
|
const bodyLength10 = length32;
|
|
22118
22596
|
const bodyHeight = width10 * 0.7;
|
|
22119
22597
|
const legWidth = innerDiameter / 2.5;
|
|
22120
|
-
return /* @__PURE__ */
|
|
22598
|
+
return /* @__PURE__ */ jsxs34(Fragment36, { children: [
|
|
22121
22599
|
/* @__PURE__ */ jsx141(
|
|
22122
22600
|
RoundedCuboid3,
|
|
22123
22601
|
{
|
|
@@ -22277,13 +22755,13 @@ var PushButtonLeg = (props) => {
|
|
|
22277
22755
|
y: position?.y || 0,
|
|
22278
22756
|
z: position?.z || 0
|
|
22279
22757
|
},
|
|
22280
|
-
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]) }) }) })
|
|
22281
22759
|
}
|
|
22282
22760
|
) });
|
|
22283
22761
|
};
|
|
22284
22762
|
|
|
22285
22763
|
// lib/SOIC.tsx
|
|
22286
|
-
import { Fragment as Fragment37, jsx as jsx142, jsxs as
|
|
22764
|
+
import { Fragment as Fragment37, jsx as jsx142, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
22287
22765
|
var LegacySOIC = ({
|
|
22288
22766
|
pinCount,
|
|
22289
22767
|
leadLength,
|
|
@@ -22299,7 +22777,7 @@ var LegacySOIC = ({
|
|
|
22299
22777
|
const leadBodyOffset = leadLength * 0;
|
|
22300
22778
|
const fullLength10 = pitch * (sidePinCount - 1) + leadWidth + 0.2;
|
|
22301
22779
|
const bodyWidthAdjusted = bodyWidth * 0.55;
|
|
22302
|
-
return /* @__PURE__ */
|
|
22780
|
+
return /* @__PURE__ */ jsxs35(Fragment37, { children: [
|
|
22303
22781
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx142(
|
|
22304
22782
|
SmdChipLead,
|
|
22305
22783
|
{
|
|
@@ -22347,7 +22825,7 @@ var LegacySOIC = ({
|
|
|
22347
22825
|
var SOIC = (props) => "leadSpan" in props ? createDualRowGullWing(props) : LegacySOIC(props);
|
|
22348
22826
|
|
|
22349
22827
|
// lib/VSSOP.tsx
|
|
22350
|
-
import { Fragment as Fragment38, jsx as jsx143, jsxs as
|
|
22828
|
+
import { Fragment as Fragment38, jsx as jsx143, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
22351
22829
|
var VSSOP = ({
|
|
22352
22830
|
pinCount,
|
|
22353
22831
|
pitch,
|
|
@@ -22377,7 +22855,7 @@ var VSSOP = ({
|
|
|
22377
22855
|
const componentFullWidth = 4.5;
|
|
22378
22856
|
const leadBodyDistance = (componentFullWidth - _bodyWidth) / 2;
|
|
22379
22857
|
const padContactLength = leadBodyDistance * 0.5;
|
|
22380
|
-
return /* @__PURE__ */
|
|
22858
|
+
return /* @__PURE__ */ jsxs36(Fragment38, { children: [
|
|
22381
22859
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx143(
|
|
22382
22860
|
SmdChipLead,
|
|
22383
22861
|
{
|
|
@@ -22425,7 +22903,7 @@ var VSSOP = ({
|
|
|
22425
22903
|
|
|
22426
22904
|
// lib/SOD523.tsx
|
|
22427
22905
|
import { Colorize as Colorize69, Cuboid as Cuboid24, Hull as Hull8, Translate as Translate16, Union as Union5 } from "jscad-fiber";
|
|
22428
|
-
import { Fragment as Fragment39, jsx as jsx144, jsxs as
|
|
22906
|
+
import { Fragment as Fragment39, jsx as jsx144, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
22429
22907
|
var SOD523 = () => {
|
|
22430
22908
|
const fullWidth = 2.15;
|
|
22431
22909
|
const bodyLength10 = 0.8;
|
|
@@ -22438,7 +22916,7 @@ var SOD523 = () => {
|
|
|
22438
22916
|
const rightPadCenterX = bodyWidth / 2 - padLength / 2 + 0.15;
|
|
22439
22917
|
const taperOffset = 0.2;
|
|
22440
22918
|
const straightHeight = bodyHeight * 0.5;
|
|
22441
|
-
return /* @__PURE__ */
|
|
22919
|
+
return /* @__PURE__ */ jsxs37(Fragment39, { children: [
|
|
22442
22920
|
/* @__PURE__ */ jsx144(
|
|
22443
22921
|
Cuboid24,
|
|
22444
22922
|
{
|
|
@@ -22455,9 +22933,9 @@ var SOD523 = () => {
|
|
|
22455
22933
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
22456
22934
|
}
|
|
22457
22935
|
),
|
|
22458
|
-
/* @__PURE__ */ jsx144(Colorize69, { color: "#222", children: /* @__PURE__ */
|
|
22936
|
+
/* @__PURE__ */ jsx144(Colorize69, { color: "#222", children: /* @__PURE__ */ jsxs37(Union5, { children: [
|
|
22459
22937
|
/* @__PURE__ */ jsx144(Translate16, { z: straightHeight / 2, children: /* @__PURE__ */ jsx144(Cuboid24, { size: [bodyWidth, bodyLength10, straightHeight] }) }),
|
|
22460
|
-
/* @__PURE__ */
|
|
22938
|
+
/* @__PURE__ */ jsxs37(Hull8, { children: [
|
|
22461
22939
|
/* @__PURE__ */ jsx144(Translate16, { z: straightHeight, children: /* @__PURE__ */ jsx144(Cuboid24, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
22462
22940
|
/* @__PURE__ */ jsx144(Translate16, { z: bodyHeight, children: /* @__PURE__ */ jsx144(
|
|
22463
22941
|
Cuboid24,
|
|
@@ -22472,7 +22950,7 @@ var SOD523 = () => {
|
|
|
22472
22950
|
|
|
22473
22951
|
// lib/SOD882.tsx
|
|
22474
22952
|
import { Colorize as Colorize70, Cuboid as Cuboid25, Translate as Translate17 } from "jscad-fiber";
|
|
22475
|
-
import { Fragment as Fragment40, jsx as jsx145, jsxs as
|
|
22953
|
+
import { Fragment as Fragment40, jsx as jsx145, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
22476
22954
|
var SOD882 = () => {
|
|
22477
22955
|
const bodyLength10 = 0.98;
|
|
22478
22956
|
const bodyHeight = 0.47;
|
|
@@ -22483,7 +22961,7 @@ var SOD882 = () => {
|
|
|
22483
22961
|
const bodyWidth = 0.58;
|
|
22484
22962
|
const leftPadCenterX = -pitch / 2;
|
|
22485
22963
|
const rightPadCenterX = pitch / 2;
|
|
22486
|
-
return /* @__PURE__ */
|
|
22964
|
+
return /* @__PURE__ */ jsxs38(Fragment40, { children: [
|
|
22487
22965
|
/* @__PURE__ */ jsx145(
|
|
22488
22966
|
Cuboid25,
|
|
22489
22967
|
{
|
|
@@ -22538,7 +23016,7 @@ var SOD882 = () => {
|
|
|
22538
23016
|
|
|
22539
23017
|
// lib/SMA.tsx
|
|
22540
23018
|
import { Cuboid as Cuboid26, Colorize as Colorize71, Union as Union7, Hull as Hull10, Translate as Translate18 } from "jscad-fiber";
|
|
22541
|
-
import { Fragment as Fragment41, jsx as jsx146, jsxs as
|
|
23019
|
+
import { Fragment as Fragment41, jsx as jsx146, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
22542
23020
|
var SMA = () => {
|
|
22543
23021
|
const bodyWidth = 4.4;
|
|
22544
23022
|
const bodyLength10 = 3.4;
|
|
@@ -22549,8 +23027,8 @@ var SMA = () => {
|
|
|
22549
23027
|
const leadHeight = 1.14;
|
|
22550
23028
|
const taperOffset = 0.4;
|
|
22551
23029
|
const straightHeight = bodyHeight * 0.5;
|
|
22552
|
-
const Body = /* @__PURE__ */ jsx146(Colorize71, { color: "#1a1a1a", children: /* @__PURE__ */
|
|
22553
|
-
/* @__PURE__ */
|
|
23030
|
+
const Body = /* @__PURE__ */ jsx146(Colorize71, { color: "#1a1a1a", children: /* @__PURE__ */ jsxs39(Union7, { children: [
|
|
23031
|
+
/* @__PURE__ */ jsxs39(Hull10, { children: [
|
|
22554
23032
|
/* @__PURE__ */ jsx146(Translate18, { z: padThickness + 0.01, children: /* @__PURE__ */ jsx146(
|
|
22555
23033
|
Cuboid26,
|
|
22556
23034
|
{
|
|
@@ -22559,7 +23037,7 @@ var SMA = () => {
|
|
|
22559
23037
|
) }),
|
|
22560
23038
|
/* @__PURE__ */ jsx146(Translate18, { z: straightHeight, children: /* @__PURE__ */ jsx146(Cuboid26, { size: [bodyWidth, bodyLength10, 0.01] }) })
|
|
22561
23039
|
] }),
|
|
22562
|
-
/* @__PURE__ */
|
|
23040
|
+
/* @__PURE__ */ jsxs39(Hull10, { children: [
|
|
22563
23041
|
/* @__PURE__ */ jsx146(Translate18, { z: straightHeight, children: /* @__PURE__ */ jsx146(Cuboid26, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
22564
23042
|
/* @__PURE__ */ jsx146(Translate18, { z: bodyHeight, children: /* @__PURE__ */ jsx146(
|
|
22565
23043
|
Cuboid26,
|
|
@@ -22577,7 +23055,7 @@ var SMA = () => {
|
|
|
22577
23055
|
const bodyEdgeX = xDir * (bodyLength10 / 2 - leadThickness / 2);
|
|
22578
23056
|
const bridgeLength = Math.abs(bodyEdgeX - verticalLeadX);
|
|
22579
23057
|
const bridgeCenterX = (verticalLeadX + bodyEdgeX) / 2;
|
|
22580
|
-
return /* @__PURE__ */ jsx146(Colorize71, { color: "#c0c0c0", children: /* @__PURE__ */
|
|
23058
|
+
return /* @__PURE__ */ jsx146(Colorize71, { color: "#c0c0c0", children: /* @__PURE__ */ jsxs39(Union7, { children: [
|
|
22581
23059
|
/* @__PURE__ */ jsx146(
|
|
22582
23060
|
Cuboid26,
|
|
22583
23061
|
{
|
|
@@ -22601,7 +23079,7 @@ var SMA = () => {
|
|
|
22601
23079
|
)
|
|
22602
23080
|
] }) });
|
|
22603
23081
|
};
|
|
22604
|
-
return /* @__PURE__ */
|
|
23082
|
+
return /* @__PURE__ */ jsxs39(Fragment41, { children: [
|
|
22605
23083
|
/* @__PURE__ */ jsx146(Lead, { xDir: 1 }),
|
|
22606
23084
|
/* @__PURE__ */ jsx146(Lead, { xDir: -1 }),
|
|
22607
23085
|
Body
|
|
@@ -22610,7 +23088,7 @@ var SMA = () => {
|
|
|
22610
23088
|
|
|
22611
23089
|
// lib/SMB.tsx
|
|
22612
23090
|
import { Cuboid as Cuboid27, Colorize as Colorize72, Union as Union8, Hull as Hull11, Translate as Translate19 } from "jscad-fiber";
|
|
22613
|
-
import { Fragment as Fragment42, jsx as jsx147, jsxs as
|
|
23091
|
+
import { Fragment as Fragment42, jsx as jsx147, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
22614
23092
|
var SMB = () => {
|
|
22615
23093
|
const bodyWidth = 4.6;
|
|
22616
23094
|
const bodyLength10 = 4;
|
|
@@ -22621,8 +23099,8 @@ var SMB = () => {
|
|
|
22621
23099
|
const leadHeight = 1.14;
|
|
22622
23100
|
const taperOffset = 0.4;
|
|
22623
23101
|
const straightHeight = bodyHeight * 0.5;
|
|
22624
|
-
const Body = /* @__PURE__ */ jsx147(Colorize72, { color: "#1a1a1a", children: /* @__PURE__ */
|
|
22625
|
-
/* @__PURE__ */
|
|
23102
|
+
const Body = /* @__PURE__ */ jsx147(Colorize72, { color: "#1a1a1a", children: /* @__PURE__ */ jsxs40(Union8, { children: [
|
|
23103
|
+
/* @__PURE__ */ jsxs40(Hull11, { children: [
|
|
22626
23104
|
/* @__PURE__ */ jsx147(Translate19, { z: padThickness + 0.01, children: /* @__PURE__ */ jsx147(
|
|
22627
23105
|
Cuboid27,
|
|
22628
23106
|
{
|
|
@@ -22631,7 +23109,7 @@ var SMB = () => {
|
|
|
22631
23109
|
) }),
|
|
22632
23110
|
/* @__PURE__ */ jsx147(Translate19, { z: straightHeight, children: /* @__PURE__ */ jsx147(Cuboid27, { size: [bodyWidth, bodyLength10, 0.01] }) })
|
|
22633
23111
|
] }),
|
|
22634
|
-
/* @__PURE__ */
|
|
23112
|
+
/* @__PURE__ */ jsxs40(Hull11, { children: [
|
|
22635
23113
|
/* @__PURE__ */ jsx147(Translate19, { z: straightHeight, children: /* @__PURE__ */ jsx147(Cuboid27, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
22636
23114
|
/* @__PURE__ */ jsx147(Translate19, { z: bodyHeight, children: /* @__PURE__ */ jsx147(
|
|
22637
23115
|
Cuboid27,
|
|
@@ -22649,7 +23127,7 @@ var SMB = () => {
|
|
|
22649
23127
|
const bodyEdgeX = xDir * (bodyLength10 / 2 - leadThickness / 2);
|
|
22650
23128
|
const bridgeLength = Math.abs(bodyEdgeX - verticalLeadX);
|
|
22651
23129
|
const bridgeCenterX = (verticalLeadX + bodyEdgeX) / 2;
|
|
22652
|
-
return /* @__PURE__ */ jsx147(Colorize72, { color: "#c0c0c0", children: /* @__PURE__ */
|
|
23130
|
+
return /* @__PURE__ */ jsx147(Colorize72, { color: "#c0c0c0", children: /* @__PURE__ */ jsxs40(Union8, { children: [
|
|
22653
23131
|
/* @__PURE__ */ jsx147(
|
|
22654
23132
|
Cuboid27,
|
|
22655
23133
|
{
|
|
@@ -22673,7 +23151,7 @@ var SMB = () => {
|
|
|
22673
23151
|
)
|
|
22674
23152
|
] }) });
|
|
22675
23153
|
};
|
|
22676
|
-
return /* @__PURE__ */
|
|
23154
|
+
return /* @__PURE__ */ jsxs40(Fragment42, { children: [
|
|
22677
23155
|
/* @__PURE__ */ jsx147(Lead, { xDir: 1 }),
|
|
22678
23156
|
/* @__PURE__ */ jsx147(Lead, { xDir: -1 }),
|
|
22679
23157
|
Body
|
|
@@ -22682,7 +23160,7 @@ var SMB = () => {
|
|
|
22682
23160
|
|
|
22683
23161
|
// lib/SMC.tsx
|
|
22684
23162
|
import { Cuboid as Cuboid28, Colorize as Colorize73, Union as Union9, Hull as Hull12, Translate as Translate20 } from "jscad-fiber";
|
|
22685
|
-
import { Fragment as Fragment43, jsx as jsx148, jsxs as
|
|
23163
|
+
import { Fragment as Fragment43, jsx as jsx148, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
22686
23164
|
var SMC = () => {
|
|
22687
23165
|
const bodyWidth = 6.8;
|
|
22688
23166
|
const bodyLength10 = 6;
|
|
@@ -22693,8 +23171,8 @@ var SMC = () => {
|
|
|
22693
23171
|
const leadHeight = 1.14;
|
|
22694
23172
|
const taperOffset = 0.4;
|
|
22695
23173
|
const straightHeight = bodyHeight * 0.5;
|
|
22696
|
-
const Body = /* @__PURE__ */ jsx148(Colorize73, { color: "#1a1a1a", children: /* @__PURE__ */
|
|
22697
|
-
/* @__PURE__ */
|
|
23174
|
+
const Body = /* @__PURE__ */ jsx148(Colorize73, { color: "#1a1a1a", children: /* @__PURE__ */ jsxs41(Union9, { children: [
|
|
23175
|
+
/* @__PURE__ */ jsxs41(Hull12, { children: [
|
|
22698
23176
|
/* @__PURE__ */ jsx148(Translate20, { z: padThickness + 0.01, children: /* @__PURE__ */ jsx148(
|
|
22699
23177
|
Cuboid28,
|
|
22700
23178
|
{
|
|
@@ -22703,7 +23181,7 @@ var SMC = () => {
|
|
|
22703
23181
|
) }),
|
|
22704
23182
|
/* @__PURE__ */ jsx148(Translate20, { z: straightHeight, children: /* @__PURE__ */ jsx148(Cuboid28, { size: [bodyWidth, bodyLength10, 0.01] }) })
|
|
22705
23183
|
] }),
|
|
22706
|
-
/* @__PURE__ */
|
|
23184
|
+
/* @__PURE__ */ jsxs41(Hull12, { children: [
|
|
22707
23185
|
/* @__PURE__ */ jsx148(Translate20, { z: straightHeight, children: /* @__PURE__ */ jsx148(Cuboid28, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
22708
23186
|
/* @__PURE__ */ jsx148(Translate20, { z: bodyHeight, children: /* @__PURE__ */ jsx148(
|
|
22709
23187
|
Cuboid28,
|
|
@@ -22721,7 +23199,7 @@ var SMC = () => {
|
|
|
22721
23199
|
const bodyEdgeX = xDir * (bodyLength10 / 2 - leadThickness / 2);
|
|
22722
23200
|
const bridgeLength = Math.abs(bodyEdgeX - verticalLeadX);
|
|
22723
23201
|
const bridgeCenterX = (verticalLeadX + bodyEdgeX) / 2;
|
|
22724
|
-
return /* @__PURE__ */ jsx148(Colorize73, { color: "#c0c0c0", children: /* @__PURE__ */
|
|
23202
|
+
return /* @__PURE__ */ jsx148(Colorize73, { color: "#c0c0c0", children: /* @__PURE__ */ jsxs41(Union9, { children: [
|
|
22725
23203
|
/* @__PURE__ */ jsx148(
|
|
22726
23204
|
Cuboid28,
|
|
22727
23205
|
{
|
|
@@ -22745,7 +23223,7 @@ var SMC = () => {
|
|
|
22745
23223
|
)
|
|
22746
23224
|
] }) });
|
|
22747
23225
|
};
|
|
22748
|
-
return /* @__PURE__ */
|
|
23226
|
+
return /* @__PURE__ */ jsxs41(Fragment43, { children: [
|
|
22749
23227
|
/* @__PURE__ */ jsx148(Lead, { xDir: 1 }),
|
|
22750
23228
|
/* @__PURE__ */ jsx148(Lead, { xDir: -1 }),
|
|
22751
23229
|
Body
|
|
@@ -22754,7 +23232,7 @@ var SMC = () => {
|
|
|
22754
23232
|
|
|
22755
23233
|
// lib/SMF.tsx
|
|
22756
23234
|
import { Colorize as Colorize74, Cuboid as Cuboid29, Hull as Hull13, Translate as Translate21, Union as Union10 } from "jscad-fiber";
|
|
22757
|
-
import { Fragment as Fragment44, jsx as jsx149, jsxs as
|
|
23235
|
+
import { Fragment as Fragment44, jsx as jsx149, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
22758
23236
|
var SMF = () => {
|
|
22759
23237
|
const fullWidth = 2.9;
|
|
22760
23238
|
const bodyLength10 = 1.9;
|
|
@@ -22767,9 +23245,9 @@ var SMF = () => {
|
|
|
22767
23245
|
const rightPadCenterX = 1.3;
|
|
22768
23246
|
const taperOffset = 0.2;
|
|
22769
23247
|
const straightHeight = bodyHeight * 0.5;
|
|
22770
|
-
const Body = /* @__PURE__ */ jsx149(Colorize74, { color: "#222", children: /* @__PURE__ */
|
|
23248
|
+
const Body = /* @__PURE__ */ jsx149(Colorize74, { color: "#222", children: /* @__PURE__ */ jsxs42(Union10, { children: [
|
|
22771
23249
|
/* @__PURE__ */ jsx149(Translate21, { z: straightHeight / 2, children: /* @__PURE__ */ jsx149(Cuboid29, { size: [bodyWidth, bodyLength10, straightHeight] }) }),
|
|
22772
|
-
/* @__PURE__ */
|
|
23250
|
+
/* @__PURE__ */ jsxs42(Hull13, { children: [
|
|
22773
23251
|
/* @__PURE__ */ jsx149(Translate21, { z: straightHeight, children: /* @__PURE__ */ jsx149(Cuboid29, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
22774
23252
|
/* @__PURE__ */ jsx149(Translate21, { z: bodyHeight, children: /* @__PURE__ */ jsx149(
|
|
22775
23253
|
Cuboid29,
|
|
@@ -22779,7 +23257,7 @@ var SMF = () => {
|
|
|
22779
23257
|
) })
|
|
22780
23258
|
] })
|
|
22781
23259
|
] }) });
|
|
22782
|
-
return /* @__PURE__ */
|
|
23260
|
+
return /* @__PURE__ */ jsxs42(Fragment44, { children: [
|
|
22783
23261
|
/* @__PURE__ */ jsx149(
|
|
22784
23262
|
Cuboid29,
|
|
22785
23263
|
{
|
|
@@ -22802,7 +23280,7 @@ var SMF = () => {
|
|
|
22802
23280
|
|
|
22803
23281
|
// lib/sod-123F.tsx
|
|
22804
23282
|
import { Colorize as Colorize75, Cuboid as Cuboid30, Hull as Hull14, Translate as Translate22, Union as Union11 } from "jscad-fiber";
|
|
22805
|
-
import { Fragment as Fragment45, jsx as jsx150, jsxs as
|
|
23283
|
+
import { Fragment as Fragment45, jsx as jsx150, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
22806
23284
|
var SOD123F = () => {
|
|
22807
23285
|
const fullWidth = 2.7;
|
|
22808
23286
|
const bodyLength10 = 1.6;
|
|
@@ -22814,7 +23292,7 @@ var SOD123F = () => {
|
|
|
22814
23292
|
const rightPadCenterX = 1.3;
|
|
22815
23293
|
const taperOffset = 0.2;
|
|
22816
23294
|
const straightHeight = bodyHeight * 0.5;
|
|
22817
|
-
return /* @__PURE__ */
|
|
23295
|
+
return /* @__PURE__ */ jsxs43(Fragment45, { children: [
|
|
22818
23296
|
/* @__PURE__ */ jsx150(
|
|
22819
23297
|
Cuboid30,
|
|
22820
23298
|
{
|
|
@@ -22831,9 +23309,9 @@ var SOD123F = () => {
|
|
|
22831
23309
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
22832
23310
|
}
|
|
22833
23311
|
),
|
|
22834
|
-
/* @__PURE__ */ jsx150(Colorize75, { color: "#222", children: /* @__PURE__ */
|
|
23312
|
+
/* @__PURE__ */ jsx150(Colorize75, { color: "#222", children: /* @__PURE__ */ jsxs43(Union11, { children: [
|
|
22835
23313
|
/* @__PURE__ */ jsx150(Translate22, { z: straightHeight / 2, children: /* @__PURE__ */ jsx150(Cuboid30, { size: [fullWidth, bodyLength10, straightHeight] }) }),
|
|
22836
|
-
/* @__PURE__ */
|
|
23314
|
+
/* @__PURE__ */ jsxs43(Hull14, { children: [
|
|
22837
23315
|
/* @__PURE__ */ jsx150(Translate22, { z: straightHeight, children: /* @__PURE__ */ jsx150(Cuboid30, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
22838
23316
|
/* @__PURE__ */ jsx150(Translate22, { z: bodyHeight, children: /* @__PURE__ */ jsx150(
|
|
22839
23317
|
Cuboid30,
|
|
@@ -22848,7 +23326,7 @@ var SOD123F = () => {
|
|
|
22848
23326
|
|
|
22849
23327
|
// lib/sod-123FL.tsx
|
|
22850
23328
|
import { Colorize as Colorize76, Cuboid as Cuboid31, Hull as Hull15, Translate as Translate23, Union as Union12 } from "jscad-fiber";
|
|
22851
|
-
import { Fragment as Fragment46, jsx as jsx151, jsxs as
|
|
23329
|
+
import { Fragment as Fragment46, jsx as jsx151, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
22852
23330
|
var SOD123FL = () => {
|
|
22853
23331
|
const fullWidth = 2.75;
|
|
22854
23332
|
const bodyLength10 = 1.8;
|
|
@@ -22860,7 +23338,7 @@ var SOD123FL = () => {
|
|
|
22860
23338
|
const rightPadCenterX = fullWidth / 2 - 0.075;
|
|
22861
23339
|
const taperOffset = 0.4;
|
|
22862
23340
|
const straightHeight = bodyHeight * 0.2;
|
|
22863
|
-
return /* @__PURE__ */
|
|
23341
|
+
return /* @__PURE__ */ jsxs44(Fragment46, { children: [
|
|
22864
23342
|
/* @__PURE__ */ jsx151(
|
|
22865
23343
|
Cuboid31,
|
|
22866
23344
|
{
|
|
@@ -22877,9 +23355,9 @@ var SOD123FL = () => {
|
|
|
22877
23355
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
22878
23356
|
}
|
|
22879
23357
|
),
|
|
22880
|
-
/* @__PURE__ */ jsx151(Colorize76, { color: "#222", children: /* @__PURE__ */
|
|
23358
|
+
/* @__PURE__ */ jsx151(Colorize76, { color: "#222", children: /* @__PURE__ */ jsxs44(Union12, { children: [
|
|
22881
23359
|
/* @__PURE__ */ jsx151(Translate23, { z: straightHeight / 2, children: /* @__PURE__ */ jsx151(Cuboid31, { size: [fullWidth, bodyLength10, straightHeight] }) }),
|
|
22882
|
-
/* @__PURE__ */
|
|
23360
|
+
/* @__PURE__ */ jsxs44(Hull15, { children: [
|
|
22883
23361
|
/* @__PURE__ */ jsx151(Translate23, { z: straightHeight, children: /* @__PURE__ */ jsx151(Cuboid31, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
22884
23362
|
/* @__PURE__ */ jsx151(Translate23, { z: bodyHeight, children: /* @__PURE__ */ jsx151(
|
|
22885
23363
|
Cuboid31,
|
|
@@ -22902,7 +23380,7 @@ var SOD123FL = () => {
|
|
|
22902
23380
|
|
|
22903
23381
|
// lib/sod-123W.tsx
|
|
22904
23382
|
import { Colorize as Colorize77, Cuboid as Cuboid32, Hull as Hull16, Translate as Translate24, Union as Union13 } from "jscad-fiber";
|
|
22905
|
-
import { Fragment as Fragment47, jsx as jsx152, jsxs as
|
|
23383
|
+
import { Fragment as Fragment47, jsx as jsx152, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
22906
23384
|
var SOD123W = ({
|
|
22907
23385
|
bodyWidth = 2.6,
|
|
22908
23386
|
bodyLength: bodyLength10 = 1.7,
|
|
@@ -22917,7 +23395,7 @@ var SOD123W = ({
|
|
|
22917
23395
|
const taperOffset = 0.4;
|
|
22918
23396
|
const lowerTaperOffset = 0.1;
|
|
22919
23397
|
const straightHeight = bodyHeight * 0.2;
|
|
22920
|
-
return /* @__PURE__ */
|
|
23398
|
+
return /* @__PURE__ */ jsxs45(Fragment47, { children: [
|
|
22921
23399
|
/* @__PURE__ */ jsx152(
|
|
22922
23400
|
Cuboid32,
|
|
22923
23401
|
{
|
|
@@ -22934,8 +23412,8 @@ var SOD123W = ({
|
|
|
22934
23412
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
22935
23413
|
}
|
|
22936
23414
|
),
|
|
22937
|
-
/* @__PURE__ */ jsx152(Colorize77, { color: "#222", children: /* @__PURE__ */
|
|
22938
|
-
/* @__PURE__ */
|
|
23415
|
+
/* @__PURE__ */ jsx152(Colorize77, { color: "#222", children: /* @__PURE__ */ jsxs45(Union13, { children: [
|
|
23416
|
+
/* @__PURE__ */ jsxs45(Hull16, { children: [
|
|
22939
23417
|
/* @__PURE__ */ jsx152(Translate24, { z: straightHeight, children: /* @__PURE__ */ jsx152(
|
|
22940
23418
|
Cuboid32,
|
|
22941
23419
|
{
|
|
@@ -22957,7 +23435,7 @@ var SOD123W = ({
|
|
|
22957
23435
|
}
|
|
22958
23436
|
) })
|
|
22959
23437
|
] }),
|
|
22960
|
-
/* @__PURE__ */
|
|
23438
|
+
/* @__PURE__ */ jsxs45(Hull16, { children: [
|
|
22961
23439
|
/* @__PURE__ */ jsx152(Translate24, { z: straightHeight, children: /* @__PURE__ */ jsx152(Cuboid32, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
22962
23440
|
/* @__PURE__ */ jsx152(Translate24, { z: bodyHeight, children: /* @__PURE__ */ jsx152(
|
|
22963
23441
|
Cuboid32,
|
|
@@ -22980,7 +23458,7 @@ var SOD123W = ({
|
|
|
22980
23458
|
|
|
22981
23459
|
// lib/sod-123.tsx
|
|
22982
23460
|
import { Cuboid as Cuboid33 } from "jscad-fiber";
|
|
22983
|
-
import { Fragment as Fragment48, jsx as jsx153, jsxs as
|
|
23461
|
+
import { Fragment as Fragment48, jsx as jsx153, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
22984
23462
|
var SOD123 = ({
|
|
22985
23463
|
fullWidth = 3.7,
|
|
22986
23464
|
fullLength: fullLength10 = 1.55
|
|
@@ -22996,7 +23474,7 @@ var SOD123 = ({
|
|
|
22996
23474
|
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
22997
23475
|
const padContactLength = 0.25;
|
|
22998
23476
|
const leadCurveLength = 0.2;
|
|
22999
|
-
return /* @__PURE__ */
|
|
23477
|
+
return /* @__PURE__ */ jsxs46(Fragment48, { children: [
|
|
23000
23478
|
/* @__PURE__ */ jsx153(
|
|
23001
23479
|
SmdChipLead,
|
|
23002
23480
|
{
|
|
@@ -23057,7 +23535,7 @@ var SOD123 = ({
|
|
|
23057
23535
|
|
|
23058
23536
|
// lib/sod-128.tsx
|
|
23059
23537
|
import { Colorize as Colorize78, Cuboid as Cuboid34, Hull as Hull17, Translate as Translate25, Union as Union14 } from "jscad-fiber";
|
|
23060
|
-
import { Fragment as Fragment49, jsx as jsx154, jsxs as
|
|
23538
|
+
import { Fragment as Fragment49, jsx as jsx154, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
23061
23539
|
var SOD128 = () => {
|
|
23062
23540
|
const fullWidth = 3.8;
|
|
23063
23541
|
const bodyLength10 = 2.5;
|
|
@@ -23070,7 +23548,7 @@ var SOD128 = () => {
|
|
|
23070
23548
|
const taperOffset = 0.4;
|
|
23071
23549
|
const lowerTaperOffset = 0.05;
|
|
23072
23550
|
const straightHeight = bodyHeight * 0.2;
|
|
23073
|
-
return /* @__PURE__ */
|
|
23551
|
+
return /* @__PURE__ */ jsxs47(Fragment49, { children: [
|
|
23074
23552
|
/* @__PURE__ */ jsx154(
|
|
23075
23553
|
Cuboid34,
|
|
23076
23554
|
{
|
|
@@ -23087,8 +23565,8 @@ var SOD128 = () => {
|
|
|
23087
23565
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
23088
23566
|
}
|
|
23089
23567
|
),
|
|
23090
|
-
/* @__PURE__ */ jsx154(Colorize78, { color: "#222", children: /* @__PURE__ */
|
|
23091
|
-
/* @__PURE__ */
|
|
23568
|
+
/* @__PURE__ */ jsx154(Colorize78, { color: "#222", children: /* @__PURE__ */ jsxs47(Union14, { children: [
|
|
23569
|
+
/* @__PURE__ */ jsxs47(Hull17, { children: [
|
|
23092
23570
|
/* @__PURE__ */ jsx154(Translate25, { z: straightHeight, children: /* @__PURE__ */ jsx154(
|
|
23093
23571
|
Cuboid34,
|
|
23094
23572
|
{
|
|
@@ -23110,7 +23588,7 @@ var SOD128 = () => {
|
|
|
23110
23588
|
}
|
|
23111
23589
|
) })
|
|
23112
23590
|
] }),
|
|
23113
|
-
/* @__PURE__ */
|
|
23591
|
+
/* @__PURE__ */ jsxs47(Hull17, { children: [
|
|
23114
23592
|
/* @__PURE__ */ jsx154(Translate25, { z: straightHeight, children: /* @__PURE__ */ jsx154(Cuboid34, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
23115
23593
|
/* @__PURE__ */ jsx154(Translate25, { z: bodyHeight, children: /* @__PURE__ */ jsx154(
|
|
23116
23594
|
Cuboid34,
|
|
@@ -23133,7 +23611,7 @@ var SOD128 = () => {
|
|
|
23133
23611
|
|
|
23134
23612
|
// lib/SOD-923.tsx
|
|
23135
23613
|
import { Colorize as Colorize79, Cuboid as Cuboid35, Hull as Hull18, Translate as Translate26, Union as Union15 } from "jscad-fiber";
|
|
23136
|
-
import { Fragment as Fragment50, jsx as jsx155, jsxs as
|
|
23614
|
+
import { Fragment as Fragment50, jsx as jsx155, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
23137
23615
|
var SOD923 = () => {
|
|
23138
23616
|
const fullWidth = 0.8;
|
|
23139
23617
|
const bodyLength10 = 0.6;
|
|
@@ -23145,7 +23623,7 @@ var SOD923 = () => {
|
|
|
23145
23623
|
const rightPadCenterX = fullWidth / 2;
|
|
23146
23624
|
const taperOffset = 0.1;
|
|
23147
23625
|
const straightHeight = padThickness;
|
|
23148
|
-
return /* @__PURE__ */
|
|
23626
|
+
return /* @__PURE__ */ jsxs48(Fragment50, { children: [
|
|
23149
23627
|
/* @__PURE__ */ jsx155(
|
|
23150
23628
|
Cuboid35,
|
|
23151
23629
|
{
|
|
@@ -23162,9 +23640,9 @@ var SOD923 = () => {
|
|
|
23162
23640
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
23163
23641
|
}
|
|
23164
23642
|
),
|
|
23165
|
-
/* @__PURE__ */ jsx155(Colorize79, { color: "#222", children: /* @__PURE__ */
|
|
23643
|
+
/* @__PURE__ */ jsx155(Colorize79, { color: "#222", children: /* @__PURE__ */ jsxs48(Union15, { children: [
|
|
23166
23644
|
/* @__PURE__ */ jsx155(Translate26, { z: straightHeight / 2, children: /* @__PURE__ */ jsx155(Cuboid35, { size: [fullWidth, bodyLength10, straightHeight] }) }),
|
|
23167
|
-
/* @__PURE__ */
|
|
23645
|
+
/* @__PURE__ */ jsxs48(Hull18, { children: [
|
|
23168
23646
|
/* @__PURE__ */ jsx155(Translate26, { z: straightHeight, children: /* @__PURE__ */ jsx155(Cuboid35, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
23169
23647
|
/* @__PURE__ */ jsx155(Translate26, { z: bodyHeight, children: /* @__PURE__ */ jsx155(
|
|
23170
23648
|
Cuboid35,
|
|
@@ -23178,7 +23656,7 @@ var SOD923 = () => {
|
|
|
23178
23656
|
};
|
|
23179
23657
|
|
|
23180
23658
|
// lib/SOT-223.tsx
|
|
23181
|
-
import { Fragment as Fragment51, jsx as jsx156, jsxs as
|
|
23659
|
+
import { Fragment as Fragment51, jsx as jsx156, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
23182
23660
|
var SOT223 = ({
|
|
23183
23661
|
fullWidth = 6.6,
|
|
23184
23662
|
bodyWidth = 3.5,
|
|
@@ -23193,7 +23671,7 @@ var SOT223 = ({
|
|
|
23193
23671
|
const leadThickness = 0.25;
|
|
23194
23672
|
const padContactLength = 0.5;
|
|
23195
23673
|
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
23196
|
-
return /* @__PURE__ */
|
|
23674
|
+
return /* @__PURE__ */ jsxs49(Fragment51, { children: [
|
|
23197
23675
|
/* @__PURE__ */ jsx156(
|
|
23198
23676
|
SmdChipLead,
|
|
23199
23677
|
{
|
|
@@ -23275,7 +23753,7 @@ var SOT223 = ({
|
|
|
23275
23753
|
};
|
|
23276
23754
|
|
|
23277
23755
|
// lib/tqfp.tsx
|
|
23278
|
-
import { Fragment as Fragment52, jsx as jsx157, jsxs as
|
|
23756
|
+
import { Fragment as Fragment52, jsx as jsx157, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
23279
23757
|
var TQFP = () => {
|
|
23280
23758
|
const pinCount = 64;
|
|
23281
23759
|
const pitch = 0.5;
|
|
@@ -23290,7 +23768,7 @@ var TQFP = () => {
|
|
|
23290
23768
|
const leadHeight = 0.65;
|
|
23291
23769
|
const leadThickness = 0.25;
|
|
23292
23770
|
const bodyDistance = (fullWidth - bodyWidth) / 2 + 0.2;
|
|
23293
|
-
return /* @__PURE__ */
|
|
23771
|
+
return /* @__PURE__ */ jsxs50(Fragment52, { children: [
|
|
23294
23772
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx157(
|
|
23295
23773
|
SmdChipLead,
|
|
23296
23774
|
{
|
|
@@ -23376,7 +23854,7 @@ var TQFP = () => {
|
|
|
23376
23854
|
var tqfp_default = TQFP;
|
|
23377
23855
|
|
|
23378
23856
|
// lib/SOT-323.tsx
|
|
23379
|
-
import { Fragment as Fragment53, jsx as jsx158, jsxs as
|
|
23857
|
+
import { Fragment as Fragment53, jsx as jsx158, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
23380
23858
|
var SOT323 = () => {
|
|
23381
23859
|
const fullWidth = 2.05;
|
|
23382
23860
|
const bodyWidth = 1.25;
|
|
@@ -23388,7 +23866,7 @@ var SOT323 = () => {
|
|
|
23388
23866
|
const padContactLength = 0.2;
|
|
23389
23867
|
const padPitch = 0.65;
|
|
23390
23868
|
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
23391
|
-
return /* @__PURE__ */
|
|
23869
|
+
return /* @__PURE__ */ jsxs51(Fragment53, { children: [
|
|
23392
23870
|
/* @__PURE__ */ jsx158(
|
|
23393
23871
|
SmdChipLead,
|
|
23394
23872
|
{
|
|
@@ -23460,11 +23938,11 @@ import {
|
|
|
23460
23938
|
Cuboid as Cuboid36,
|
|
23461
23939
|
Cylinder as Cylinder9,
|
|
23462
23940
|
Hull as Hull19,
|
|
23463
|
-
Subtract as
|
|
23941
|
+
Subtract as Subtract9,
|
|
23464
23942
|
Translate as Translate27,
|
|
23465
23943
|
Union as Union16
|
|
23466
23944
|
} from "jscad-fiber";
|
|
23467
|
-
import { Fragment as Fragment54, jsx as jsx159, jsxs as
|
|
23945
|
+
import { Fragment as Fragment54, jsx as jsx159, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
23468
23946
|
function createPhysicalLqfp(p) {
|
|
23469
23947
|
const {
|
|
23470
23948
|
pinCount,
|
|
@@ -23508,7 +23986,7 @@ function createPhysicalLqfp(p) {
|
|
|
23508
23986
|
throw new Error("Invalid mold, lead spacing, or terminal reach");
|
|
23509
23987
|
const midZ = standoff + moldHeight / 2;
|
|
23510
23988
|
const slice = Math.min(2e-3, moldHeight / 100);
|
|
23511
|
-
const body = /* @__PURE__ */
|
|
23989
|
+
const body = /* @__PURE__ */ jsxs52(Hull19, { children: [
|
|
23512
23990
|
/* @__PURE__ */ jsx159(Translate27, { z: standoff + slice / 2, children: /* @__PURE__ */ jsx159(
|
|
23513
23991
|
Cuboid36,
|
|
23514
23992
|
{
|
|
@@ -23569,13 +24047,13 @@ function createPhysicalLqfp(p) {
|
|
|
23569
24047
|
)
|
|
23570
24048
|
}
|
|
23571
24049
|
);
|
|
23572
|
-
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: [
|
|
23573
24051
|
section(points[i]),
|
|
23574
24052
|
section(point)
|
|
23575
24053
|
] }, i)) });
|
|
23576
24054
|
};
|
|
23577
|
-
return /* @__PURE__ */
|
|
23578
|
-
/* @__PURE__ */ jsx159(Colorize80, { color: "#353535", children: /* @__PURE__ */
|
|
24055
|
+
return /* @__PURE__ */ jsxs52(Fragment54, { children: [
|
|
24056
|
+
/* @__PURE__ */ jsx159(Colorize80, { color: "#353535", children: /* @__PURE__ */ jsxs52(Subtract9, { children: [
|
|
23579
24057
|
body,
|
|
23580
24058
|
/* @__PURE__ */ jsx159(
|
|
23581
24059
|
Translate27,
|
|
@@ -23600,7 +24078,7 @@ function createPhysicalLqfp(p) {
|
|
|
23600
24078
|
}
|
|
23601
24079
|
|
|
23602
24080
|
// lib/lqfp.tsx
|
|
23603
|
-
import { Fragment as Fragment55, jsx as jsx160, jsxs as
|
|
24081
|
+
import { Fragment as Fragment55, jsx as jsx160, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
23604
24082
|
var LegacyLQFP = ({
|
|
23605
24083
|
pinCount,
|
|
23606
24084
|
pitch,
|
|
@@ -23623,7 +24101,7 @@ var LegacyLQFP = ({
|
|
|
23623
24101
|
const leadHeight = 0.8;
|
|
23624
24102
|
const leadThickness = 0.2;
|
|
23625
24103
|
const bodyDistance = (fullWidth - bodyWidth) / 2 + 0.4;
|
|
23626
|
-
return /* @__PURE__ */
|
|
24104
|
+
return /* @__PURE__ */ jsxs53(Fragment55, { children: [
|
|
23627
24105
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx160(
|
|
23628
24106
|
SmdChipLead,
|
|
23629
24107
|
{
|
|
@@ -23715,7 +24193,7 @@ var LQFP = (props) => "leadSpanX" in props ? createPhysicalLqfp(props) : LegacyL
|
|
|
23715
24193
|
|
|
23716
24194
|
// lib/SOT-723.tsx
|
|
23717
24195
|
import { Cuboid as Cuboid37, Translate as Translate28, Colorize as Colorize81, Hull as Hull20, Union as Union17 } from "jscad-fiber";
|
|
23718
|
-
import { Fragment as Fragment56, jsx as jsx161, jsxs as
|
|
24196
|
+
import { Fragment as Fragment56, jsx as jsx161, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
23719
24197
|
var SOT723 = () => {
|
|
23720
24198
|
const bodyWidth = 0.85;
|
|
23721
24199
|
const bodyLength10 = 1.2;
|
|
@@ -23732,8 +24210,8 @@ var SOT723 = () => {
|
|
|
23732
24210
|
const leftTopPadCenterY = 0.4;
|
|
23733
24211
|
const leftBottomPadCenterX = -0.55;
|
|
23734
24212
|
const leftBottomPadCenterY = -0.4;
|
|
23735
|
-
return /* @__PURE__ */
|
|
23736
|
-
/* @__PURE__ */ jsx161(Colorize81, { color: "#222", children: /* @__PURE__ */
|
|
24213
|
+
return /* @__PURE__ */ jsxs54(Fragment56, { children: [
|
|
24214
|
+
/* @__PURE__ */ jsx161(Colorize81, { color: "#222", children: /* @__PURE__ */ jsxs54(Union17, { children: [
|
|
23737
24215
|
/* @__PURE__ */ jsx161(
|
|
23738
24216
|
Cuboid37,
|
|
23739
24217
|
{
|
|
@@ -23741,7 +24219,7 @@ var SOT723 = () => {
|
|
|
23741
24219
|
center: [0, 0, straightHeight / 2]
|
|
23742
24220
|
}
|
|
23743
24221
|
),
|
|
23744
|
-
/* @__PURE__ */
|
|
24222
|
+
/* @__PURE__ */ jsxs54(Hull20, { children: [
|
|
23745
24223
|
/* @__PURE__ */ jsx161(Translate28, { z: straightHeight, children: /* @__PURE__ */ jsx161(Cuboid37, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
23746
24224
|
/* @__PURE__ */ jsx161(Translate28, { z: bodyHeight, children: /* @__PURE__ */ jsx161(
|
|
23747
24225
|
Cuboid37,
|
|
@@ -23779,8 +24257,8 @@ var SOT723 = () => {
|
|
|
23779
24257
|
};
|
|
23780
24258
|
|
|
23781
24259
|
// lib/dfn.tsx
|
|
23782
|
-
import { Colorize as Colorize82, Cuboid as Cuboid38, Hull as Hull21, Subtract as
|
|
23783
|
-
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";
|
|
23784
24262
|
var DFN = ({
|
|
23785
24263
|
num_pins,
|
|
23786
24264
|
bodyWidth = 5.3,
|
|
@@ -23861,13 +24339,13 @@ var DFN = ({
|
|
|
23861
24339
|
center: [0, 0, standoff + bodyThickness / 2]
|
|
23862
24340
|
}
|
|
23863
24341
|
);
|
|
23864
|
-
return /* @__PURE__ */
|
|
23865
|
-
/* @__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: [
|
|
23866
24344
|
body,
|
|
23867
24345
|
stripe
|
|
23868
24346
|
] }) : body }),
|
|
23869
24347
|
/* @__PURE__ */ jsx162(Colorize82, { material: componentMaterials.tinnedLead, color: "#c7c9cd", children: pinPositions.map(
|
|
23870
|
-
(p) => p.pinNumber === 1 && pin1TerminalChamfer > 0 ? /* @__PURE__ */
|
|
24348
|
+
(p) => p.pinNumber === 1 && pin1TerminalChamfer > 0 ? /* @__PURE__ */ jsxs55(Hull21, { children: [
|
|
23871
24349
|
/* @__PURE__ */ jsx162(
|
|
23872
24350
|
Cuboid38,
|
|
23873
24351
|
{
|
|
@@ -23919,7 +24397,7 @@ var DFN = ({
|
|
|
23919
24397
|
pin1MarkWidth > 0 && /* @__PURE__ */ jsx162(Colorize82, { color: "#969997", children: stripe })
|
|
23920
24398
|
] });
|
|
23921
24399
|
}
|
|
23922
|
-
return /* @__PURE__ */
|
|
24400
|
+
return /* @__PURE__ */ jsxs55(Fragment57, { children: [
|
|
23923
24401
|
/* @__PURE__ */ jsx162(
|
|
23924
24402
|
ChipBody,
|
|
23925
24403
|
{
|
|
@@ -23962,7 +24440,7 @@ var DFN = ({
|
|
|
23962
24440
|
|
|
23963
24441
|
// lib/hc49.tsx
|
|
23964
24442
|
import { Colorize as Colorize83, Cylinder as Cylinder10, Hull as Hull22, RoundedCylinder } from "jscad-fiber";
|
|
23965
|
-
import { Fragment as Fragment58, jsx as jsx163, jsxs as
|
|
24443
|
+
import { Fragment as Fragment58, jsx as jsx163, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
23966
24444
|
var HC49 = ({
|
|
23967
24445
|
bodyLength: bodyLength10 = 10.2,
|
|
23968
24446
|
bodyWidth = 4.65,
|
|
@@ -23978,9 +24456,9 @@ var HC49 = ({
|
|
|
23978
24456
|
const endCenterX = halfLength - endRadius;
|
|
23979
24457
|
const leadCenterX = leadSpacing / 2;
|
|
23980
24458
|
const baseHeight = 0.85;
|
|
23981
|
-
return /* @__PURE__ */
|
|
23982
|
-
/* @__PURE__ */
|
|
23983
|
-
/* @__PURE__ */
|
|
24459
|
+
return /* @__PURE__ */ jsxs56(Fragment58, { children: [
|
|
24460
|
+
/* @__PURE__ */ jsxs56(Colorize83, { color, children: [
|
|
24461
|
+
/* @__PURE__ */ jsxs56(Hull22, { children: [
|
|
23984
24462
|
/* @__PURE__ */ jsx163(
|
|
23985
24463
|
RoundedCylinder,
|
|
23986
24464
|
{
|
|
@@ -24000,7 +24478,7 @@ var HC49 = ({
|
|
|
24000
24478
|
}
|
|
24001
24479
|
)
|
|
24002
24480
|
] }),
|
|
24003
|
-
/* @__PURE__ */
|
|
24481
|
+
/* @__PURE__ */ jsxs56(Hull22, { children: [
|
|
24004
24482
|
/* @__PURE__ */ jsx163(
|
|
24005
24483
|
RoundedCylinder,
|
|
24006
24484
|
{
|
|
@@ -24021,7 +24499,7 @@ var HC49 = ({
|
|
|
24021
24499
|
)
|
|
24022
24500
|
] })
|
|
24023
24501
|
] }),
|
|
24024
|
-
/* @__PURE__ */
|
|
24502
|
+
/* @__PURE__ */ jsxs56(Colorize83, { color: leadColor, children: [
|
|
24025
24503
|
/* @__PURE__ */ jsx163(
|
|
24026
24504
|
Cylinder10,
|
|
24027
24505
|
{
|
|
@@ -24050,7 +24528,7 @@ import {
|
|
|
24050
24528
|
Rotate as Rotate9,
|
|
24051
24529
|
RoundedCuboid as RoundedCuboid4
|
|
24052
24530
|
} from "jscad-fiber";
|
|
24053
|
-
import { Fragment as Fragment59, jsx as jsx164, jsxs as
|
|
24531
|
+
import { Fragment as Fragment59, jsx as jsx164, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
24054
24532
|
var MicroMELF = ({
|
|
24055
24533
|
bodyLength: bodyLength10 = 1.4,
|
|
24056
24534
|
bodyDiameter = 1.1,
|
|
@@ -24059,8 +24537,8 @@ var MicroMELF = ({
|
|
|
24059
24537
|
cathodeIdentification = "#111"
|
|
24060
24538
|
}) => {
|
|
24061
24539
|
const padLength = 0.2;
|
|
24062
|
-
return /* @__PURE__ */
|
|
24063
|
-
/* @__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: [
|
|
24064
24542
|
/* @__PURE__ */ jsx164(
|
|
24065
24543
|
RoundedCuboid4,
|
|
24066
24544
|
{
|
|
@@ -24109,7 +24587,7 @@ var MicroMELF = ({
|
|
|
24109
24587
|
|
|
24110
24588
|
// lib/MINIMELF.tsx
|
|
24111
24589
|
import { Colorize as Colorize85, Cylinder as Cylinder12, RoundedCylinder as RoundedCylinder3, Rotate as Rotate10 } from "jscad-fiber";
|
|
24112
|
-
import { Fragment as Fragment60, jsx as jsx165, jsxs as
|
|
24590
|
+
import { Fragment as Fragment60, jsx as jsx165, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
24113
24591
|
var MINIMELF = ({
|
|
24114
24592
|
bodyLength: bodyLength10 = 3.5,
|
|
24115
24593
|
bodyDiameter = 1.5,
|
|
@@ -24123,7 +24601,7 @@ var MINIMELF = ({
|
|
|
24123
24601
|
const contactRadius = bodyDiameter / 2 + 0.02;
|
|
24124
24602
|
const bandLength = 0.14;
|
|
24125
24603
|
const bandOffset = -bodyLength10 / 2 + contactLength + 0.35;
|
|
24126
|
-
return /* @__PURE__ */
|
|
24604
|
+
return /* @__PURE__ */ jsxs58(Fragment60, { children: [
|
|
24127
24605
|
/* @__PURE__ */ jsx165(Colorize85, { color, children: /* @__PURE__ */ jsx165(Rotate10, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx165(
|
|
24128
24606
|
RoundedCylinder3,
|
|
24129
24607
|
{
|
|
@@ -24164,7 +24642,7 @@ var MINIMELF = ({
|
|
|
24164
24642
|
|
|
24165
24643
|
// lib/MELF.tsx
|
|
24166
24644
|
import { Colorize as Colorize86, RoundedCylinder as RoundedCylinder4, Rotate as Rotate11 } from "jscad-fiber";
|
|
24167
|
-
import { Fragment as Fragment61, jsx as jsx166, jsxs as
|
|
24645
|
+
import { Fragment as Fragment61, jsx as jsx166, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
24168
24646
|
var MELF = ({
|
|
24169
24647
|
bodyLength: bodyLength10 = 3.9,
|
|
24170
24648
|
bodyDiameter = 2.5,
|
|
@@ -24172,7 +24650,7 @@ var MELF = ({
|
|
|
24172
24650
|
contactColor = "#c6c6c6"
|
|
24173
24651
|
}) => {
|
|
24174
24652
|
const padLength = 0.55;
|
|
24175
|
-
return /* @__PURE__ */
|
|
24653
|
+
return /* @__PURE__ */ jsxs59(Fragment61, { children: [
|
|
24176
24654
|
/* @__PURE__ */ jsx166(Colorize86, { color, children: /* @__PURE__ */ jsx166(Rotate11, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx166(
|
|
24177
24655
|
RoundedCylinder4,
|
|
24178
24656
|
{
|
|
@@ -24204,7 +24682,7 @@ var MELF = ({
|
|
|
24204
24682
|
};
|
|
24205
24683
|
|
|
24206
24684
|
// lib/ms012.tsx
|
|
24207
|
-
import { Fragment as Fragment62, jsx as jsx167, jsxs as
|
|
24685
|
+
import { Fragment as Fragment62, jsx as jsx167, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
24208
24686
|
var MS012 = ({
|
|
24209
24687
|
pinCount,
|
|
24210
24688
|
padContactLength = 0.6,
|
|
@@ -24219,7 +24697,7 @@ var MS012 = ({
|
|
|
24219
24697
|
const bodyLength10 = 3.9;
|
|
24220
24698
|
const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
|
|
24221
24699
|
const leadThickness = 0.2;
|
|
24222
|
-
return /* @__PURE__ */
|
|
24700
|
+
return /* @__PURE__ */ jsxs60(Fragment62, { children: [
|
|
24223
24701
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx167(
|
|
24224
24702
|
SmdChipLead,
|
|
24225
24703
|
{
|
|
@@ -24273,7 +24751,7 @@ var MS012 = ({
|
|
|
24273
24751
|
};
|
|
24274
24752
|
|
|
24275
24753
|
// lib/ms013.tsx
|
|
24276
|
-
import { Fragment as Fragment63, jsx as jsx168, jsxs as
|
|
24754
|
+
import { Fragment as Fragment63, jsx as jsx168, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
24277
24755
|
var MS013 = ({
|
|
24278
24756
|
pinCount = 16,
|
|
24279
24757
|
padContactLength = 0.6,
|
|
@@ -24288,7 +24766,7 @@ var MS013 = ({
|
|
|
24288
24766
|
const bodyLength10 = 10.3;
|
|
24289
24767
|
const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
|
|
24290
24768
|
const leadThickness = 0.2;
|
|
24291
|
-
return /* @__PURE__ */
|
|
24769
|
+
return /* @__PURE__ */ jsxs61(Fragment63, { children: [
|
|
24292
24770
|
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx168(
|
|
24293
24771
|
SmdChipLead,
|
|
24294
24772
|
{
|
|
@@ -24347,10 +24825,10 @@ import {
|
|
|
24347
24825
|
Cuboid as Cuboid40,
|
|
24348
24826
|
Cylinder as Cylinder13,
|
|
24349
24827
|
Rotate as Rotate12,
|
|
24350
|
-
Subtract as
|
|
24828
|
+
Subtract as Subtract11,
|
|
24351
24829
|
Translate as Translate29
|
|
24352
24830
|
} from "jscad-fiber";
|
|
24353
|
-
import { Fragment as Fragment64, jsx as jsx169, jsxs as
|
|
24831
|
+
import { Fragment as Fragment64, jsx as jsx169, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
24354
24832
|
var TO220_DEFAULT_LEADS = [
|
|
24355
24833
|
{ x: -2.54, y: -1 },
|
|
24356
24834
|
{ x: 0, y: -1 },
|
|
@@ -24380,7 +24858,7 @@ var TO220 = ({
|
|
|
24380
24858
|
const holeZ = tabTop - Math.max(mountingHoleDiameter * 0.8, 2.6);
|
|
24381
24859
|
const leadWidth = 0.8;
|
|
24382
24860
|
const leadThickness = 0.5;
|
|
24383
|
-
return /* @__PURE__ */
|
|
24861
|
+
return /* @__PURE__ */ jsxs62(Fragment64, { children: [
|
|
24384
24862
|
/* @__PURE__ */ jsx169(Colorize87, { color: bodyColor, children: /* @__PURE__ */ jsx169(
|
|
24385
24863
|
Cuboid40,
|
|
24386
24864
|
{
|
|
@@ -24388,7 +24866,7 @@ var TO220 = ({
|
|
|
24388
24866
|
center: [centerX, centerY, bodyBottom + bodyHeight / 2]
|
|
24389
24867
|
}
|
|
24390
24868
|
) }),
|
|
24391
|
-
/* @__PURE__ */ jsx169(Colorize87, { color: mouldedTab ? bodyColor : tabColor, children: /* @__PURE__ */
|
|
24869
|
+
/* @__PURE__ */ jsx169(Colorize87, { color: mouldedTab ? bodyColor : tabColor, children: /* @__PURE__ */ jsxs62(Subtract11, { children: [
|
|
24392
24870
|
/* @__PURE__ */ jsx169(
|
|
24393
24871
|
Cuboid40,
|
|
24394
24872
|
{
|
|
@@ -24415,7 +24893,7 @@ var TO220 = ({
|
|
|
24415
24893
|
};
|
|
24416
24894
|
|
|
24417
24895
|
// lib/SOT-457.tsx
|
|
24418
|
-
import { Fragment as Fragment65, jsx as jsx170, jsxs as
|
|
24896
|
+
import { Fragment as Fragment65, jsx as jsx170, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
24419
24897
|
var SOT457 = () => {
|
|
24420
24898
|
const fullWidth = 2.8;
|
|
24421
24899
|
const bodyWidth = 1.6;
|
|
@@ -24427,7 +24905,7 @@ var SOT457 = () => {
|
|
|
24427
24905
|
const padContactLength = 0.5;
|
|
24428
24906
|
const padPitch = 0.95;
|
|
24429
24907
|
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
24430
|
-
return /* @__PURE__ */
|
|
24908
|
+
return /* @__PURE__ */ jsxs63(Fragment65, { children: [
|
|
24431
24909
|
/* @__PURE__ */ jsx170(
|
|
24432
24910
|
SmdChipLead,
|
|
24433
24911
|
{
|
|
@@ -24548,7 +25026,7 @@ var SOT457 = () => {
|
|
|
24548
25026
|
|
|
24549
25027
|
// lib/SOT-963.tsx
|
|
24550
25028
|
import { Cuboid as Cuboid41 } from "jscad-fiber";
|
|
24551
|
-
import { Fragment as Fragment66, jsx as jsx171, jsxs as
|
|
25029
|
+
import { Fragment as Fragment66, jsx as jsx171, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
24552
25030
|
var SOT963 = () => {
|
|
24553
25031
|
const bodyWidth = 0.8;
|
|
24554
25032
|
const bodyLength10 = 1;
|
|
@@ -24559,7 +25037,7 @@ var SOT963 = () => {
|
|
|
24559
25037
|
const pitch = 0.35;
|
|
24560
25038
|
const pinsPerSide = 3;
|
|
24561
25039
|
const pinSpan = pitch * (pinsPerSide - 1);
|
|
24562
|
-
return /* @__PURE__ */
|
|
25040
|
+
return /* @__PURE__ */ jsxs64(Fragment66, { children: [
|
|
24563
25041
|
/* @__PURE__ */ jsx171(
|
|
24564
25042
|
ChipBody,
|
|
24565
25043
|
{
|
|
@@ -24618,9 +25096,9 @@ import {
|
|
|
24618
25096
|
Hull as Hull23,
|
|
24619
25097
|
Translate as Translate30,
|
|
24620
25098
|
Cylinder as Cylinder14,
|
|
24621
|
-
Subtract as
|
|
25099
|
+
Subtract as Subtract12
|
|
24622
25100
|
} from "jscad-fiber";
|
|
24623
|
-
import { Fragment as Fragment67, jsx as jsx172, jsxs as
|
|
25101
|
+
import { Fragment as Fragment67, jsx as jsx172, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
24624
25102
|
var TO92_DEFAULT_LEADS = [
|
|
24625
25103
|
{ x: -1.27, y: 0.98 },
|
|
24626
25104
|
{ x: 0, y: 2.25 },
|
|
@@ -24679,8 +25157,8 @@ var TO92 = ({
|
|
|
24679
25157
|
legWidth,
|
|
24680
25158
|
legThickness
|
|
24681
25159
|
];
|
|
24682
|
-
return /* @__PURE__ */
|
|
24683
|
-
/* @__PURE__ */ jsx172(Colorize88, { color: bodyColor, children: /* @__PURE__ */
|
|
25160
|
+
return /* @__PURE__ */ jsxs65(Fragment67, { children: [
|
|
25161
|
+
/* @__PURE__ */ jsx172(Colorize88, { color: bodyColor, children: /* @__PURE__ */ jsxs65(Subtract12, { children: [
|
|
24684
25162
|
/* @__PURE__ */ jsx172(
|
|
24685
25163
|
Translate30,
|
|
24686
25164
|
{
|
|
@@ -24702,8 +25180,8 @@ var TO92 = ({
|
|
|
24702
25180
|
] }) }),
|
|
24703
25181
|
leads.map((lead, index) => {
|
|
24704
25182
|
const exit = exitFor(index);
|
|
24705
|
-
return /* @__PURE__ */
|
|
24706
|
-
/* @__PURE__ */
|
|
25183
|
+
return /* @__PURE__ */ jsxs65(Translate30, { center: [0, 0, 0], children: [
|
|
25184
|
+
/* @__PURE__ */ jsxs65(Hull23, { children: [
|
|
24707
25185
|
/* @__PURE__ */ jsx172(Translate30, { center: [lead.x, lead.y, 0], children: /* @__PURE__ */ jsx172(Cuboid42, { size: leadSize }) }),
|
|
24708
25186
|
/* @__PURE__ */ jsx172(Translate30, { center: [exit.x, exit.y, standoff], children: /* @__PURE__ */ jsx172(Cuboid42, { size: leadSize }) })
|
|
24709
25187
|
] }),
|
|
@@ -24714,7 +25192,7 @@ var TO92 = ({
|
|
|
24714
25192
|
};
|
|
24715
25193
|
|
|
24716
25194
|
// lib/SOT-363.tsx
|
|
24717
|
-
import { Fragment as Fragment68, jsx as jsx173, jsxs as
|
|
25195
|
+
import { Fragment as Fragment68, jsx as jsx173, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
24718
25196
|
var SOT363 = () => {
|
|
24719
25197
|
const fullWidth = 2;
|
|
24720
25198
|
const bodyWidth = 1.25;
|
|
@@ -24725,7 +25203,7 @@ var SOT363 = () => {
|
|
|
24725
25203
|
const leadHeight = 0.85;
|
|
24726
25204
|
const padContactLength = 0.3;
|
|
24727
25205
|
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
24728
|
-
return /* @__PURE__ */
|
|
25206
|
+
return /* @__PURE__ */ jsxs66(Fragment68, { children: [
|
|
24729
25207
|
/* @__PURE__ */ jsx173(
|
|
24730
25208
|
SmdChipLead,
|
|
24731
25209
|
{
|
|
@@ -24847,7 +25325,7 @@ var SOT_363_default = SOT363;
|
|
|
24847
25325
|
|
|
24848
25326
|
// lib/SOT-886.tsx
|
|
24849
25327
|
import { Cuboid as Cuboid43 } from "jscad-fiber";
|
|
24850
|
-
import { Fragment as Fragment69, jsx as jsx174, jsxs as
|
|
25328
|
+
import { Fragment as Fragment69, jsx as jsx174, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
24851
25329
|
var SOT886 = () => {
|
|
24852
25330
|
const bodyWidth = 1;
|
|
24853
25331
|
const bodyLength10 = 1.45;
|
|
@@ -24858,7 +25336,7 @@ var SOT886 = () => {
|
|
|
24858
25336
|
const pitch = 0.5;
|
|
24859
25337
|
const pinsPerSide = 3;
|
|
24860
25338
|
const pinSpan = pitch * (pinsPerSide - 1);
|
|
24861
|
-
return /* @__PURE__ */
|
|
25339
|
+
return /* @__PURE__ */ jsxs67(Fragment69, { children: [
|
|
24862
25340
|
/* @__PURE__ */ jsx174(
|
|
24863
25341
|
ChipBody,
|
|
24864
25342
|
{
|
|
@@ -24907,7 +25385,7 @@ var SOT886 = () => {
|
|
|
24907
25385
|
|
|
24908
25386
|
// lib/sod-323.tsx
|
|
24909
25387
|
import { Colorize as Colorize89, Cuboid as Cuboid44 } from "jscad-fiber";
|
|
24910
|
-
import { Fragment as Fragment70, jsx as jsx175, jsxs as
|
|
25388
|
+
import { Fragment as Fragment70, jsx as jsx175, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
24911
25389
|
var SOD323 = () => {
|
|
24912
25390
|
const fullWidth = 2.5;
|
|
24913
25391
|
const bodyLength10 = 1.4;
|
|
@@ -24919,7 +25397,7 @@ var SOD323 = () => {
|
|
|
24919
25397
|
const padCenterX = bodyWidth / 2;
|
|
24920
25398
|
const bodyDistance = 0.45;
|
|
24921
25399
|
const leadHeight = 0.7;
|
|
24922
|
-
return /* @__PURE__ */
|
|
25400
|
+
return /* @__PURE__ */ jsxs68(Fragment70, { children: [
|
|
24923
25401
|
/* @__PURE__ */ jsx175(
|
|
24924
25402
|
SmdChipLead,
|
|
24925
25403
|
{
|
|
@@ -24979,7 +25457,7 @@ var SOD323 = () => {
|
|
|
24979
25457
|
|
|
24980
25458
|
// lib/sod-323F.tsx
|
|
24981
25459
|
import { Colorize as Colorize90, Cuboid as Cuboid45, Hull as Hull25, Translate as Translate32, Union as Union19 } from "jscad-fiber";
|
|
24982
|
-
import { Fragment as Fragment71, jsx as jsx176, jsxs as
|
|
25460
|
+
import { Fragment as Fragment71, jsx as jsx176, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
24983
25461
|
var SOD323F = () => {
|
|
24984
25462
|
const fullWidth = 1.7;
|
|
24985
25463
|
const bodyLength10 = 1.25;
|
|
@@ -24991,7 +25469,7 @@ var SOD323F = () => {
|
|
|
24991
25469
|
const rightPadCenterX = fullWidth / 2 + padLength / 2;
|
|
24992
25470
|
const taperOffset = 0.2;
|
|
24993
25471
|
const straightHeight = padThickness;
|
|
24994
|
-
return /* @__PURE__ */
|
|
25472
|
+
return /* @__PURE__ */ jsxs69(Fragment71, { children: [
|
|
24995
25473
|
/* @__PURE__ */ jsx176(
|
|
24996
25474
|
Cuboid45,
|
|
24997
25475
|
{
|
|
@@ -25008,9 +25486,9 @@ var SOD323F = () => {
|
|
|
25008
25486
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
25009
25487
|
}
|
|
25010
25488
|
),
|
|
25011
|
-
/* @__PURE__ */ jsx176(Colorize90, { color: "#222", children: /* @__PURE__ */
|
|
25489
|
+
/* @__PURE__ */ jsx176(Colorize90, { color: "#222", children: /* @__PURE__ */ jsxs69(Union19, { children: [
|
|
25012
25490
|
/* @__PURE__ */ jsx176(Translate32, { z: straightHeight / 2, children: /* @__PURE__ */ jsx176(Cuboid45, { size: [fullWidth, bodyLength10, straightHeight] }) }),
|
|
25013
|
-
/* @__PURE__ */
|
|
25491
|
+
/* @__PURE__ */ jsxs69(Hull25, { children: [
|
|
25014
25492
|
/* @__PURE__ */ jsx176(Translate32, { z: straightHeight, children: /* @__PURE__ */ jsx176(Cuboid45, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
25015
25493
|
/* @__PURE__ */ jsx176(Translate32, { z: bodyHeight, children: /* @__PURE__ */ jsx176(
|
|
25016
25494
|
Cuboid45,
|
|
@@ -25033,7 +25511,7 @@ var SOD323F = () => {
|
|
|
25033
25511
|
|
|
25034
25512
|
// lib/sod-323FL.tsx
|
|
25035
25513
|
import { Colorize as Colorize91, Cuboid as Cuboid46 } from "jscad-fiber";
|
|
25036
|
-
import { Fragment as Fragment72, jsx as jsx177, jsxs as
|
|
25514
|
+
import { Fragment as Fragment72, jsx as jsx177, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
25037
25515
|
var SOD323FL = () => {
|
|
25038
25516
|
const fullWidth = 1.775;
|
|
25039
25517
|
const bodyLength10 = 1.25;
|
|
@@ -25044,7 +25522,7 @@ var SOD323FL = () => {
|
|
|
25044
25522
|
const leftPadCenterX = -fullWidth / 2 - padLength / 2 + 0.04;
|
|
25045
25523
|
const rightPadCenterX = fullWidth / 2 + padLength / 2 - 0.04;
|
|
25046
25524
|
const taperOffset = 0.2;
|
|
25047
|
-
return /* @__PURE__ */
|
|
25525
|
+
return /* @__PURE__ */ jsxs70(Fragment72, { children: [
|
|
25048
25526
|
/* @__PURE__ */ jsx177(
|
|
25049
25527
|
Cuboid46,
|
|
25050
25528
|
{
|
|
@@ -25087,10 +25565,10 @@ var SOD323FL = () => {
|
|
|
25087
25565
|
|
|
25088
25566
|
// lib/AxialCapacitor.tsx
|
|
25089
25567
|
import { Colorize as Colorize92, Cylinder as Cylinder15, Rotate as Rotate13, Sphere as Sphere2, Translate as Translate34 } from "jscad-fiber";
|
|
25090
|
-
import { Fragment as Fragment73, jsx as jsx178, jsxs as
|
|
25568
|
+
import { Fragment as Fragment73, jsx as jsx178, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
25091
25569
|
var AxialCapacitor = ({ pitch = 10 }) => {
|
|
25092
25570
|
const heightToCenterOfCapacitor = 0.5 + 4 / 2;
|
|
25093
|
-
return /* @__PURE__ */
|
|
25571
|
+
return /* @__PURE__ */ jsxs71(Fragment73, { children: [
|
|
25094
25572
|
/* @__PURE__ */ jsx178(Cylinder15, { height: 4, radius: 0.5, center: [-pitch / 2, 0, 0.5] }),
|
|
25095
25573
|
/* @__PURE__ */ jsx178(
|
|
25096
25574
|
Sphere2,
|
|
@@ -25099,7 +25577,7 @@ var AxialCapacitor = ({ pitch = 10 }) => {
|
|
|
25099
25577
|
center: [-pitch / 2, 0, heightToCenterOfCapacitor]
|
|
25100
25578
|
}
|
|
25101
25579
|
),
|
|
25102
|
-
/* @__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: [
|
|
25103
25581
|
/* @__PURE__ */ jsx178(
|
|
25104
25582
|
Cylinder15,
|
|
25105
25583
|
{
|
|
@@ -25123,8 +25601,8 @@ var AxialCapacitor = ({ pitch = 10 }) => {
|
|
|
25123
25601
|
};
|
|
25124
25602
|
|
|
25125
25603
|
// lib/stampboard.tsx
|
|
25126
|
-
import { Colorize as Colorize93, Cuboid as Cuboid47, Cylinder as Cylinder16, Subtract as
|
|
25127
|
-
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";
|
|
25128
25606
|
var StampBoard = ({
|
|
25129
25607
|
bodyWidth = 21,
|
|
25130
25608
|
boardThickness = 0.5,
|
|
@@ -25222,7 +25700,7 @@ var StampBoard = ({
|
|
|
25222
25700
|
}
|
|
25223
25701
|
}
|
|
25224
25702
|
}
|
|
25225
|
-
const boardBody = /* @__PURE__ */ jsx179(Colorize93, { color: "#051a0a", children: /* @__PURE__ */
|
|
25703
|
+
const boardBody = /* @__PURE__ */ jsx179(Colorize93, { color: "#051a0a", children: /* @__PURE__ */ jsxs72(Subtract13, { children: [
|
|
25226
25704
|
/* @__PURE__ */ jsx179(
|
|
25227
25705
|
Cuboid47,
|
|
25228
25706
|
{
|
|
@@ -25257,9 +25735,9 @@ var StampBoard = ({
|
|
|
25257
25735
|
},
|
|
25258
25736
|
index
|
|
25259
25737
|
));
|
|
25260
|
-
return /* @__PURE__ */
|
|
25738
|
+
return /* @__PURE__ */ jsxs72(Fragment74, { children: [
|
|
25261
25739
|
boardBody,
|
|
25262
|
-
/* @__PURE__ */ jsx179(Colorize93, { color: "#FFD700", children: innerHoles ? /* @__PURE__ */
|
|
25740
|
+
/* @__PURE__ */ jsx179(Colorize93, { color: "#FFD700", children: innerHoles ? /* @__PURE__ */ jsxs72(Subtract13, { children: [
|
|
25263
25741
|
/* @__PURE__ */ jsx179(Union21, { children: pads.map((pad, index) => /* @__PURE__ */ jsx179(
|
|
25264
25742
|
Cuboid47,
|
|
25265
25743
|
{
|
|
@@ -25274,8 +25752,8 @@ var StampBoard = ({
|
|
|
25274
25752
|
};
|
|
25275
25753
|
|
|
25276
25754
|
// lib/MountedPcbModule.tsx
|
|
25277
|
-
import { Colorize as Colorize94, Cuboid as Cuboid48, Cylinder as Cylinder17, Subtract as
|
|
25278
|
-
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";
|
|
25279
25757
|
var MountedPcbModule = ({
|
|
25280
25758
|
numPins = 5,
|
|
25281
25759
|
rows = 1,
|
|
@@ -25376,7 +25854,7 @@ var MountedPcbModule = ({
|
|
|
25376
25854
|
const shortSidePinLength = 3;
|
|
25377
25855
|
const boardOffsetZ = nopin || female ? 0 : pinBodyHeight;
|
|
25378
25856
|
const boardTopZ = boardOffsetZ + boardThickness;
|
|
25379
|
-
const boardBody = /* @__PURE__ */ jsx180(Colorize94, { color: "#008080", children: /* @__PURE__ */
|
|
25857
|
+
const boardBody = /* @__PURE__ */ jsx180(Colorize94, { color: "#008080", children: /* @__PURE__ */ jsxs73(Subtract14, { children: [
|
|
25380
25858
|
/* @__PURE__ */ jsx180(
|
|
25381
25859
|
Cuboid48,
|
|
25382
25860
|
{
|
|
@@ -25403,7 +25881,7 @@ var MountedPcbModule = ({
|
|
|
25403
25881
|
`pin-hole-${index}`
|
|
25404
25882
|
))
|
|
25405
25883
|
] }) });
|
|
25406
|
-
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: [
|
|
25407
25885
|
/* @__PURE__ */ jsx180(
|
|
25408
25886
|
Cylinder17,
|
|
25409
25887
|
{
|
|
@@ -25443,7 +25921,7 @@ var MountedPcbModule = ({
|
|
|
25443
25921
|
},
|
|
25444
25922
|
`female-pin-3d-${index}`
|
|
25445
25923
|
));
|
|
25446
|
-
return /* @__PURE__ */
|
|
25924
|
+
return /* @__PURE__ */ jsxs73(Fragment75, { children: [
|
|
25447
25925
|
boardBody,
|
|
25448
25926
|
platedHoles,
|
|
25449
25927
|
!female && !nopin && headerPins,
|
|
@@ -25465,7 +25943,7 @@ var MountedPcbModule = ({
|
|
|
25465
25943
|
|
|
25466
25944
|
// lib/SOD723.tsx
|
|
25467
25945
|
import { Colorize as Colorize95, Cuboid as Cuboid49, Hull as Hull27, Translate as Translate35, Union as Union22 } from "jscad-fiber";
|
|
25468
|
-
import { Fragment as Fragment76, jsx as jsx181, jsxs as
|
|
25946
|
+
import { Fragment as Fragment76, jsx as jsx181, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
25469
25947
|
var SOD723 = () => {
|
|
25470
25948
|
const fullWidth = 1.4;
|
|
25471
25949
|
const bodyLength10 = 0.6;
|
|
@@ -25478,7 +25956,7 @@ var SOD723 = () => {
|
|
|
25478
25956
|
const rightPadCenterX = bodyWidth / 2 - padLength / 2 + 0.15;
|
|
25479
25957
|
const taperOffset = 0.2;
|
|
25480
25958
|
const straightHeight = bodyHeight * 0.24;
|
|
25481
|
-
return /* @__PURE__ */
|
|
25959
|
+
return /* @__PURE__ */ jsxs74(Fragment76, { children: [
|
|
25482
25960
|
/* @__PURE__ */ jsx181(
|
|
25483
25961
|
Cuboid49,
|
|
25484
25962
|
{
|
|
@@ -25495,9 +25973,9 @@ var SOD723 = () => {
|
|
|
25495
25973
|
center: [rightPadCenterX, 0, padThickness / 2]
|
|
25496
25974
|
}
|
|
25497
25975
|
),
|
|
25498
|
-
/* @__PURE__ */ jsx181(Colorize95, { color: "#222", children: /* @__PURE__ */
|
|
25976
|
+
/* @__PURE__ */ jsx181(Colorize95, { color: "#222", children: /* @__PURE__ */ jsxs74(Union22, { children: [
|
|
25499
25977
|
/* @__PURE__ */ jsx181(Translate35, { z: straightHeight / 2, children: /* @__PURE__ */ jsx181(Cuboid49, { size: [bodyWidth, bodyLength10, straightHeight] }) }),
|
|
25500
|
-
/* @__PURE__ */
|
|
25978
|
+
/* @__PURE__ */ jsxs74(Hull27, { children: [
|
|
25501
25979
|
/* @__PURE__ */ jsx181(Translate35, { z: straightHeight, children: /* @__PURE__ */ jsx181(Cuboid49, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
25502
25980
|
/* @__PURE__ */ jsx181(Translate35, { z: bodyHeight, children: /* @__PURE__ */ jsx181(
|
|
25503
25981
|
Cuboid49,
|
|
@@ -25525,10 +26003,10 @@ import {
|
|
|
25525
26003
|
Cuboid as Cuboid50,
|
|
25526
26004
|
Cylinder as Cylinder18,
|
|
25527
26005
|
Rotate as Rotate14,
|
|
25528
|
-
Subtract as
|
|
26006
|
+
Subtract as Subtract15,
|
|
25529
26007
|
Translate as Translate36
|
|
25530
26008
|
} from "jscad-fiber";
|
|
25531
|
-
import { Fragment as Fragment77, jsx as jsx182, jsxs as
|
|
26009
|
+
import { Fragment as Fragment77, jsx as jsx182, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
25532
26010
|
var JSTZH1_5mm = ({
|
|
25533
26011
|
numPins = 7,
|
|
25534
26012
|
showPins = true,
|
|
@@ -25544,13 +26022,13 @@ var JSTZH1_5mm = ({
|
|
|
25544
26022
|
const pinLength = 6;
|
|
25545
26023
|
const bodyWidth = (numPins - 1) * pitch + 4;
|
|
25546
26024
|
const startX = -((numPins - 1) * pitch) / 2;
|
|
25547
|
-
return /* @__PURE__ */
|
|
26025
|
+
return /* @__PURE__ */ jsxs75(Fragment77, { children: [
|
|
25548
26026
|
/* @__PURE__ */ jsx182(Translate36, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx182(Rotate14, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx182(
|
|
25549
26027
|
Colorize96,
|
|
25550
26028
|
{
|
|
25551
26029
|
material: componentMaterials.moldedPlastic,
|
|
25552
26030
|
color: bodyColor,
|
|
25553
|
-
children: /* @__PURE__ */
|
|
26031
|
+
children: /* @__PURE__ */ jsxs75(Subtract15, { children: [
|
|
25554
26032
|
/* @__PURE__ */ jsx182(
|
|
25555
26033
|
Cuboid50,
|
|
25556
26034
|
{
|
|
@@ -25702,10 +26180,10 @@ import {
|
|
|
25702
26180
|
Cuboid as Cuboid51,
|
|
25703
26181
|
Cylinder as Cylinder19,
|
|
25704
26182
|
Rotate as Rotate15,
|
|
25705
|
-
Subtract as
|
|
26183
|
+
Subtract as Subtract16,
|
|
25706
26184
|
Translate as Translate37
|
|
25707
26185
|
} from "jscad-fiber";
|
|
25708
|
-
import { Fragment as Fragment78, jsx as jsx183, jsxs as
|
|
26186
|
+
import { Fragment as Fragment78, jsx as jsx183, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
25709
26187
|
var JSTPH2_0mm = ({
|
|
25710
26188
|
numPins = 2,
|
|
25711
26189
|
showPins = true,
|
|
@@ -25729,13 +26207,13 @@ var JSTPH2_0mm = ({
|
|
|
25729
26207
|
const latchWindowInset = 0.7;
|
|
25730
26208
|
const topReliefWidth = 0.8;
|
|
25731
26209
|
const topReliefDepth = 0.65;
|
|
25732
|
-
return /* @__PURE__ */
|
|
26210
|
+
return /* @__PURE__ */ jsxs76(Fragment78, { children: [
|
|
25733
26211
|
/* @__PURE__ */ jsx183(Translate37, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx183(Rotate15, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx183(
|
|
25734
26212
|
Colorize97,
|
|
25735
26213
|
{
|
|
25736
26214
|
color: bodyColor,
|
|
25737
26215
|
material: componentMaterials.moldedPlastic,
|
|
25738
|
-
children: /* @__PURE__ */
|
|
26216
|
+
children: /* @__PURE__ */ jsxs76(Subtract16, { children: [
|
|
25739
26217
|
/* @__PURE__ */ jsx183(
|
|
25740
26218
|
Cuboid51,
|
|
25741
26219
|
{
|
|
@@ -25903,9 +26381,9 @@ var JSTPH2_0mm = ({
|
|
|
25903
26381
|
};
|
|
25904
26382
|
|
|
25905
26383
|
// lib/JSTXH2_5mm.tsx
|
|
25906
|
-
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";
|
|
25907
26385
|
import { fp as fp3 } from "@tscircuit/footprinter";
|
|
25908
|
-
import { Fragment as Fragment79, jsx as jsx184, jsxs as
|
|
26386
|
+
import { Fragment as Fragment79, jsx as jsx184, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
25909
26387
|
var JSTXH2_5mm = ({
|
|
25910
26388
|
numPins = 4,
|
|
25911
26389
|
showPins = true,
|
|
@@ -25933,8 +26411,8 @@ var JSTXH2_5mm = ({
|
|
|
25933
26411
|
Math.max(3, (numPins - 1) * pitch * 0.4 + 2.2)
|
|
25934
26412
|
);
|
|
25935
26413
|
const lockNotchHeight = 2.4;
|
|
25936
|
-
return /* @__PURE__ */
|
|
25937
|
-
/* @__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: [
|
|
25938
26416
|
/* @__PURE__ */ jsx184(Cuboid52, { size: [bodyWidth, bodyDepth, bodyHeight] }),
|
|
25939
26417
|
/* @__PURE__ */ jsx184(Translate38, { offset: [0, 0, (bodyHeight - hollowHeight) / 2 + 0.1], children: /* @__PURE__ */ jsx184(
|
|
25940
26418
|
Cuboid52,
|
|
@@ -26067,8 +26545,8 @@ var mm2 = (n) => {
|
|
|
26067
26545
|
};
|
|
26068
26546
|
|
|
26069
26547
|
// lib/JstSh.tsx
|
|
26070
|
-
import { Colorize as Colorize99, Cuboid as Cuboid53, Rotate as Rotate16, Subtract as
|
|
26071
|
-
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";
|
|
26072
26550
|
function isJstShFootprint(footprint) {
|
|
26073
26551
|
const p = fp4.string(footprint).json();
|
|
26074
26552
|
if (p.fn !== "jst") return false;
|
|
@@ -26096,8 +26574,8 @@ var JstSh = ({ footprint = "jst6_sh" }) => {
|
|
|
26096
26574
|
const direction = mounts[0].y > rowY ? 1 : -1;
|
|
26097
26575
|
const y = rowY + direction * 1.8, width10 = n + 2, depth = 2.9, height10 = 4.2;
|
|
26098
26576
|
const pinY = y - direction * 0.25;
|
|
26099
|
-
return /* @__PURE__ */
|
|
26100
|
-
/* @__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: [
|
|
26101
26579
|
/* @__PURE__ */ jsx185(
|
|
26102
26580
|
Cuboid53,
|
|
26103
26581
|
{
|
|
@@ -26133,10 +26611,10 @@ var JstSh = ({ footprint = "jst6_sh" }) => {
|
|
|
26133
26611
|
side
|
|
26134
26612
|
))
|
|
26135
26613
|
] }) }),
|
|
26136
|
-
/* @__PURE__ */
|
|
26614
|
+
/* @__PURE__ */ jsxs78(Colorize99, { material: componentMaterials.tinnedLead, color: "#c6c7c9", children: [
|
|
26137
26615
|
signals.map((pad, i) => {
|
|
26138
26616
|
const tailY = pad.y - direction * pad.height * 0.4;
|
|
26139
|
-
return /* @__PURE__ */
|
|
26617
|
+
return /* @__PURE__ */ jsxs78(Union23, { children: [
|
|
26140
26618
|
/* @__PURE__ */ jsx185(
|
|
26141
26619
|
Cuboid53,
|
|
26142
26620
|
{
|
|
@@ -26147,7 +26625,7 @@ var JstSh = ({ footprint = "jst6_sh" }) => {
|
|
|
26147
26625
|
/* @__PURE__ */ jsx185(Cuboid53, { size: [0.2, 0.2, 3.45], center: [pad.x, pinY, 1.725] })
|
|
26148
26626
|
] }, i);
|
|
26149
26627
|
}),
|
|
26150
|
-
mounts.map((pad, i) => /* @__PURE__ */
|
|
26628
|
+
mounts.map((pad, i) => /* @__PURE__ */ jsxs78(Union23, { children: [
|
|
26151
26629
|
/* @__PURE__ */ jsx185(
|
|
26152
26630
|
Cuboid53,
|
|
26153
26631
|
{
|
|
@@ -26174,10 +26652,10 @@ import {
|
|
|
26174
26652
|
Cylinder as Cylinder20,
|
|
26175
26653
|
Rotate as Rotate17,
|
|
26176
26654
|
RoundedCuboid as RoundedCuboid5,
|
|
26177
|
-
Subtract as
|
|
26655
|
+
Subtract as Subtract19,
|
|
26178
26656
|
Translate as Translate39
|
|
26179
26657
|
} from "jscad-fiber";
|
|
26180
|
-
import { Fragment as Fragment80, jsx as jsx186, jsxs as
|
|
26658
|
+
import { Fragment as Fragment80, jsx as jsx186, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
26181
26659
|
var HOUSING_COLOR = "#303339";
|
|
26182
26660
|
var HOUSING_SHADOW = "#1f2227";
|
|
26183
26661
|
var ACTUATOR_COLOR = "#eee8d8";
|
|
@@ -26264,7 +26742,7 @@ var FPC = ({
|
|
|
26264
26742
|
const clipCapX = bodyWidth / 2 - 0.23;
|
|
26265
26743
|
const sideBossX = bodyWidth / 2 - 0.32;
|
|
26266
26744
|
const sideBossWidth = 0.68;
|
|
26267
|
-
return /* @__PURE__ */
|
|
26745
|
+
return /* @__PURE__ */ jsxs79(Fragment80, { children: [
|
|
26268
26746
|
[-1, 1].map((direction) => /* @__PURE__ */ jsx186(
|
|
26269
26747
|
Cuboid54,
|
|
26270
26748
|
{
|
|
@@ -26292,7 +26770,7 @@ var FPC = ({
|
|
|
26292
26770
|
roundRadius: 0.1
|
|
26293
26771
|
}
|
|
26294
26772
|
),
|
|
26295
|
-
/* @__PURE__ */ jsx186(Colorize100, { color: HOUSING_COLOR, children: /* @__PURE__ */
|
|
26773
|
+
/* @__PURE__ */ jsx186(Colorize100, { color: HOUSING_COLOR, children: /* @__PURE__ */ jsxs79(Subtract19, { children: [
|
|
26296
26774
|
/* @__PURE__ */ jsx186(
|
|
26297
26775
|
RoundedCuboid5,
|
|
26298
26776
|
{
|
|
@@ -26444,7 +26922,7 @@ var FPC = ({
|
|
|
26444
26922
|
|
|
26445
26923
|
// lib/SmdPinHeader.tsx
|
|
26446
26924
|
import { Colorize as Colorize101, Cuboid as Cuboid55, Hull as Hull28, Translate as Translate40 } from "jscad-fiber";
|
|
26447
|
-
import { Fragment as Fragment81, jsx as jsx187, jsxs as
|
|
26925
|
+
import { Fragment as Fragment81, jsx as jsx187, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
26448
26926
|
var SmdPinHeader = ({
|
|
26449
26927
|
numberOfPins,
|
|
26450
26928
|
pitch = 2.54,
|
|
@@ -26464,7 +26942,7 @@ var SmdPinHeader = ({
|
|
|
26464
26942
|
const tailDirection = index % 2 === 0 ? 1 : -1;
|
|
26465
26943
|
const postBodyLength = matingPinLength - tipChamferHeight;
|
|
26466
26944
|
const verticalTailLength = standoffHeight - pinThickness / 2;
|
|
26467
|
-
return /* @__PURE__ */
|
|
26945
|
+
return /* @__PURE__ */ jsxs80(Translate40, { x, children: [
|
|
26468
26946
|
/* @__PURE__ */ jsx187(
|
|
26469
26947
|
Cuboid55,
|
|
26470
26948
|
{
|
|
@@ -26473,7 +26951,7 @@ var SmdPinHeader = ({
|
|
|
26473
26951
|
center: [0, 0, standoffHeight + bodyHeight / 2]
|
|
26474
26952
|
}
|
|
26475
26953
|
),
|
|
26476
|
-
/* @__PURE__ */
|
|
26954
|
+
/* @__PURE__ */ jsxs80(Colorize101, { color: "#d4af37", children: [
|
|
26477
26955
|
/* @__PURE__ */ jsx187(
|
|
26478
26956
|
Cuboid55,
|
|
26479
26957
|
{
|
|
@@ -26495,7 +26973,7 @@ var SmdPinHeader = ({
|
|
|
26495
26973
|
center: [0, 0, bodyTop + postBodyLength / 2]
|
|
26496
26974
|
}
|
|
26497
26975
|
),
|
|
26498
|
-
/* @__PURE__ */
|
|
26976
|
+
/* @__PURE__ */ jsxs80(Hull28, { children: [
|
|
26499
26977
|
/* @__PURE__ */ jsx187(
|
|
26500
26978
|
Cuboid55,
|
|
26501
26979
|
{
|
|
@@ -26545,7 +27023,7 @@ var getSmtPadRects = (footprint) => {
|
|
|
26545
27023
|
};
|
|
26546
27024
|
|
|
26547
27025
|
// lib/GullWingBody.tsx
|
|
26548
|
-
import { Fragment as Fragment82, jsx as jsx188, jsxs as
|
|
27026
|
+
import { Fragment as Fragment82, jsx as jsx188, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
26549
27027
|
var GullWingBody = ({
|
|
26550
27028
|
bodyWidth,
|
|
26551
27029
|
bodyLength: bodyLength10,
|
|
@@ -26557,7 +27035,7 @@ var GullWingBody = ({
|
|
|
26557
27035
|
const centerX = pads.reduce((sum, pad) => sum + pad.x, 0) / (pads.length || 1);
|
|
26558
27036
|
const centerY = pads.reduce((sum, pad) => sum + pad.y, 0) / (pads.length || 1);
|
|
26559
27037
|
const leadHeight = bodyHeight * leadHeightRatio;
|
|
26560
|
-
return /* @__PURE__ */
|
|
27038
|
+
return /* @__PURE__ */ jsxs81(Fragment82, { children: [
|
|
26561
27039
|
/* @__PURE__ */ jsx188(
|
|
26562
27040
|
ChipBody,
|
|
26563
27041
|
{
|
|
@@ -26597,7 +27075,7 @@ var GullWingBody = ({
|
|
|
26597
27075
|
|
|
26598
27076
|
// lib/ParametricChip.tsx
|
|
26599
27077
|
import { Cuboid as Cuboid56 } from "jscad-fiber";
|
|
26600
|
-
import { Fragment as Fragment83, jsx as jsx189, jsxs as
|
|
27078
|
+
import { Fragment as Fragment83, jsx as jsx189, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
26601
27079
|
var ParametricChip = ({
|
|
26602
27080
|
padPitch,
|
|
26603
27081
|
padHeight,
|
|
@@ -26608,7 +27086,7 @@ var ParametricChip = ({
|
|
|
26608
27086
|
const height10 = width10;
|
|
26609
27087
|
const terminatorWidth9 = fullLength10 * 0.2;
|
|
26610
27088
|
const bodyLength10 = fullLength10 - terminatorWidth9 * 2;
|
|
26611
|
-
return /* @__PURE__ */
|
|
27089
|
+
return /* @__PURE__ */ jsxs82(Fragment83, { children: [
|
|
26612
27090
|
/* @__PURE__ */ jsx189(
|
|
26613
27091
|
Cuboid56,
|
|
26614
27092
|
{
|
|
@@ -26645,10 +27123,10 @@ import {
|
|
|
26645
27123
|
Cuboid as Cuboid57,
|
|
26646
27124
|
Cylinder as Cylinder21,
|
|
26647
27125
|
Rotate as Rotate18,
|
|
26648
|
-
Subtract as
|
|
27126
|
+
Subtract as Subtract20,
|
|
26649
27127
|
Translate as Translate41
|
|
26650
27128
|
} from "jscad-fiber";
|
|
26651
|
-
import { Fragment as Fragment84, jsx as jsx190, jsxs as
|
|
27129
|
+
import { Fragment as Fragment84, jsx as jsx190, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
26652
27130
|
var Led5050 = ({
|
|
26653
27131
|
color = "#ffff00",
|
|
26654
27132
|
bodyColor = "#ffffff",
|
|
@@ -26669,7 +27147,7 @@ var Led5050 = ({
|
|
|
26669
27147
|
const cornerCutDepth = 0.3;
|
|
26670
27148
|
const leadYPositions = [-1.7, 0, 1.7];
|
|
26671
27149
|
const leadSides = [-1, 1];
|
|
26672
|
-
return /* @__PURE__ */
|
|
27150
|
+
return /* @__PURE__ */ jsxs83(Fragment84, { children: [
|
|
26673
27151
|
leadYPositions.flatMap(
|
|
26674
27152
|
(y) => leadSides.map((side) => /* @__PURE__ */ jsx190(
|
|
26675
27153
|
Cuboid57,
|
|
@@ -26681,7 +27159,7 @@ var Led5050 = ({
|
|
|
26681
27159
|
`${side}-${y}`
|
|
26682
27160
|
))
|
|
26683
27161
|
),
|
|
26684
|
-
/* @__PURE__ */ jsx190(Colorize102, { color: bodyColor, children: /* @__PURE__ */
|
|
27162
|
+
/* @__PURE__ */ jsx190(Colorize102, { color: bodyColor, children: /* @__PURE__ */ jsxs83(Subtract20, { children: [
|
|
26685
27163
|
/* @__PURE__ */ jsx190(
|
|
26686
27164
|
ChipBody,
|
|
26687
27165
|
{
|
|
@@ -26730,7 +27208,7 @@ var Led5050 = ({
|
|
|
26730
27208
|
|
|
26731
27209
|
// lib/Led2835.tsx
|
|
26732
27210
|
import { Colorize as Colorize103, Cuboid as Cuboid58 } from "jscad-fiber";
|
|
26733
|
-
import { Fragment as Fragment85, jsx as jsx191, jsxs as
|
|
27211
|
+
import { Fragment as Fragment85, jsx as jsx191, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
26734
27212
|
var Led2835 = ({
|
|
26735
27213
|
bodyWidth = 3.5,
|
|
26736
27214
|
bodyLength: bodyLength10 = 2.8,
|
|
@@ -26749,7 +27227,7 @@ var Led2835 = ({
|
|
|
26749
27227
|
const bodyCenterX = (pad1X + pad2X) / 2;
|
|
26750
27228
|
const lensWidth = bodyWidth * 0.55;
|
|
26751
27229
|
const lensLength = bodyLength10 * 0.55;
|
|
26752
|
-
return /* @__PURE__ */
|
|
27230
|
+
return /* @__PURE__ */ jsxs84(Fragment85, { children: [
|
|
26753
27231
|
[
|
|
26754
27232
|
{ x: pad1X, w: pad1Width, key: "pad-1" },
|
|
26755
27233
|
{ x: pad2X, w: pad2Width, key: "pad-2" }
|
|
@@ -26788,10 +27266,10 @@ import {
|
|
|
26788
27266
|
Cylinder as Cylinder22,
|
|
26789
27267
|
Rotate as Rotate19,
|
|
26790
27268
|
RoundedCuboid as RoundedCuboid6,
|
|
26791
|
-
Subtract as
|
|
27269
|
+
Subtract as Subtract21,
|
|
26792
27270
|
Translate as Translate42
|
|
26793
27271
|
} from "jscad-fiber";
|
|
26794
|
-
import { Fragment as Fragment86, jsx as jsx192, jsxs as
|
|
27272
|
+
import { Fragment as Fragment86, jsx as jsx192, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
26795
27273
|
var range2 = (length32) => Array.from({ length: length32 }, (_, index) => index);
|
|
26796
27274
|
var RJ45 = ({
|
|
26797
27275
|
bodyWidth = 16.26,
|
|
@@ -26849,9 +27327,9 @@ var RJ45 = ({
|
|
|
26849
27327
|
const contactY = frontY - frontDirection * Math.max(cavityDepth * 0.48, 1.2);
|
|
26850
27328
|
const contactZ = openingCenterZ + openingHeight * 0.18;
|
|
26851
27329
|
const frontLipY = frontY + frontDirection * shellThickness * 0.2;
|
|
26852
|
-
return /* @__PURE__ */
|
|
26853
|
-
/* @__PURE__ */
|
|
26854
|
-
/* @__PURE__ */
|
|
27330
|
+
return /* @__PURE__ */ jsxs85(Fragment86, { children: [
|
|
27331
|
+
/* @__PURE__ */ jsxs85(Colorize104, { color: shellColor, children: [
|
|
27332
|
+
/* @__PURE__ */ jsxs85(Subtract21, { children: [
|
|
26855
27333
|
/* @__PURE__ */ jsx192(
|
|
26856
27334
|
Cuboid59,
|
|
26857
27335
|
{
|
|
@@ -26903,8 +27381,8 @@ var RJ45 = ({
|
|
|
26903
27381
|
`top-seam:${direction}`
|
|
26904
27382
|
))
|
|
26905
27383
|
] }),
|
|
26906
|
-
/* @__PURE__ */
|
|
26907
|
-
/* @__PURE__ */
|
|
27384
|
+
/* @__PURE__ */ jsxs85(Colorize104, { color: housingColor, children: [
|
|
27385
|
+
/* @__PURE__ */ jsxs85(Subtract21, { children: [
|
|
26908
27386
|
/* @__PURE__ */ jsx192(
|
|
26909
27387
|
RoundedCuboid6,
|
|
26910
27388
|
{
|
|
@@ -26958,7 +27436,7 @@ var RJ45 = ({
|
|
|
26958
27436
|
`locator:${direction}`
|
|
26959
27437
|
))
|
|
26960
27438
|
] }),
|
|
26961
|
-
/* @__PURE__ */
|
|
27439
|
+
/* @__PURE__ */ jsxs85(Colorize104, { color: contactColor, children: [
|
|
26962
27440
|
signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */ jsx192(
|
|
26963
27441
|
Cylinder22,
|
|
26964
27442
|
{
|
|
@@ -26996,7 +27474,7 @@ var RJ45 = ({
|
|
|
26996
27474
|
`led-lead:${index}`
|
|
26997
27475
|
))
|
|
26998
27476
|
] }),
|
|
26999
|
-
ledPins && /* @__PURE__ */
|
|
27477
|
+
ledPins && /* @__PURE__ */ jsxs85(Fragment86, { children: [
|
|
27000
27478
|
/* @__PURE__ */ jsx192(
|
|
27001
27479
|
RoundedCuboid6,
|
|
27002
27480
|
{
|
|
@@ -27029,7 +27507,7 @@ var RJ45 = ({
|
|
|
27029
27507
|
|
|
27030
27508
|
// lib/DPAK.tsx
|
|
27031
27509
|
import { Colorize as Colorize105, Cuboid as Cuboid60, Hull as Hull29 } from "jscad-fiber";
|
|
27032
|
-
import { Fragment as Fragment87, jsx as jsx193, jsxs as
|
|
27510
|
+
import { Fragment as Fragment87, jsx as jsx193, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
27033
27511
|
var DPAK = ({
|
|
27034
27512
|
bodyWidth = 6.1,
|
|
27035
27513
|
bodyLength: bodyLength10 = 6.5,
|
|
@@ -27051,7 +27529,7 @@ var DPAK = ({
|
|
|
27051
27529
|
const bodyFrontX = bodyCenterX - bodyWidth / 2;
|
|
27052
27530
|
const leadZ = tabThickness / 2;
|
|
27053
27531
|
const leadThickness = 0.4;
|
|
27054
|
-
return /* @__PURE__ */
|
|
27532
|
+
return /* @__PURE__ */ jsxs86(Fragment87, { children: [
|
|
27055
27533
|
/* @__PURE__ */ jsx193(Colorize105, { material: componentMaterials.tinnedLead, color: tabColor, children: /* @__PURE__ */ jsx193(
|
|
27056
27534
|
Cuboid60,
|
|
27057
27535
|
{
|
|
@@ -27067,7 +27545,7 @@ var DPAK = ({
|
|
|
27067
27545
|
}
|
|
27068
27546
|
) }),
|
|
27069
27547
|
[-1, 1].map((side) => {
|
|
27070
|
-
return /* @__PURE__ */
|
|
27548
|
+
return /* @__PURE__ */ jsxs86(
|
|
27071
27549
|
Colorize105,
|
|
27072
27550
|
{
|
|
27073
27551
|
material: componentMaterials.tinnedLead,
|
|
@@ -27084,7 +27562,7 @@ var DPAK = ({
|
|
|
27084
27562
|
]
|
|
27085
27563
|
}
|
|
27086
27564
|
),
|
|
27087
|
-
/* @__PURE__ */
|
|
27565
|
+
/* @__PURE__ */ jsxs86(Hull29, { children: [
|
|
27088
27566
|
/* @__PURE__ */ jsx193(
|
|
27089
27567
|
Cuboid60,
|
|
27090
27568
|
{
|
|
@@ -27118,9 +27596,9 @@ import {
|
|
|
27118
27596
|
Cuboid as Cuboid61,
|
|
27119
27597
|
Cylinder as Cylinder23,
|
|
27120
27598
|
RoundedCylinder as RoundedCylinder5,
|
|
27121
|
-
Subtract as
|
|
27599
|
+
Subtract as Subtract22
|
|
27122
27600
|
} from "jscad-fiber";
|
|
27123
|
-
import { Fragment as Fragment88, jsx as jsx194, jsxs as
|
|
27601
|
+
import { Fragment as Fragment88, jsx as jsx194, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
27124
27602
|
var ElectrolyticCapacitor = ({
|
|
27125
27603
|
diameter = 6.3,
|
|
27126
27604
|
heightToDiameterRatio = 1.4,
|
|
@@ -27138,7 +27616,7 @@ var ElectrolyticCapacitor = ({
|
|
|
27138
27616
|
const canTop = canBottom + canHeight;
|
|
27139
27617
|
const grooveWidth = Math.max(diameter * 0.06, 0.2);
|
|
27140
27618
|
const grooveDepth = 0.3;
|
|
27141
|
-
return /* @__PURE__ */
|
|
27619
|
+
return /* @__PURE__ */ jsxs87(Fragment88, { children: [
|
|
27142
27620
|
/* @__PURE__ */ jsx194(Colorize106, { color: baseColor, material: componentMaterials.rubber, children: /* @__PURE__ */ jsx194(
|
|
27143
27621
|
Cylinder23,
|
|
27144
27622
|
{
|
|
@@ -27147,7 +27625,7 @@ var ElectrolyticCapacitor = ({
|
|
|
27147
27625
|
center: [0, 0, baseHeight / 2]
|
|
27148
27626
|
}
|
|
27149
27627
|
) }),
|
|
27150
|
-
/* @__PURE__ */ jsx194(Colorize106, { color: sleeveColor, material: componentMaterials.sleeve, children: /* @__PURE__ */
|
|
27628
|
+
/* @__PURE__ */ jsx194(Colorize106, { color: sleeveColor, material: componentMaterials.sleeve, children: /* @__PURE__ */ jsxs87(Subtract22, { children: [
|
|
27151
27629
|
/* @__PURE__ */ jsx194(
|
|
27152
27630
|
RoundedCylinder5,
|
|
27153
27631
|
{
|
|
@@ -27192,8 +27670,8 @@ var ElectrolyticCapacitor = ({
|
|
|
27192
27670
|
};
|
|
27193
27671
|
|
|
27194
27672
|
// lib/Potentiometer.tsx
|
|
27195
|
-
import { Colorize as Colorize107, Cuboid as Cuboid62, Cylinder as Cylinder24, Subtract as
|
|
27196
|
-
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";
|
|
27197
27675
|
var Potentiometer = ({
|
|
27198
27676
|
bodyWidth = 5.35,
|
|
27199
27677
|
bodyLength: bodyLength10 = 14,
|
|
@@ -27211,7 +27689,7 @@ var Potentiometer = ({
|
|
|
27211
27689
|
const adjusterHeight = 0.8;
|
|
27212
27690
|
const adjusterZ = bodyHeight + adjusterHeight / 2;
|
|
27213
27691
|
const slotWidth = Math.max(adjusterDiameter * 0.16, 0.3);
|
|
27214
|
-
return /* @__PURE__ */
|
|
27692
|
+
return /* @__PURE__ */ jsxs88(Fragment89, { children: [
|
|
27215
27693
|
/* @__PURE__ */ jsx195(Colorize107, { color: bodyColor, children: /* @__PURE__ */ jsx195(
|
|
27216
27694
|
Cuboid62,
|
|
27217
27695
|
{
|
|
@@ -27219,7 +27697,7 @@ var Potentiometer = ({
|
|
|
27219
27697
|
center: [bodyCenterX, 0, bodyHeight / 2]
|
|
27220
27698
|
}
|
|
27221
27699
|
) }),
|
|
27222
|
-
/* @__PURE__ */ jsx195(Colorize107, { color: adjusterColor, children: /* @__PURE__ */
|
|
27700
|
+
/* @__PURE__ */ jsx195(Colorize107, { color: adjusterColor, children: /* @__PURE__ */ jsxs88(Subtract23, { children: [
|
|
27223
27701
|
/* @__PURE__ */ jsx195(
|
|
27224
27702
|
Cylinder24,
|
|
27225
27703
|
{
|
|
@@ -27257,7 +27735,7 @@ var Potentiometer = ({
|
|
|
27257
27735
|
|
|
27258
27736
|
// lib/SmdPushButton.tsx
|
|
27259
27737
|
import { Colorize as Colorize108, Cuboid as Cuboid63, Cylinder as Cylinder25 } from "jscad-fiber";
|
|
27260
|
-
import { Fragment as Fragment90, jsx as jsx196, jsxs as
|
|
27738
|
+
import { Fragment as Fragment90, jsx as jsx196, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
27261
27739
|
var SmdPushButton = ({
|
|
27262
27740
|
bodyWidth = 2.9,
|
|
27263
27741
|
bodyLength: bodyLength10 = 3,
|
|
@@ -27273,7 +27751,7 @@ var SmdPushButton = ({
|
|
|
27273
27751
|
leadColor = "#cccccc"
|
|
27274
27752
|
}) => {
|
|
27275
27753
|
const leadThickness = 0.15;
|
|
27276
|
-
return /* @__PURE__ */
|
|
27754
|
+
return /* @__PURE__ */ jsxs89(Fragment90, { children: [
|
|
27277
27755
|
/* @__PURE__ */ jsx196(Colorize108, { color: bodyColor, children: /* @__PURE__ */ jsx196(
|
|
27278
27756
|
Cuboid63,
|
|
27279
27757
|
{
|
|
@@ -27307,8 +27785,8 @@ var SmdPushButton = ({
|
|
|
27307
27785
|
|
|
27308
27786
|
// lib/SmdSlideSwitch.tsx
|
|
27309
27787
|
import { fp as fp7 } from "@tscircuit/footprinter";
|
|
27310
|
-
import { Colorize as Colorize109, Cuboid as Cuboid64, Cylinder as Cylinder26, Rotate as Rotate20, Subtract as
|
|
27311
|
-
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";
|
|
27312
27790
|
var SmdSlideSwitch = ({
|
|
27313
27791
|
footprint = "smdslideswitch7",
|
|
27314
27792
|
position = 0
|
|
@@ -27326,8 +27804,8 @@ var SmdSlideSwitch = ({
|
|
|
27326
27804
|
throw new Error("SmdSlideSwitch needs signal pads and four mounting pads");
|
|
27327
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);
|
|
27328
27806
|
const width10 = params.mpx - 0.5, depth = 2.7, height10 = params.mpx > 6 ? 1.5 : 1.4, y = params.mounty;
|
|
27329
|
-
return /* @__PURE__ */
|
|
27330
|
-
/* @__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: [
|
|
27331
27809
|
/* @__PURE__ */ jsx197(Cuboid64, { size: [width10, depth, height10], center: [0, y, height10 / 2] }),
|
|
27332
27810
|
/* @__PURE__ */ jsx197(
|
|
27333
27811
|
Cuboid64,
|
|
@@ -27338,7 +27816,7 @@ var SmdSlideSwitch = ({
|
|
|
27338
27816
|
),
|
|
27339
27817
|
/* @__PURE__ */ jsx197(Cuboid64, { size: [2.7, 0.5, 0.9], center: [0, y - depth / 2, 0.65] })
|
|
27340
27818
|
] }) }),
|
|
27341
|
-
/* @__PURE__ */
|
|
27819
|
+
/* @__PURE__ */ jsxs90(Colorize109, { color: "#28292c", children: [
|
|
27342
27820
|
/* @__PURE__ */ jsx197(
|
|
27343
27821
|
Cuboid64,
|
|
27344
27822
|
{
|
|
@@ -27387,7 +27865,7 @@ var SmdSlideSwitch = ({
|
|
|
27387
27865
|
|
|
27388
27866
|
// lib/SOT-563.tsx
|
|
27389
27867
|
import { Cuboid as Cuboid65, Translate as Translate44, Rotate as Rotate21, Colorize as Colorize110 } from "jscad-fiber";
|
|
27390
|
-
import { Fragment as Fragment91, jsx as jsx198, jsxs as
|
|
27868
|
+
import { Fragment as Fragment91, jsx as jsx198, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
27391
27869
|
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
27392
27870
|
const bodyWidth = 1.2;
|
|
27393
27871
|
const bodyLength10 = 1.6;
|
|
@@ -27397,7 +27875,7 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
27397
27875
|
const leadHeight = 0.13;
|
|
27398
27876
|
const leadSpacing = 0.5;
|
|
27399
27877
|
const bodyZOffset = -0.4;
|
|
27400
|
-
return /* @__PURE__ */
|
|
27878
|
+
return /* @__PURE__ */ jsxs91(Fragment91, { children: [
|
|
27401
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] }) }) }) }),
|
|
27402
27880
|
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
27403
27881
|
// Left lead
|
|
@@ -27434,10 +27912,10 @@ import {
|
|
|
27434
27912
|
Cylinder as Cylinder27,
|
|
27435
27913
|
Hull as Hull30,
|
|
27436
27914
|
Rotate as Rotate22,
|
|
27437
|
-
Subtract as
|
|
27915
|
+
Subtract as Subtract25,
|
|
27438
27916
|
Translate as Translate45
|
|
27439
27917
|
} from "jscad-fiber";
|
|
27440
|
-
import { jsx as jsx199, jsxs as
|
|
27918
|
+
import { jsx as jsx199, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
27441
27919
|
var Capsule = ({
|
|
27442
27920
|
width: width10,
|
|
27443
27921
|
height: height10,
|
|
@@ -27465,8 +27943,8 @@ var UsbCMidmount = ({
|
|
|
27465
27943
|
"UsbCMidmount requires four mounting slots and a positive body depth"
|
|
27466
27944
|
);
|
|
27467
27945
|
const tabBottom = -0.9, tabTop = centerZ + 0.1;
|
|
27468
|
-
return /* @__PURE__ */
|
|
27469
|
-
/* @__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: [
|
|
27470
27948
|
/* @__PURE__ */ jsx199(Capsule, { width: width10, height: height10, depth }),
|
|
27471
27949
|
/* @__PURE__ */ jsx199(
|
|
27472
27950
|
Capsule,
|
|
@@ -27477,7 +27955,7 @@ var UsbCMidmount = ({
|
|
|
27477
27955
|
}
|
|
27478
27956
|
)
|
|
27479
27957
|
] }) }) }),
|
|
27480
|
-
/* @__PURE__ */
|
|
27958
|
+
/* @__PURE__ */ jsxs92(Colorize111, { color: "#242529", material: componentMaterials.moldedPlastic, children: [
|
|
27481
27959
|
/* @__PURE__ */ jsx199(
|
|
27482
27960
|
Cuboid66,
|
|
27483
27961
|
{
|
|
@@ -27498,7 +27976,7 @@ var UsbCMidmount = ({
|
|
|
27498
27976
|
) : null
|
|
27499
27977
|
)
|
|
27500
27978
|
] }),
|
|
27501
|
-
/* @__PURE__ */
|
|
27979
|
+
/* @__PURE__ */ jsxs92(Colorize111, { color: "#d3ad57", material: componentMaterials.goldContact, children: [
|
|
27502
27980
|
[-1, 1].flatMap(
|
|
27503
27981
|
(side) => [-2.75, -2.25, -1.25, -0.25, 0.25, 1.25, 2.25, 2.75].map((x) => /* @__PURE__ */ jsx199(
|
|
27504
27982
|
Cuboid66,
|
|
@@ -27540,7 +28018,7 @@ var UsbCMidmount = ({
|
|
|
27540
28018
|
// lib/SOT143.tsx
|
|
27541
28019
|
import { fp as fp9 } from "@tscircuit/footprinter";
|
|
27542
28020
|
import { Rotate as Rotate23 } from "jscad-fiber";
|
|
27543
|
-
import { jsx as jsx200, jsxs as
|
|
28021
|
+
import { jsx as jsx200, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
27544
28022
|
var getPads = (footprint) => fp9.string(footprint).circuitJson().filter(
|
|
27545
28023
|
(element) => element.type === "pcb_smtpad" && (element.shape === "rect" || element.shape === "rotated_rect")
|
|
27546
28024
|
).map((pad) => ({ x: pad.x, y: pad.y, pin: pad.port_hints?.[0] }));
|
|
@@ -27559,7 +28037,7 @@ var SOT143 = ({ footprint = "sot143" }) => {
|
|
|
27559
28037
|
x: pad.x * Math.cos(angle) + pad.y * Math.sin(angle),
|
|
27560
28038
|
y: -pad.x * Math.sin(angle) + pad.y * Math.cos(angle)
|
|
27561
28039
|
}));
|
|
27562
|
-
return /* @__PURE__ */
|
|
28040
|
+
return /* @__PURE__ */ jsxs93(Rotate23, { rotation: [0, 0, angle], children: [
|
|
27563
28041
|
/* @__PURE__ */ jsx200(
|
|
27564
28042
|
ChipBody,
|
|
27565
28043
|
{
|
|
@@ -28264,8 +28742,8 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
28264
28742
|
};
|
|
28265
28743
|
|
|
28266
28744
|
// lib/utils/FlatLeadDiode.tsx
|
|
28267
|
-
import { Colorize as Colorize112, Cuboid as Cuboid67, Hull as Hull31, Subtract as
|
|
28268
|
-
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";
|
|
28269
28747
|
function createFlatLeadDiode(p) {
|
|
28270
28748
|
const dimensions5 = [
|
|
28271
28749
|
"bodyLength",
|
|
@@ -28293,7 +28771,7 @@ function createFlatLeadDiode(p) {
|
|
|
28293
28771
|
"Diode dimensions leave disconnected terminals or an invalid mold"
|
|
28294
28772
|
);
|
|
28295
28773
|
const slice = Math.min(p.bodyHeight - p.standoff, p.bodyWidth) / 100;
|
|
28296
|
-
const body = /* @__PURE__ */
|
|
28774
|
+
const body = /* @__PURE__ */ jsxs94(Hull31, { children: [
|
|
28297
28775
|
/* @__PURE__ */ jsx202(
|
|
28298
28776
|
Cuboid67,
|
|
28299
28777
|
{
|
|
@@ -28324,12 +28802,12 @@ function createFlatLeadDiode(p) {
|
|
|
28324
28802
|
]
|
|
28325
28803
|
}
|
|
28326
28804
|
);
|
|
28327
|
-
return /* @__PURE__ */
|
|
28328
|
-
/* @__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: [
|
|
28329
28807
|
body,
|
|
28330
28808
|
stripe
|
|
28331
28809
|
] }) : body }),
|
|
28332
|
-
/* @__PURE__ */
|
|
28810
|
+
/* @__PURE__ */ jsxs94(Colorize112, { color: "#c7c9cd", children: [
|
|
28333
28811
|
/* @__PURE__ */ jsx202(
|
|
28334
28812
|
Cuboid67,
|
|
28335
28813
|
{
|
|
@@ -28393,7 +28871,7 @@ var SOD323HE = (props) => createFlatLeadDiode({
|
|
|
28393
28871
|
|
|
28394
28872
|
// lib/SOT89.tsx
|
|
28395
28873
|
import { Colorize as Colorize113, Cuboid as Cuboid68, Translate as Translate47, Hull as Hull32, Union as Union24 } from "jscad-fiber";
|
|
28396
|
-
import { Fragment as Fragment94, jsx as jsx203, jsxs as
|
|
28874
|
+
import { Fragment as Fragment94, jsx as jsx203, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
28397
28875
|
function SOT89(p) {
|
|
28398
28876
|
for (const k of [
|
|
28399
28877
|
"bodyWidth",
|
|
@@ -28415,8 +28893,8 @@ function SOT89(p) {
|
|
|
28415
28893
|
const front = -p.bodyWidth / 2, rear = p.bodyWidth / 2 + p.rearExtension, tabFront = rear - p.tabLength;
|
|
28416
28894
|
const slice = Math.min(2e-3, (p.bodyHeight - p.standoff) / 100);
|
|
28417
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] }) });
|
|
28418
|
-
return /* @__PURE__ */
|
|
28419
|
-
/* @__PURE__ */ jsx203(Colorize113, { color: "#353535", children: /* @__PURE__ */
|
|
28896
|
+
return /* @__PURE__ */ jsxs95(Fragment94, { children: [
|
|
28897
|
+
/* @__PURE__ */ jsx203(Colorize113, { color: "#353535", children: /* @__PURE__ */ jsxs95(Hull32, { children: [
|
|
28420
28898
|
/* @__PURE__ */ jsx203(Translate47, { z: p.standoff + slice / 2, children: /* @__PURE__ */ jsx203(Cuboid68, { size: [p.bodyWidth, p.bodyLength, slice] }) }),
|
|
28421
28899
|
/* @__PURE__ */ jsx203(Translate47, { z: p.bodyHeight - slice / 2, children: /* @__PURE__ */ jsx203(
|
|
28422
28900
|
Cuboid68,
|
|
@@ -28437,7 +28915,7 @@ function SOT89(p) {
|
|
|
28437
28915
|
p.leadWidth
|
|
28438
28916
|
)
|
|
28439
28917
|
) }),
|
|
28440
|
-
/* @__PURE__ */ jsx203(Colorize113, { color: "#bfc1c4", children: /* @__PURE__ */
|
|
28918
|
+
/* @__PURE__ */ jsx203(Colorize113, { color: "#bfc1c4", children: /* @__PURE__ */ jsxs95(Union24, { children: [
|
|
28441
28919
|
block(
|
|
28442
28920
|
(front - p.leadLength + tabFront + 0.15) / 2,
|
|
28443
28921
|
0,
|
|
@@ -28451,7 +28929,7 @@ function SOT89(p) {
|
|
|
28451
28929
|
|
|
28452
28930
|
// lib/TO277.tsx
|
|
28453
28931
|
import { Colorize as Colorize114, Cuboid as Cuboid69, Translate as Translate48, Union as Union25 } from "jscad-fiber";
|
|
28454
|
-
import { Fragment as Fragment95, jsx as jsx204, jsxs as
|
|
28932
|
+
import { Fragment as Fragment95, jsx as jsx204, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
28455
28933
|
function TO277(p) {
|
|
28456
28934
|
for (const k of [
|
|
28457
28935
|
"bodyWidth",
|
|
@@ -28475,7 +28953,7 @@ function TO277(p) {
|
|
|
28475
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)
|
|
28476
28954
|
throw new Error("Invalid TO-277 terminal geometry or clearance");
|
|
28477
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] }) });
|
|
28478
|
-
return /* @__PURE__ */
|
|
28956
|
+
return /* @__PURE__ */ jsxs96(Fragment95, { children: [
|
|
28479
28957
|
/* @__PURE__ */ jsx204(Colorize114, { color: "#353535", children: /* @__PURE__ */ jsx204(Translate48, { z: (p.bodyHeight + p.terminalThickness / 2) / 2, children: /* @__PURE__ */ jsx204(
|
|
28480
28958
|
Cuboid69,
|
|
28481
28959
|
{
|
|
@@ -28494,7 +28972,7 @@ function TO277(p) {
|
|
|
28494
28972
|
p.leadWidth
|
|
28495
28973
|
)
|
|
28496
28974
|
) }),
|
|
28497
|
-
/* @__PURE__ */ jsx204(Colorize114, { color: "#bfc1c4", children: /* @__PURE__ */
|
|
28975
|
+
/* @__PURE__ */ jsx204(Colorize114, { color: "#bfc1c4", children: /* @__PURE__ */ jsxs96(Union25, { children: [
|
|
28498
28976
|
block(
|
|
28499
28977
|
tabFront + (p.tabLength - p.tabNeckLength) / 2,
|
|
28500
28978
|
0,
|
|
@@ -28520,7 +28998,7 @@ function TO277(p) {
|
|
|
28520
28998
|
// lib/TantalumCapacitor.tsx
|
|
28521
28999
|
import { fp as fp11 } from "@tscircuit/footprinter";
|
|
28522
29000
|
import { Colorize as Colorize115, Cuboid as Cuboid70, Hull as Hull33, Rotate as Rotate25, Translate as Translate49, Union as Union26 } from "jscad-fiber";
|
|
28523
|
-
import { jsx as jsx205, jsxs as
|
|
29001
|
+
import { jsx as jsx205, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
28524
29002
|
var tantalumCases = {
|
|
28525
29003
|
A: [3.2, 1.6, 1.6, 1.2, 0.8],
|
|
28526
29004
|
B: [3.5, 2.8, 1.9, 2.2, 0.8],
|
|
@@ -28540,8 +29018,8 @@ var TantalumCapacitor = ({
|
|
|
28540
29018
|
if (pads.length !== 2) throw new Error("TantalumCapacitor requires two pads");
|
|
28541
29019
|
const [a, b] = pads;
|
|
28542
29020
|
const angle = Math.atan2(b.y - a.y, b.x - a.x);
|
|
28543
|
-
return /* @__PURE__ */ jsx205(Translate49, { offset: [(a.x + b.x) / 2, (a.y + b.y) / 2, 0], children: /* @__PURE__ */
|
|
28544
|
-
/* @__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: [
|
|
28545
29023
|
/* @__PURE__ */ jsx205(Cuboid70, { size: [length32 - 0.1, width10, 0.02], center: [0, 0, 0.21] }),
|
|
28546
29024
|
/* @__PURE__ */ jsx205(
|
|
28547
29025
|
Cuboid70,
|
|
@@ -28551,7 +29029,7 @@ var TantalumCapacitor = ({
|
|
|
28551
29029
|
}
|
|
28552
29030
|
)
|
|
28553
29031
|
] }) }),
|
|
28554
|
-
/* @__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: [
|
|
28555
29033
|
/* @__PURE__ */ jsx205(
|
|
28556
29034
|
Cuboid70,
|
|
28557
29035
|
{
|
|
@@ -28581,7 +29059,7 @@ var TantalumCapacitor = ({
|
|
|
28581
29059
|
// lib/TwoPadCrystal.tsx
|
|
28582
29060
|
import { fp as fp12 } from "@tscircuit/footprinter";
|
|
28583
29061
|
import { Colorize as Colorize116, Cuboid as Cuboid71, RoundedCuboid as RoundedCuboid7, Rotate as Rotate26, Translate as Translate50 } from "jscad-fiber";
|
|
28584
|
-
import { jsx as jsx206, jsxs as
|
|
29062
|
+
import { jsx as jsx206, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
28585
29063
|
var twoPadCrystalPackages = {
|
|
28586
29064
|
FC135: [3.2, 1.5, 0.9, 0.7],
|
|
28587
29065
|
FC12M: [2.05, 1.2, 0.6, 0.5],
|
|
@@ -28601,7 +29079,7 @@ var TwoPadCrystal = ({
|
|
|
28601
29079
|
if (pads.length !== 2) throw new Error("TwoPadCrystal requires two pads");
|
|
28602
29080
|
const [a, b] = pads;
|
|
28603
29081
|
const angle = Math.atan2(b.y - a.y, b.x - a.x);
|
|
28604
|
-
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: [
|
|
28605
29083
|
/* @__PURE__ */ jsx206(Colorize116, { color: "#e0dcca", children: /* @__PURE__ */ jsx206(Cuboid71, { size: [length32, width10, 0.2], center: [0, 0, 0.13] }) }),
|
|
28606
29084
|
/* @__PURE__ */ jsx206(Colorize116, { color: "#acb1b8", children: /* @__PURE__ */ jsx206(
|
|
28607
29085
|
RoundedCuboid7,
|
|
@@ -28625,7 +29103,7 @@ var TwoPadCrystal = ({
|
|
|
28625
29103
|
// lib/CeramicChipAntenna.tsx
|
|
28626
29104
|
import { fp as fp13 } from "@tscircuit/footprinter";
|
|
28627
29105
|
import { Colorize as Colorize117, Cuboid as Cuboid72, Rotate as Rotate27, Translate as Translate51 } from "jscad-fiber";
|
|
28628
|
-
import { jsx as jsx207, jsxs as
|
|
29106
|
+
import { jsx as jsx207, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
28629
29107
|
var CeramicChipAntenna = ({
|
|
28630
29108
|
footprint = "smdpads2_p5.4mm_pw1mm_ph2mm"
|
|
28631
29109
|
}) => {
|
|
@@ -28635,7 +29113,7 @@ var CeramicChipAntenna = ({
|
|
|
28635
29113
|
if (pads.length !== 2) throw new Error("CeramicChipAntenna requires two pads");
|
|
28636
29114
|
const [a, b] = pads;
|
|
28637
29115
|
const angle = Math.atan2(b.y - a.y, b.x - a.x);
|
|
28638
|
-
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: [
|
|
28639
29117
|
/* @__PURE__ */ jsx207(
|
|
28640
29118
|
Cuboid72,
|
|
28641
29119
|
{
|
|
@@ -28667,7 +29145,7 @@ var CeramicChipAntenna = ({
|
|
|
28667
29145
|
// lib/MelfResistor.tsx
|
|
28668
29146
|
import { fp as fp14 } from "@tscircuit/footprinter";
|
|
28669
29147
|
import { Colorize as Colorize118, Cylinder as Cylinder28, Rotate as Rotate28, Translate as Translate52 } from "jscad-fiber";
|
|
28670
|
-
import { jsx as jsx208, jsxs as
|
|
29148
|
+
import { jsx as jsx208, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
28671
29149
|
var melfResistorSizes = {
|
|
28672
29150
|
"0102": [2.2, 1.1, 0.4],
|
|
28673
29151
|
"0204": [3.6, 1.4, 0.75],
|
|
@@ -28686,7 +29164,7 @@ var MelfResistor = ({
|
|
|
28686
29164
|
if (pads.length !== 2) throw new Error("MelfResistor requires two pads");
|
|
28687
29165
|
const [a, b] = pads;
|
|
28688
29166
|
const angle = Math.atan2(b.y - a.y, b.x - a.x);
|
|
28689
|
-
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: [
|
|
28690
29168
|
/* @__PURE__ */ jsx208(Colorize118, { color: "#426d63", children: /* @__PURE__ */ jsx208(
|
|
28691
29169
|
Cylinder28,
|
|
28692
29170
|
{
|
|
@@ -28705,6 +29183,29 @@ var MelfResistor = ({
|
|
|
28705
29183
|
)) })
|
|
28706
29184
|
] }) }) });
|
|
28707
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
|
+
}
|
|
28708
29209
|
export {
|
|
28709
29210
|
A01005,
|
|
28710
29211
|
A0201,
|
|
@@ -28928,6 +29429,7 @@ export {
|
|
|
28928
29429
|
createRectangularGasketMesh,
|
|
28929
29430
|
createRectangularTubeGeom,
|
|
28930
29431
|
createRectangularTubeMesh,
|
|
29432
|
+
createRectangularTubeModel,
|
|
28931
29433
|
createRigidCouplerGeom,
|
|
28932
29434
|
createRigidCouplerMesh,
|
|
28933
29435
|
createSetScrewGeom,
|
|
@@ -28963,8 +29465,13 @@ export {
|
|
|
28963
29465
|
createWormGearMesh,
|
|
28964
29466
|
createZeeBarGeom,
|
|
28965
29467
|
createZeeBarMesh,
|
|
29468
|
+
geom3ToIndexedMesh,
|
|
28966
29469
|
isJstShFootprint,
|
|
29470
|
+
listJscadNamedEdges,
|
|
29471
|
+
listJscadReferenceFeatures,
|
|
28967
29472
|
melfResistorSizes,
|
|
29473
|
+
readJscadNamedEdge,
|
|
29474
|
+
readJscadReferenceFeature,
|
|
28968
29475
|
resolveFlexScreenSize,
|
|
28969
29476
|
smdLedDimensions,
|
|
28970
29477
|
tantalumCases,
|