Skip to content
Merged
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
21 changes: 21 additions & 0 deletions docs/elements/trace.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Here's a simple example connecting two components:
| `maxLength` | Maximum length the trace can be (optional) | `"10mm"` |
| `minLength` | Minimum length the trace must be (optional) | `"5mm"` |
| `width` | Width of the trace (optional) | `"0.2mm"` |
| `thickness` | Same as `width`; sets the copper width for the trace (optional) | `"0.2mm"` |
| `pcbPath` | Array of points defining a manual PCB path relative to an anchor port | `[{ x: 1, y: 0 }, { x: 1, y: 1 }]` |
| `pcbPathRelativeTo` | Port selector that `pcbPath` coordinates are relative to (defaults to the `from` port) | `".R1 > .pin2"` |

Expand Down Expand Up @@ -152,3 +153,23 @@ When using net connections we use a Rats Nest on a PCB view or a net label on a
schematic view. When you see a dotted line on a Rats Nest, you should think of
it as a _possible_ connection point, but not necessarily the final place where
the autorouter will connect to the net.

## Creating a direct path with a custom thickness

Use an empty `pcbPath` array to keep the autorouter's direct path between two
ports while overriding the trace width via the `thickness` property.

<CircuitPreview leftView="code" rightView="pcb" code={`
export default () => (
<board width="20mm" height="10mm">
<resistor name="R1" resistance="1k" footprint="0402" pcbX={-3} />
<capacitor name="C1" capacitance="100nF" footprint="0402" pcbX={3} />
<trace
from="R1.pin2"
to="C1.pin1"
pcbPath={[]}
thickness="0.5mm"
/>
</board>
)
`} />