jscad-electronics 0.0.80 → 0.0.82

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
@@ -108,7 +108,7 @@ var ChipBody = ({
108
108
  }
109
109
  return /* @__PURE__ */ jsx(Colorize, { color, children: /* @__PURE__ */ jsx(Translate, { offset: center, children: /* @__PURE__ */ jsx(Translate, { offset: { x: 0, y: 0, z: heightAboveSurface2 }, children: includeNotch ? /* @__PURE__ */ jsxs(Subtract, { children: [
110
110
  finalBody,
111
- /* @__PURE__ */ jsx(Translate, { offset: actualNotchPosition, children: /* @__PURE__ */ jsx(Rotate, { rotation: notchRotation, children: /* @__PURE__ */ jsx(Cylinder, { radius: notchLength, height: notchWidth }) }) })
111
+ /* @__PURE__ */ jsx(Translate, { offset: actualNotchPosition, children: /* @__PURE__ */ jsx(Rotate, { rotation: notchRotation, children: /* @__PURE__ */ jsx(Cylinder, { radius: actualNotchRadius, height: notchWidth }) }) })
112
112
  ] }) : finalBody }) }) });
113
113
  };
114
114
 
@@ -356,6 +356,66 @@ var Tssop = ({
356
356
  ] });
357
357
  };
358
358
 
359
+ // lib/MSOP.tsx
360
+ var MSOP = ({
361
+ pinCount,
362
+ padContactLength = 0.4,
363
+ leadWidth = 0.2,
364
+ pitch = 0.65,
365
+ bodyWidth = 3
366
+ }) => {
367
+ const sidePinCount = Math.ceil(pinCount / 2);
368
+ const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
369
+ const leadThickness = 0.2;
370
+ return /* @__PURE__ */ jsxs(Fragment2, { children: [
371
+ Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
372
+ SmdChipLead,
373
+ {
374
+ position: {
375
+ x: -bodyWidth / 2 - padContactLength - 0.3,
376
+ y: i * pitch - pinOffsetToCenter,
377
+ z: leadThickness / 2
378
+ },
379
+ width: leadWidth,
380
+ thickness: leadThickness,
381
+ padContactLength,
382
+ bodyDistance: padContactLength + 0.4,
383
+ height: 0.6
384
+ },
385
+ i
386
+ )),
387
+ Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
388
+ SmdChipLead,
389
+ {
390
+ rotation: Math.PI,
391
+ position: {
392
+ x: bodyWidth / 2 + padContactLength + 0.3,
393
+ y: i * pitch - pinOffsetToCenter,
394
+ z: leadThickness / 2
395
+ },
396
+ width: leadWidth,
397
+ thickness: leadThickness,
398
+ padContactLength,
399
+ bodyDistance: padContactLength + 0.4,
400
+ height: 0.6
401
+ },
402
+ i
403
+ )),
404
+ /* @__PURE__ */ jsx(
405
+ ChipBody,
406
+ {
407
+ center: { x: 0, y: 0, z: leadThickness / 2 },
408
+ width: bodyWidth,
409
+ length: bodyWidth,
410
+ height: 1.1,
411
+ notchRadius: 0.35,
412
+ heightAboveSurface: 0.1,
413
+ taperRatio: 0.09
414
+ }
415
+ )
416
+ ] });
417
+ };
418
+
359
419
  // lib/A0402.tsx
360
420
  var fullLength = 1;
361
421
  var width = 0.5;
@@ -2518,6 +2578,70 @@ var HC49 = ({
2518
2578
  ] });
2519
2579
  };
2520
2580
 
