@tscircuit/copper-pour-solver 0.0.22 → 0.0.24
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 +29 -10
- package/lib/circuit-json/convert-circuit-json-to-input-problem.ts +29 -10
- package/package.json +1 -1
- package/tests/assets/tsci_AnasSarkiz.STM32F746G-DISCO.circuit.json +67472 -0
- package/tests/repro02-pinrow4-copper-pour/__snapshots__/repro02-pinrow4-copper-pour.snap.svg +1 -0
- package/tests/repro02-pinrow4-copper-pour/repro02-pinrow4-copper-pour.json +2344 -0
- package/tests/repro02-pinrow4-copper-pour/repro02-pinrow4-copper-pour.test.ts +18 -0
- package/tests/stm32f746g-disco.test.ts +26 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import type { AnyCircuitElement } from "circuit-json"
|
|
3
|
+
import circuitJson from "./repro02-pinrow4-copper-pour.json"
|
|
4
|
+
import { runSolverAndRenderToSvg } from "../utils/run-solver-and-render-to-svg"
|
|
5
|
+
|
|
6
|
+
test("repro02-pinrow4-copper-pour", async () => {
|
|
7
|
+
const svg = runSolverAndRenderToSvg(circuitJson as AnyCircuitElement[], {
|
|
8
|
+
layer: "top",
|
|
9
|
+
net_name: "GND",
|
|
10
|
+
pad_margin: 0.2,
|
|
11
|
+
trace_margin: 0.2,
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
await expect(svg).toMatchSvgSnapshot(
|
|
15
|
+
import.meta.path,
|
|
16
|
+
"repro02-pinrow4-copper-pour",
|
|
17
|
+
)
|
|
18
|
+
})
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import type { AnyCircuitElement } from "circuit-json"
|
|
3
|
+
import circuitJson from "./assets/tsci_AnasSarkiz.STM32F746G-DISCO.circuit.json"
|
|
4
|
+
import { runSolverAndRenderToSvg } from "./utils/run-solver-and-render-to-svg"
|
|
5
|
+
|
|
6
|
+
test("stm32f746g-disco top layer full board repro", () => {
|
|
7
|
+
expect(() =>
|
|
8
|
+
runSolverAndRenderToSvg(circuitJson as AnyCircuitElement[], {
|
|
9
|
+
layer: "top",
|
|
10
|
+
net_name: "GND",
|
|
11
|
+
pad_margin: 0.2,
|
|
12
|
+
trace_margin: 0.2,
|
|
13
|
+
}),
|
|
14
|
+
).toThrowErrorMatchingInlineSnapshot(`"Cannot complete boolean operation"`)
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
test("stm32f746g-disco bottom layer full board repro", () => {
|
|
18
|
+
expect(() =>
|
|
19
|
+
runSolverAndRenderToSvg(circuitJson as AnyCircuitElement[], {
|
|
20
|
+
layer: "bottom",
|
|
21
|
+
net_name: "GND",
|
|
22
|
+
pad_margin: 0.2,
|
|
23
|
+
trace_margin: 0.2,
|
|
24
|
+
}),
|
|
25
|
+
).toThrowErrorMatchingInlineSnapshot(`"Cannot complete boolean operation"`)
|
|
26
|
+
})
|