pixalynx/nrf9151-gps-tracker
A compact 44×32 mm, 4-layer nRF9151 LTE-M/NB-IoT/GNSS tracker PCB with nPM1300 LiPo/USB-C power, nano-SIM/eSIM switching, nRF7002 Wi‑Fi scanning, accelerometer, antennas, buzzer, LEDs, SOS button, and SWD/debug connectors.
- Version
- 0.1.4
- License
- unset
- Stars
- 0
lib/routed-traces.tsx
import { Fragment } from "react"
import { localPath, type Pt } from "./geometry"
/** One land-to-land (or land-to-plane) copper leg produced by scripts/import-router-session.py from a
* Freerouting session. `path` is in board coordinates; it is converted into the from-component frame
* at render time exactly like the hand-routed legs. */
export type RoutedLeg = {
id: string
net: string
from: string
to: string
width: number
fromCentre: Pt
fromRotation: number
path: (Pt & { via?: boolean; toLayer?: "top" | "bottom" | "inner1" | "inner2" })[]
}
export type RoutedLegs = { source: string; router: string; legs: RoutedLeg[] }
export function RoutedTraces({ routes }: { routes: RoutedLegs }) {
return (
<>
{routes.legs.map((l) => (
<Fragment key={l.id}>
<trace name={l.id} from={l.from} to={l.to} thickness={l.width} pcbPath={localPath(l.path, l.fromCentre, l.fromRotation)} />
</Fragment>
))}
</>
)
}