Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions docs/elements/board.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import CircuitPreview from '@site/src/components/CircuitPreview'
| `borderRadius` | `string \| number` | Round the corners of rectangular outlines by the specified radius. |
| `layers` | `1 \| 2 \| 4 \| 6 \| 8 \| 10` | Specify the number of copper layers in the board stackup. Defaults to 2 layers. |
| `allowBlindAndBuriedVias` | `boolean` | Allow partial-stack autorouter vias. Defaults to `false` (full-stack vias); confirm manufacturer support before enabling. |
| `defaultViaTenting` | `boolean \| string` | Default solder-mask coverage for vias. Accepts the same values as [`via.tented`](./via.mdx#via-tenting); an explicit `tented` prop on a via overrides it. See [Default via tenting](#default-via-tenting). |
| `autorouter` | `'auto' \| 'auto-local' \| 'fanout' \| 'laser_prefab' \| 'auto_jumper' \| AutorouterConfig` | Select a built-in autorouter preset or provide a configuration object. |
| `autorouterEffortLevel` | `'1x' \| '2x' \| '5x' \| '10x' \| '100x'` | Increase autorouter compute effort for harder routing problems (higher values are slower and can improve completion rate). |
| `autorouterVersion` | `'beta_pipeline1' \| 'beta_pipeline3' \| 'beta_pipeline4' \| 'beta_pipeline5' \| 'beta_pipeline7' \| 'beta_pipeline9' \| 'latest'` | Pin routing to a known autorouter implementation when comparing routing behavior across versions. Unknown values fall back to `latest` with a warning. |
Expand Down Expand Up @@ -107,6 +108,60 @@ instantly:
Simply remove `routingDisabled` or set it to `false` when you're ready to see the
final routed board. This workflow significantly speeds up the iterative design process.

### Default via tenting

Set `defaultViaTenting` on the board to choose the default solder-mask coverage
for its vias. It accepts the same [values as `tented`](./via.mdx#via-tenting),
including `true`, `false`, `"top_tented"`, and `"bottom_tented"`.

In this example, the first via inherits top-only tenting. The second explicitly
uses `tented={false}` to expose both sides, and the third uses `tented` to tent
both sides. An explicit `false` overrides the board default just like any other
`tented` value.

<CircuitPreview
defaultView="pcb"
splitView={false}
hideSchematicTab
showSolderMask
cameraPreset="top-down"
code={`export default () => (
<board width="28mm" height="10mm" defaultViaTenting="top_tented">
<via
pcbX={-9}
fromLayer="top"
toLayer="bottom"
outerDiameter="1.2mm"
holeDiameter="0.6mm"
/>
<silkscreentext pcbX={-9} pcbY={2} fontSize={0.8} text="Inherited" />

<via
pcbX={0}
fromLayer="top"
toLayer="bottom"
outerDiameter="1.2mm"
holeDiameter="0.6mm"
tented={false}
/>
<silkscreentext pcbX={0} pcbY={2} fontSize={0.8} text="Exposed" />

<via
pcbX={9}
fromLayer="top"
toLayer="bottom"
outerDiameter="1.2mm"
holeDiameter="0.6mm"
tented
/>
<silkscreentext pcbX={9} pcbY={2} fontSize={0.8} text="Both sides" />
</board>
)`}
/>

The PCB preview shows the top side with solder mask visible. On the bottom
side, only **Both sides** is tented. Select **Code** to see the default and overrides.

### Board Material and Colors

You can customize the appearance and manufacturing properties of your board:
Expand Down
75 changes: 75 additions & 0 deletions docs/elements/via.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,81 @@ import CircuitPreview from "@site/src/components/CircuitPreview"
| toLayer | string | "bottom" | Ending layer for the via |
| holeDiameter | number \| string | "0.4mm" | Diameter of the plated hole |
| outerDiameter | number \| string | "0.8mm" | Outer diameter of the copper annular ring |
| tented | boolean \| string | Inherits the board default | Select which sides have solder mask over the via. See [Via tenting](#via-tenting) for accepted values. |
| pcbX | number | 0 | PCB X position of the via |
| pcbY | number | 0 | PCB Y position of the via |
| netIsAssignable | boolean | `false` | Marks the via as prefabricated so autorouters like `laser_prefab` can claim it for any compatible net. |

## Via tenting

Use `tented` to control solder-mask coverage on each side of a via:

| `tented` value | Top side | Bottom side |
| --- | --- | --- |
| `true`, `"both_sides"`, or `"top_and_bottom_tented"` | Tented | Tented |
| `"top_tented"` | Tented | Exposed |
| `"bottom_tented"` | Exposed | Tented |
| `false` or `"exposed"` | Exposed | Exposed |

The `tented` shorthand is equivalent to `tented={true}`. If you omit it, the
via inherits [`defaultViaTenting`](./board.mdx#default-via-tenting) from its board.

With solder mask visible, **Both sides** and **Top only** have a mask-colored
ring and a darkened center on the top side. **Exposed** and **Bottom only** have
exposed copper there. The PCB preview below shows the top side with solder mask
visible. Select **Code** to see the props used for each via.

<CircuitPreview
defaultView="pcb"
splitView={false}
hideSchematicTab
showSolderMask
cameraPreset="top-down"
code={`export default () => (
<board width="32mm" height="10mm">
<via
pcbX={-12}
fromLayer="top"
toLayer="bottom"
outerDiameter="1.2mm"
holeDiameter="0.6mm"
tented={false}
/>
<silkscreentext pcbX={-12} pcbY={2} fontSize={0.8} text="Exposed" />

<via
pcbX={-4}
fromLayer="top"
toLayer="bottom"
outerDiameter="1.2mm"
holeDiameter="0.6mm"
tented
/>
<silkscreentext pcbX={-4} pcbY={2} fontSize={0.8} text="Both sides" />

<via
pcbX={4}
fromLayer="top"
toLayer="bottom"
outerDiameter="1.2mm"
holeDiameter="0.6mm"
tented="top_tented"
/>
<silkscreentext pcbX={4} pcbY={2} fontSize={0.8} text="Top only" />

<via
pcbX={12}
fromLayer="top"
toLayer="bottom"
outerDiameter="1.2mm"
holeDiameter="0.6mm"
tented="bottom_tented"
/>
<silkscreentext pcbX={12} pcbY={2} fontSize={0.8} text="Bottom only" />
</board>
)`}
/>

Tenting does not fill the via or remove its physical drill hole. The darkened
center represents the hole beneath the surface mask treatment; drill data is
preserved for manufacturing.
4 changes: 4 additions & 0 deletions src/components/CircuitPreview/CircuitPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export default function CircuitPreview({
defaultSimulationExperimentName,
verticalStack = false,
showCourtyards = false,
showSolderMask = false,
showDebugObjects = false,
wrapCode = true,
}: {
Expand Down Expand Up @@ -181,6 +182,7 @@ export default function CircuitPreview({
defaultSimulationExperimentName?: string
verticalStack?: boolean
showCourtyards?: boolean
showSolderMask?: boolean
showDebugObjects?: boolean
wrapCode?: boolean
}) {
Expand Down Expand Up @@ -270,6 +272,7 @@ export default function CircuitPreview({
const flags: string[] = []

if (showCourtyards) flags.push("show_courtyards=true")
if (showSolderMask) flags.push("show_solder_mask=true")
if (showDebugObjects) flags.push("show_debug_objects=true")
if (flags.length === 0) return basePcbUrl

Expand All @@ -279,6 +282,7 @@ export default function CircuitPreview({
fsMapOrCode,
mainComponentPath,
showCourtyards,
showSolderMask,
showDebugObjects,
circuitJson,
pcbImageUrl,
Expand Down
Loading