@tscircuit/footprinter 0.0.154 → 0.0.155

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.js CHANGED
@@ -5648,6 +5648,7 @@ var solderjumper = (params) => {
5648
5648
  const padSpacing = p;
5649
5649
  const padWidth = pw;
5650
5650
  const padHeight = ph;
5651
+ const traceWidth = Math.min(padHeight / 4, 0.5);
5651
5652
  const pads = [];
5652
5653
  for (let i = 0; i < num_pins; i++) {
5653
5654
  pads.push(rectpad(i + 1, i * padSpacing, 0, padWidth, padHeight));
@@ -5660,21 +5661,26 @@ var solderjumper = (params) => {
5660
5661
  const from = pins[i];
5661
5662
  const to = pins[i + 1];
5662
5663
  if (typeof from === "number" && typeof to === "number" && !isNaN(from) && !isNaN(to)) {
5664
+ const xCenterFrom = (from - 1) * padSpacing;
5665
+ const xCenterTo = (to - 1) * padSpacing;
5666
+ const directionMult = Math.sign(xCenterTo - xCenterFrom);
5667
+ const x1 = xCenterFrom + directionMult * (padWidth / 2);
5668
+ const x2 = xCenterTo - directionMult * (padWidth / 2);
5663
5669
  traces.push({
5664
5670
  type: "pcb_trace",
5665
5671
  pcb_trace_id: "",
5666
5672
  route: [
5667
5673
  {
5668
- x: (from - 1) * padSpacing,
5674
+ x: x1,
5669
5675
  y: 0,
5670
- width: 0.5,
5676
+ width: traceWidth,
5671
5677
  layer: "top",
5672
5678
  route_type: "wire"
5673
5679
  },
5674
5680
  {
5675
- x: (to - 1) * padSpacing,
5681
+ x: x2,
5676
5682
  y: 0,
5677
- width: 0.5,
5683
+ width: traceWidth,
5678
5684
  layer: "top",
5679
5685
  route_type: "wire"
5680
5686
  }