<courtyardoutline />
Overview
Use <courtyardoutline /> when your footprint needs a non-rectangular, non-circular courtyard shape.
Basic Outline Example
export default () => (
<board width="30mm" height="24mm">
<chip
name="U1"
footprint={
<footprint>
<platedhole shape="circle" pcbX={-4} pcbY={-2.5} outerDiameter={2.2} holeDiameter={1.1} />
<platedhole shape="circle" pcbX={-4} pcbY={2.5} outerDiameter={2.2} holeDiameter={1.1} />
<platedhole shape="circle" pcbX={4} pcbY={-2.5} outerDiameter={2.2} holeDiameter={1.1} />
<platedhole shape="circle" pcbX={4} pcbY={2.5} outerDiameter={2.2} holeDiameter={1.1} />
<courtyardoutline
outline={[
{ x: -6, y: -5 },
{ x: 6, y: -5 },
{ x: 6, y: 5 },
{ x: 0, y: 7 },
{ x: -6, y: 5 },
]}
/>
</footprint>
}
/>
</board>
)
Filled Outline Example
export default () => (
<board width="28mm" height="22mm">
<chip
name="ANT1"
footprint={
<footprint>
<platedhole shape="circle" pcbX={0} pcbY={-3} outerDiameter={2.2} holeDiameter={1.1} />
<courtyardoutline
outline={[
{ x: -7, y: -5 },
{ x: 7, y: -5 },
{ x: 7, y: 4 },
{ x: 0, y: 7 },
{ x: -7, y: 4 },
]}
/>
</footprint>
}
/>
</board>
)
Anchor Alignment Examples
<courtyardoutline /> draws the polygon you provide in footprint coordinates.
To make the footprint origin act like a specific “anchor” (center, top-left,
bottom-right, etc), translate the outline points accordingly.
export default () => {
const W = 10
const H = 6
const rect = [
{ x: 0, y: 0 },
{ x: W, y: 0 },
{ x: W, y: H },
{ x: 0, y: H },
]
const translate = (outline, dx, dy) =>
outline.map((p) => ({ x: p.x + dx, y: p.y + dy }))
return (
<board width="70mm" height="26mm">
<chip
name="CENTER"
pcbX={-20}
footprint={
<footprint>
<platedhole shape="circle" pcbX={0} pcbY={0} outerDiameter={1.6} holeDiameter={0.8} />
<courtyardoutline outline={translate(rect, -W / 2, -H / 2)} />
</footprint>
}
/>
<chip
name="TOP_LEFT"
footprint={
<footprint>
<platedhole shape="circle" pcbX={0} pcbY={0} outerDiameter={1.6} holeDiameter={0.8} />
<courtyardoutline outline={translate(rect, 0, -H)} />
</footprint>
}
/>
<chip
name="BOTTOM_RIGHT"
pcbX={20}
footprint={
<footprint>
<platedhole shape="circle" pcbX={0} pcbY={0} outerDiameter={1.6} holeDiameter={0.8} />
<courtyardoutline outline={translate(rect, -W, 0)} />
</footprint>
}
/>
</board>
)
}