jscad-electronics 0.0.80 → 0.0.81

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
@@ -2518,6 +2518,70 @@ var HC49 = ({
2518
2518
  ] });
2519
2519
  };
2520
2520
 
2521
+ // lib/ms012.tsx
2522
+ var MS012 = ({
2523
+ pinCount,
2524
+ padContactLength = 0.6,
2525
+ leadWidth = 0.41,
2526
+ pitch = 1.27
2527
+ }) => {
2528
+ if (pinCount % 2 !== 0) {
2529
+ throw new Error("MS012 pinCount must be even");
2530
+ }
2531
+ const sidePinCount = pinCount / 2;
2532
+ const bodyWidth = 4.9;
2533
+ const bodyLength10 = 3.9;
2534
+ const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
2535
+ const leadThickness = 0.2;
2536
+ return /* @__PURE__ */ jsxs(Fragment2, { children: [
2537
+ Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
2538
+ SmdChipLead,
2539
+ {
2540
+ position: {
2541
+ x: -bodyLength10 / 2 - padContactLength - 0.3,
2542
+ y: i * pitch - pinOffsetToCenter,
2543
+ z: leadThickness / 2
2544
+ },
2545
+ width: leadWidth,
2546
+ thickness: leadThickness,
2547
+ padContactLength,
2548
+ bodyDistance: padContactLength + 0.4,
2549
+ height: 0.85
2550
+ },
2551
+ i
2552
+ )),
2553
+ Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
2554
+ SmdChipLead,
2555
+ {
2556
+ rotation: Math.PI,
2557
+ position: {
2558
+ x: bodyLength10 / 2 + padContactLength + 0.3,
2559
+ y: i * pitch - pinOffsetToCenter,
2560
+ z: leadThickness / 2
2561
+ },
2562
+ width: leadWidth,
2563
+ thickness: leadThickness,
2564
+ padContactLength,
2565
+ bodyDistance: padContactLength + 0.4,
2566
+ height: 0.85
2567
+ },
2568
+ `right-${i}`
2569
+ )),
2570
+ /* @__PURE__ */ jsx(
2571
+ ChipBody,
2572
+ {
2573
+ center: { x: 0, y: 0, z: leadThickness / 2 },
2574
+ width: bodyLength10,
2575
+ length: bodyWidth,
2576
+ height: 1.55,
2577
+ notchPosition: { x: bodyLength10 / 2 - 1, y: bodyWidth / 2 - 1, z: 1.55 },
2578
+ heightAboveSurface: 0.17,
2579
+ taperRatio: 0.09
2580
+ }
2581
+ )
2582
+ ] });
2583
+ };
2584
+
2521
2585
  // lib/Footprinter3d.tsx
2522
2586
  var Footprinter3d = ({ footprint }) => {
2523
2587
  const fpJson = fp.string(footprint).json();
@@ -2669,6 +2733,16 @@ var Footprinter3d = ({ footprint }) => {
2669
2733
  return /* @__PURE__ */ jsx(SOD923, {});
2670
2734
  case "hc49":
2671
2735
  return /* @__PURE__ */ jsx(HC49, {});
2736
+ case "ms012":
2737
+ return /* @__PURE__ */ jsx(
2738
+ MS012,
2739
+ {
2740
+ pinCount: fpJson.num_pins,
2741
+ padContactLength: fpJson.pl,
2742
+ leadWidth: fpJson.pw,
2743
+ pitch: fpJson.p
2744
+ }
2745
+ );
2672
2746
  }
2673
2747
  const colorMatch = footprint.match(/_color\(([^)]+)\)/);
2674
2748
  const color = colorMatch ? colorMatch[1] : void 0;