Skip to content

Commit 7adb9b8

Browse files
authored
Fix drill hole alignment for RP2040 footprint (#169)
* Fix drill hole alignment for RP2040 footprint * update bun version
1 parent 2e51d62 commit 7adb9b8

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.github/workflows/bun-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup bun
1717
uses: oven-sh/setup-bun@v1
1818
with:
19-
bun-version: latest
19+
bun-version: 1.3.1
2020

2121
- name: Install dependencies
2222
run: bun install

src/convert-kicad-json-to-tscircuit-soup.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export const convertKicadJsonToTsCircuitSoup = async (
269269
// x/y are the pad center; hole_offset_* positions the hole
270270
x: pad.at[0],
271271
y: -pad.at[1],
272-
hole_offset_x: rotOff.x,
272+
hole_offset_x: -rotOff.x,
273273
hole_offset_y: -rotOff.y,
274274
hole_diameter: pad.drill?.width!,
275275
rect_pad_width: width,
@@ -370,7 +370,7 @@ export const convertKicadJsonToTsCircuitSoup = async (
370370
// x/y are the pad center; hole_offset_* positions the hole
371371
x: hole.at[0],
372372
y: -hole.at[1],
373-
hole_offset_x: rotOff.x,
373+
hole_offset_x: -rotOff.x,
374374
hole_offset_y: -rotOff.y,
375375
hole_diameter: holeDiameter,
376376
rect_pad_width: isNinetyLike(rotation)
@@ -433,8 +433,8 @@ export const convertKicadJsonToTsCircuitSoup = async (
433433
pad_shape: "rect",
434434
x,
435435
y,
436-
hole_offset_x: rotOff.x,
437-
hole_offset_y: -rotOff.y,
436+
hole_offset_x: -rotOff.x,
437+
hole_offset_y: rotOff.y,
438438
hole_diameter: holeDiameter,
439439
rect_pad_width: width,
440440
rect_pad_height: height,

tests/__snapshots__/rp2040-zero.snap.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/repros/repro01-jst-loading.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ test("jst loading issue with pin numbers", async () => {
2222
[
2323
{
2424
"hole_diameter": 0.75,
25-
"hole_offset_x": 0,
26-
"hole_offset_y": -0,
25+
"hole_offset_x": -0,
26+
"hole_offset_y": 0,
2727
"hole_shape": "circle",
2828
"layers": [
2929
"top",

0 commit comments

Comments
 (0)