krishnax12/watchy-eink-smartwatch

Unfinished prototype (not production-ready): 4 native DRC errors, 2 display-flex intersections, and missing antenna radiator copper remain

Version
1.2.7
License
MIT
Stars
1

pcb/BoardCopper.tsx

import { Fragment } from "react";
import { BOARD_OUTLINE } from "../board-outline";
import { BOARD_COPPER_LAYERS } from "./board-stackup";

// Retain the board's rounded lower edge. The upper ground boundary stays
// below the antenna; the native pour solver applies the edge margin.
const groundPourOutline = [
	...BOARD_OUTLINE.filter(({ y }) => y <= 14.08),
	{ x: 16.9, y: 14.08 },
	{ x: -16.9, y: 14.08 },
];

/** Ground copper is solved by tscircuit after autorouting, not saved geometry. */
export const BoardCopper = () => (
	<>
		{/* No unrelated copper above the antenna feed/matching region. */}
		<keepout
			shape="rect"
			pcbX={-1.5}
			pcbY={18.125}
			width="16.35mm"
			height="4.55mm"
			layers={[...BOARD_COPPER_LAYERS]}
			excludeRefs={[".AE1"]}
		/>
		{BOARD_COPPER_LAYERS.map((layer) => (
			<Fragment key={layer}>
				<copperpour
					name={`GND_${layer.toUpperCase()}`}
					layer={layer}
					connectsTo="net.GND"
					outline={groundPourOutline}
					clearance="0.2032mm"
					boardEdgeMargin="0.3mm"
					cutoutMargin="0.3mm"
					useThermalReliefs
					coveredWithSolderMask
				/>
			</Fragment>
		))}
	</>
);