jscad-electronics 0.0.75 → 0.0.77

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/vanilla.js CHANGED
@@ -2258,6 +2258,117 @@ var SOT323 = () => {
2258
2258
  ] });
2259
2259
  };
2260
2260
 
2261
+ // lib/lqfp.tsx
2262
+ var LQFP = ({
2263
+ pinCount,
2264
+ pitch,
2265
+ leadWidth,
2266
+ padContactLength,
2267
+ bodyWidth
2268
+ }) => {
2269
+ const sidePinCount = pinCount / 4;
2270
+ if (sidePinCount !== Math.floor(sidePinCount)) {
2271
+ throw new Error(`LQFP pinCount must be divisible by 4, got ${pinCount}`);
2272
+ }
2273
+ if (!pitch) pitch = 0.5;
2274
+ if (!padContactLength) padContactLength = 0.6;
2275
+ if (!leadWidth) leadWidth = 0.22;
2276
+ if (!bodyWidth) bodyWidth = pitch * (sidePinCount + 4);
2277
+ const bodyLength10 = bodyWidth;
2278
+ const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
2279
+ const fullLength10 = bodyLength10 + 3.3 * padContactLength;
2280
+ const fullWidth = fullLength10;
2281
+ const leadHeight = 0.8;
2282
+ const leadThickness = 0.2;
2283
+ const bodyDistance = (fullWidth - bodyWidth) / 2 + 0.2;
2284
+ return /* @__PURE__ */ jsxs(Fragment2, { children: [
2285
+ Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
2286
+ SmdChipLead,
2287
+ {
2288
+ position: {
2289
+ x: -fullWidth / 1.98,
2290
+ y: i * pitch - pinOffsetToCenter,
2291
+ z: leadThickness / 2
2292
+ },
2293
+ width: leadWidth,
2294
+ thickness: leadThickness,
2295
+ padContactLength,
2296
+ bodyDistance,
2297
+ height: leadHeight
2298
+ },
2299
+ `left-${i}`
2300
+ )),
2301
+ Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
2302
+ SmdChipLead,
2303
+ {
2304
+ rotation: Math.PI,
2305
+ position: {
2306
+ x: fullWidth / 1.98,
2307
+ y: i * pitch - pinOffsetToCenter,
2308
+ z: leadThickness / 2
2309
+ },
2310
+ width: leadWidth,
2311
+ thickness: leadThickness,
2312
+ padContactLength,
2313
+ bodyDistance,
2314
+ height: leadHeight
2315
+ },
2316
+ `right-${i}`
2317
+ )),
2318
+ Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
2319
+ SmdChipLead,
2320
+ {
2321
+ rotation: Math.PI / 2,
2322
+ position: {
2323
+ x: i * pitch - pinOffsetToCenter,
2324
+ y: -fullLength10 / 1.98,
2325
+ z: leadThickness / 2
2326
+ },
2327
+ width: leadWidth,
2328
+ thickness: leadThickness,
2329
+ padContactLength,
2330
+ bodyDistance,
2331
+ height: leadHeight
2332
+ },
2333
+ `bottom-${i}`
2334
+ )),
2335
+ Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
2336
+ SmdChipLead,
2337
+ {
2338
+ rotation: -Math.PI / 2,
2339
+ position: {
2340
+ x: i * pitch - pinOffsetToCenter,
2341
+ y: fullLength10 / 1.98,
2342
+ z: leadThickness / 2
2343
+ },
2344
+ width: leadWidth,
2345
+ thickness: leadThickness,
2346
+ padContactLength,
2347
+ bodyDistance,
2348
+ height: leadHeight
2349
+ },
2350
+ `top-${i}`
2351
+ )),
2352
+ /* @__PURE__ */ jsx(
2353
+ ChipBody,
2354
+ {
2355
+ center: { x: 0, y: 0, z: leadThickness / 2 },
2356
+ width: bodyWidth,
2357
+ length: bodyLength10,
2358
+ height: 1.5,
2359
+ heightAboveSurface: 0.1,
2360
+ taperRatio: 0.04,
2361
+ chamferSize: 0.7,
2362
+ notchPosition: {
2363
+ x: bodyLength10 / 2 - 1.5,
2364
+ y: bodyLength10 / 2 - 1.5,
2365
+ z: 1.5
2366
+ }
2367
+ }
2368
+ )
2369
+ ] });
2370
+ };
2371
+
2261
2372
  // lib/Footprinter3d.tsx
2262
2373
  var Footprinter3d = ({ footprint }) => {
2263
2374
  const fpJson = fp.string(footprint).json();
@@ -2300,6 +2411,8 @@ var Footprinter3d = ({ footprint }) => {
2300
2411
  );
2301
2412
  case "tqfp":
2302
2413
  return /* @__PURE__ */ jsx(tqfp_default, {});
2414
+ case "lqfp":
2415
+ return /* @__PURE__ */ jsx(LQFP, { pinCount: fpJson.num_pins });
2303
2416
  case "qfn":
2304
2417
  const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
2305
2418
  return /* @__PURE__ */ jsx(