2581
+ // lib/ms012.tsx
2582
+ var MS012 = ({
2583
+ pinCount,
2584
+ padContactLength = 0.6,
2585
+ leadWidth = 0.41,
2586
+ pitch = 1.27
2587
+ }) => {
2588
+ if (pinCount % 2 !== 0) {
2589
+ throw new Error("MS012 pinCount must be even");
2590
+ }
2591
+ const sidePinCount = pinCount / 2;
2592
+ const bodyWidth = 4.9;
2593
+ const bodyLength10 = 3.9;
2594
+ const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
2595
+ const leadThickness = 0.2;
2596
+ return /* @__PURE__ */ jsxs(Fragment2, { children: [
2597
+ Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
2598
+ SmdChipLead,
2599
+ {
2600
+ position: {
2601
+ x: -bodyLength10 / 2 - padContactLength - 0.3,
2602
+ y: i * pitch - pinOffsetToCenter,
2603
+ z: leadThickness / 2
2604
+ },
2605
+ width: leadWidth,
2606
+ thickness: leadThickness,
2607
+ padContactLength,
2608
+ bodyDistance: padContactLength + 0.4,
2609
+ height: 0.85
2610
+ },
2611
+ i
2612
+ )),
2613
+ Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
2614
+ SmdChipLead,
2615
+ {
2616
+ rotation: Math.PI,
2617
+ position: {
2618
+ x: bodyLength10 / 2 + padContactLength + 0.3,
2619
+ y: i * pitch - pinOffsetToCenter,
2620
+ z: leadThickness / 2
2621
+ },
2622
+ width: leadWidth,
2623
+ thickness: leadThickness,
2624
+ padContactLength,
2625
+ bodyDistance: padContactLength + 0.4,
2626
+ height: 0.85
2627
+ },
2628
+ `right-${i}`
2629
+ )),
2630
+ /* @__PURE__ */ jsx(
2631
+ ChipBody,
2632
+ {
2633
+ center: { x: 0, y: 0, z: leadThickness / 2 },
2634
+ width: bodyLength10,
2635
+ length: bodyWidth,
2636
+ height: 1.55,
2637
+ notchPosition: { x: bodyLength10 / 2 - 1, y: bodyWidth / 2 - 1, z: 1.55 },
2638
+ heightAboveSurface: 0.17,
2639
+ taperRatio: 0.09
2640
+ }
2641
+ )
2642
+ ] });
2643
+ };
2644
+
2521
2645
  // lib/Footprinter3d.tsx
2522
2646
  var Footprinter3d = ({ footprint }) => {
2523
2647
  const fpJson = fp.string(footprint).json();
@@ -2535,6 +2659,17 @@ var Footprinter3d = ({ footprint }) => {
2535
2659
  bodyWidth: fpJson.w
2536
2660
  }
2537
2661
  );
2662
+ case "msop":
2663
+ return /* @__PURE__ */ jsx(
2664
+ MSOP,
2665
+ {
2666
+ pinCount: fpJson.num_pins,
2667
+ padContactLength: fpJson.pl,
2668
+ leadWidth: fpJson.pw,
2669
+ pitch: fpJson.p,
2670
+ bodyWidth: fpJson.w
2671
+ }
2672
+ );
2538
2673
  case "vssop":
2539
2674
  return /* @__PURE__ */ jsx(
2540
2675
  VSSOP,
@@ -2669,6 +2804,16 @@ var Footprinter3d = ({ footprint }) => {
2669
2804
  return /* @__PURE__ */ jsx(SOD923, {});
2670
2805
  case "hc49":
2671
2806
  return /* @__PURE__ */ jsx(HC49, {});
2807
+ case "ms012":
2808
+ return /* @__PURE__ */ jsx(
2809
+ MS012,
2810
+ {
2811
+ pinCount: fpJson.num_pins,
2812
+ padContactLength: fpJson.pl,
2813
+ leadWidth: fpJson.pw,
2814
+ pitch: fpJson.p
2815
+ }
2816
+ );
2672
2817
  }
2673
2818
  const colorMatch = footprint.match(/_color\(([^)]+)\)/);
2674
2819
  const color = colorMatch ? colorMatch[1] : void 0;