@tscircuit/footprinter 0.0.154 → 0.0.156
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 +12 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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,28 @@ 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
|
-
|
|
5674
|
+
start_pcb_port_id: `{PIN${from}}`,
|
|
5675
|
+
x: x1,
|
|
5669
5676
|
y: 0,
|
|
5670
|
-
width:
|
|
5677
|
+
width: traceWidth,
|
|
5671
5678
|
layer: "top",
|
|
5672
5679
|
route_type: "wire"
|
|
5673
5680
|
},
|
|
5674
5681
|
{
|
|
5675
|
-
|
|
5682
|
+
end_pcb_port_id: `{PIN${to}}`,
|
|
5683
|
+
x: x2,
|
|
5676
5684
|
y: 0,
|
|
5677
|
-
width:
|
|
5685
|
+
width: traceWidth,
|
|
5678
5686
|
layer: "top",
|
|
5679
5687
|
route_type: "wire"
|
|
5680
5688
|
}
|