pixalynx/usb3-hub-10g
A USB 3.2 Gen 2 six-port hub board with USB-C PD power input, regulated 5 V/3.3 V/1.15 V rails, one upstream and four protected downstream USB-A/USB-C ports, SuperSpeed muxes, ESD protection, and controlled port power.
- Version
- 0.0.1
- License
- unset
- Stars
- 0
lib/mesh.tsx
import { Fragment } from "react"
import { RoutedTraces, type RoutedLegs } from "./routed-traces"
/** Plane connections from scripts/mesh.py: land -> via stubs (full-span vias via lib/geometry throughVia), via arrays
* inside thermal pads, GND stitching next to every SuperSpeed layer change, and the hub's inward VCORE vias. */
type V = { x: number; y: number; net: string; drill?: number; d?: number }
export type Mesh = { legs: RoutedLegs["legs"]; inpad?: V[]; stitch?: V[]; inward?: V[] }
const Via = ({ v, k }: { v: V; k: string }) => (
<Fragment key={k}>
<via pcbX={v.x} pcbY={v.y} connectsTo={`net.${v.net}`} holeDiameter={v.drill ?? 0.3} outerDiameter={v.d ?? 0.5} />
</Fragment>
)
export function MeshCopper({ mesh }: { mesh: Mesh }) {
return (
<>
<RoutedTraces routes={{ source: "scripts/mesh.py", router: "mesh", legs: mesh.legs }} />
{(mesh.inpad ?? []).map((v, i) => <Via key={`p${i}`} k={`p${i}`} v={v} />)}
{(mesh.stitch ?? []).map((v, i) => <Via key={`s${i}`} k={`s${i}`} v={v} />)}
{(mesh.inward ?? []).map((v, i) => <Via key={`i${i}`} k={`i${i}`} v={v} />)}
</>
)
}