pixalynx/pixal-gps
These files define two separate printed circuit boards: a small, two-layer battery cartridge with protection circuitry and contact pads for a pouch cell, and a larger, two-layer wireless charging dock featuring USB-C input, a resonant coil, and wireless power transmission components.
- Version
- 0.1.2
- 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>
))}
</>
)
}