diff --git a/docs/elements/board.mdx b/docs/elements/board.mdx index 716e5fce..1bfa10ea 100644 --- a/docs/elements/board.mdx +++ b/docs/elements/board.mdx @@ -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. | @@ -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. + + ( + + + + + + + + + + +)`} +/> + +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: diff --git a/docs/elements/via.mdx b/docs/elements/via.mdx index d17e619f..443e0213 100644 --- a/docs/elements/via.mdx +++ b/docs/elements/via.mdx @@ -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. + + ( + + + + + + + + + + + + + +)`} +/> + +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. diff --git a/src/components/CircuitPreview/CircuitPreview.tsx b/src/components/CircuitPreview/CircuitPreview.tsx index 7e229316..9e9fad85 100644 --- a/src/components/CircuitPreview/CircuitPreview.tsx +++ b/src/components/CircuitPreview/CircuitPreview.tsx @@ -146,6 +146,7 @@ export default function CircuitPreview({ defaultSimulationExperimentName, verticalStack = false, showCourtyards = false, + showSolderMask = false, showDebugObjects = false, wrapCode = true, }: { @@ -181,6 +182,7 @@ export default function CircuitPreview({ defaultSimulationExperimentName?: string verticalStack?: boolean showCourtyards?: boolean + showSolderMask?: boolean showDebugObjects?: boolean wrapCode?: boolean }) { @@ -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 @@ -279,6 +282,7 @@ export default function CircuitPreview({ fsMapOrCode, mainComponentPath, showCourtyards, + showSolderMask, showDebugObjects, circuitJson, pcbImageUrl,