Skip to content

Commit

Permalink
intersection with margin repro
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed Sep 11, 2024
1 parent c4caeed commit 71fddd4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,30 @@ import { translate } from "transformation-matrix"
import type { AnySoupElement } from "@tscircuit/soup"
import { getDebugSvg } from "./fixtures/get-debug-svg"

const OneByOnePad = (props: { name: string; pcbX?: number; pcbY?: number }) => (
<chip name={props.name} pcbX={props.pcbX} pcbY={props.pcbY}>
<footprint>
<smtpad
pcbX={0}
pcbY={0}
shape="rect"
width="1mm"
height="1mm"
portHints={["pin1"]}
/>
</footprint>
</chip>
)

test("ijump-astar: intersection with margin", () => {
const circuit = new Circuit()

circuit.add(
<board width="10mm" height="2mm" routingDisabled>
<resistor name="R1" resistance="1k" footprint="0402" pcbX={-3} />
<resistor name="R2" resistance="1k" footprint="0402" pcbX={3} />
<trace from=".R1 > .pin1" to=".R2 > .pin1" />
<OneByOnePad name="U1" pcbX={-3} />
<OneByOnePad name="U2" pcbX={3} />
<OneByOnePad name="U_obstacle" pcbX={0} pcbY={-0.51} />
<trace from=".U1 > .pin1" to=".U2 > .pin1" />
</board>,
)

Expand Down

0 comments on commit 71fddd4

Please sign in to comment.