<hole />
Overview
A hole can be used for mounting and doesn't have any conductive properties, for
a hole with a conductive ring of copper see <platedhole />.
Holes do not have a schematic representation.
Holes can be used inside of a <footprint /> or
as a standalone element.
Hole Shapes
Three hole shapes are supported:
circle- A circular hole (default)pill- A pill-shaped hole (rounded rectangle)rect- A rectangular hole
Circle Hole
A circular hole is the most common type used for mounting. Provide either
diameter or radius:
export default () => (
<board width="30mm" height="20mm">
<hole radius="1.5mm" pcbX={0} pcbY={0} />
</board>
)
Pill-Shaped Hole
Pill-shaped holes are useful for mounting components that need elongated holes or for allowing some positional adjustment:
export default () => (
<board width="30mm" height="20mm">
<hole
shape="pill"
width="5mm"
height="2mm"
pcbX={0}
pcbY={0}
/>
</board>
)
Rectangular Hole
Rectangular holes are useful when you need a slot with straight edges:
export default () => (
<board width="30mm" height="20mm">
<hole
shape="rect"
width="5mm"
height="2mm"
pcbX={0}
pcbY={0}
/>
</board>
)
Rotated Pill Hole
Pill-shaped and rectangular holes can be rotated using the pcbRotation
property:
export default () => (
<board width="30mm" height="20mm">
<hole
shape="pill"
width="5mm"
height="2mm"
pcbX={0}
pcbY={0}
pcbRotation="45deg"
solderMaskMargin="0.2mm"
coveredWithSolderMask={false}
/>
</board>
)
Properties
| Property | Shape | Type | Default | Description |
|---|---|---|---|---|
| shape | all | "circle" | "pill" | "rect" | "circle" | Shape of the hole |
| diameter | circle | number | string | - | Diameter of the circular hole |
| radius | circle | number | string | - | Radius of the circular hole |
| width | pill, rect | number | string | - | Width of the pill-shaped or rectangular hole |
| height | pill, rect | number | string | - | Height of the pill-shaped or rectangular hole |
| solderMaskMargin | all | number | string | - | Solder mask opening margin around the hole |
| coveredWithSolderMask | all | boolean | - | Whether the hole should be covered by solder mask |
| pcbX | all | number | 0 | X position of the hole center on the PCB |
| pcbY | all | number | 0 | Y position of the hole center on the PCB |
| pcbRotation | pill, rect | number | string | 0 | Rotation angle in degrees (e.g., "45deg" or 45) |