@tscircuit/footprinter 0.0.158 → 0.0.159
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 +46 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3871,12 +3871,12 @@ var sot89_3 = (parameters) => {
|
|
|
3871
3871
|
const pads = [];
|
|
3872
3872
|
const padGap = Number.parseFloat(parameters.p);
|
|
3873
3873
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
3874
|
-
const
|
|
3874
|
+
const length43 = Number.parseFloat(parameters.w);
|
|
3875
3875
|
const padHeight = Number.parseFloat(parameters.pl);
|
|
3876
3876
|
pads.push(
|
|
3877
|
-
rectpad(1, -
|
|
3878
|
-
rectpad(2, -
|
|
3879
|
-
rectpad(3, -
|
|
3877
|
+
rectpad(1, -length43 / 2, padGap, padHeight, padWidth),
|
|
3878
|
+
rectpad(2, -length43 / 2 + (1.5 - 1.3) / 2, 0, 1.5, padWidth),
|
|
3879
|
+
rectpad(3, -length43 / 2, -padGap, padHeight, padWidth)
|
|
3880
3880
|
);
|
|
3881
3881
|
const silkscreenRefText = silkscreenRef(0, 0, 0.3);
|
|
3882
3882
|
const width = Number.parseFloat(parameters.w) / 2 - 1;
|
|
@@ -3916,7 +3916,7 @@ var sot89_5 = (parameters) => {
|
|
|
3916
3916
|
const pads = [];
|
|
3917
3917
|
const padGap = Number.parseFloat(parameters.p);
|
|
3918
3918
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
3919
|
-
const
|
|
3919
|
+
const length43 = Number.parseFloat(parameters.w);
|
|
3920
3920
|
pads.push(
|
|
3921
3921
|
rectpad(1, -1.85, -1.5, 1.5, 0.7),
|
|
3922
3922
|
rectpad(2, -1.85, 1.5, 1.5, 0.7),
|
|
@@ -5704,11 +5704,12 @@ var sodWithoutParsing15 = (parameters) => {
|
|
|
5704
5704
|
};
|
|
5705
5705
|
|
|
5706
5706
|
// src/fn/solderjumper.ts
|
|
5707
|
+
import { length as length42 } from "circuit-json";
|
|
5707
5708
|
var solderjumper = (params) => {
|
|
5708
5709
|
const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
|
|
5709
|
-
const padSpacing = p;
|
|
5710
|
-
const padWidth = pw;
|
|
5711
|
-
const padHeight = ph;
|
|
5710
|
+
const padSpacing = length42.parse(p);
|
|
5711
|
+
const padWidth = length42.parse(pw);
|
|
5712
|
+
const padHeight = length42.parse(ph);
|
|
5712
5713
|
const traceWidth = Math.min(padHeight / 4, 0.5);
|
|
5713
5714
|
const pads = [];
|
|
5714
5715
|
for (let i = 0; i < num_pins; i++) {
|
|
@@ -5753,13 +5754,44 @@ var solderjumper = (params) => {
|
|
|
5753
5754
|
}
|
|
5754
5755
|
}
|
|
5755
5756
|
}
|
|
5756
|
-
const
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5757
|
+
const outlineWidth = (num_pins - 1) * padSpacing + padWidth + 0.7;
|
|
5758
|
+
const outlineHeight = padHeight + 1;
|
|
5759
|
+
const outlineCenterX = (num_pins - 1) * padSpacing / 2;
|
|
5760
|
+
const outlineCenterY = 0;
|
|
5761
|
+
const silkscreenRect = {
|
|
5762
|
+
type: "pcb_silkscreen_path",
|
|
5763
|
+
layer: "top",
|
|
5764
|
+
pcb_component_id: "",
|
|
5765
|
+
pcb_silkscreen_path_id: "outline",
|
|
5766
|
+
route: [
|
|
5767
|
+
{
|
|
5768
|
+
x: outlineCenterX - outlineWidth / 2,
|
|
5769
|
+
y: outlineCenterY - outlineHeight / 2
|
|
5770
|
+
},
|
|
5771
|
+
{
|
|
5772
|
+
x: outlineCenterX + outlineWidth / 2,
|
|
5773
|
+
y: outlineCenterY - outlineHeight / 2
|
|
5774
|
+
},
|
|
5775
|
+
{
|
|
5776
|
+
x: outlineCenterX + outlineWidth / 2,
|
|
5777
|
+
y: outlineCenterY + outlineHeight / 2
|
|
5778
|
+
},
|
|
5779
|
+
{
|
|
5780
|
+
x: outlineCenterX - outlineWidth / 2,
|
|
5781
|
+
y: outlineCenterY + outlineHeight / 2
|
|
5782
|
+
},
|
|
5783
|
+
{
|
|
5784
|
+
x: outlineCenterX - outlineWidth / 2,
|
|
5785
|
+
y: outlineCenterY - outlineHeight / 2
|
|
5786
|
+
}
|
|
5787
|
+
],
|
|
5788
|
+
stroke_width: 0.15
|
|
5789
|
+
};
|
|
5790
|
+
const refOffset = 0.6;
|
|
5791
|
+
const refY = outlineCenterY + outlineHeight / 2 + refOffset;
|
|
5792
|
+
const silk = silkscreenRef(outlineCenterX, refY, 0.4);
|
|
5761
5793
|
return {
|
|
5762
|
-
circuitJson: [...pads, ...traces, silk],
|
|
5794
|
+
circuitJson: [...pads, ...traces, silkscreenRect, silk],
|
|
5763
5795
|
parameters: params
|
|
5764
5796
|
};
|
|
5765
5797
|
};
|