Skip to content

Commit c33a5c3

Browse files
committed
Document biscuit board laser ablation workflow
1 parent 6c6edd5 commit c33a5c3

File tree

3 files changed

+217
-1
lines changed

3 files changed

+217
-1
lines changed

docs/elements/board.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ Usually you'll want to use an autorouter preset:
8686
- `autorouter="auto"` - Uses the [platform configuration](../guides/running-tscircuit/platform-configuration.md). For tscircuit.com this defaults to `sequential-trace`.
8787
- `autorouter="sequential-trace"` - Iterate over each trace and use tscircuit's fast built-in autorouter. This method is fast and deterministic but often fails with over 50 traces.
8888
- `autorouter="auto-local"` - Use the platform configuration, but only route locally (do not make API calls)
89-
- `autorouter="auto-cloud"` - Use the platform configuration for
89+
- `autorouter="auto-cloud"` - Use the platform configuration for
90+
- `autorouter="laser_prefab"` - Reserve [prefabricated vias](./via.mdx#prefabricated-vias-for-laser-routing) that can be reassigned during routing. Ideal for rapid-turn PCBs produced with laser ablation and mechanical drilling templates. See the [Biscuit Board Laser Ablation guide](../guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx) for a complete walkthrough.
9091

9192
For complex boards with over 50 traces, you should use `autorouter="auto-cloud"`
9293
to take advantage of tscircuit's cloud autorouters, which internally use the popular

docs/elements/via.mdx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,54 @@ import CircuitPreview from "@site/src/components/CircuitPreview"
4242
| outerDiameter | number \| string | "0.8mm" | Outer diameter of the copper annular ring |
4343
| pcbX | number | 0 | PCB X position of the via |
4444
| pcbY | number | 0 | PCB Y position of the via |
45+
| netIsAssignable | boolean | `false` | Marks the via as prefabricated so autorouters like `laser_prefab` can claim it for any compatible net |
46+
47+
### Prefabricated vias for laser routing
48+
49+
The [`laser_prefab` autorouter](./board.mdx#setting-the-autorouter) is designed
50+
for fabrication flows that combine laser ablation with pre-drilled or templated
51+
vias. These workflows start with a "biscuit" carrier board that already contains
52+
a precise matrix of holes. Copper is laminated onto the carrier and a laser
53+
ablates the top copper to define traces before the template's vias are filled or
54+
re-plated.
55+
56+
When you mark a via with `netIsAssignable`, the autorouter exports an
57+
**assignable obstacle** so the router can reuse the via for whichever net needs
58+
to cross layers during routing. This lets you place a library of vias ahead of
59+
time while still giving the autorouter flexibility to finish the layout. You can
60+
still pre-assign a net to the via in your design; the autorouter only replaces
61+
that assignment if a different trace claims the via.
62+
63+
:::tip
64+
Group all of the prefabricated vias together—usually in a separate subcircuit or
65+
component library—so you can reuse the same biscuit template across multiple
66+
projects. The `netIsAssignable` flag prevents unused vias from shorting random
67+
nets while remaining available to complete new connections.
68+
:::
69+
70+
<CircuitPreview
71+
defaultView="pcb"
72+
code={`export default () => (
73+
<board width="10mm" height="10mm" autorouter="laser_prefab">
74+
<testpoint name="TP_TOP" footprintVariant="pad" pcbX={0} pcbY={4} layer="top" />
75+
<testpoint name="TP_BOTTOM" footprintVariant="pad" pcbX={0} pcbY={-4} layer="bottom" />
76+
<via
77+
name="V_ASSIGNABLE"
78+
pcbX={0}
79+
pcbY={0}
80+
fromLayer="top"
81+
toLayer="bottom"
82+
holeDiameter="0.3mm"
83+
outerDiameter="0.6mm"
84+
netIsAssignable
85+
/>
86+
<trace from="TP_TOP.pin1" to="V_ASSIGNABLE.top" />
87+
<trace from="V_ASSIGNABLE.bottom" to="TP_BOTTOM.pin1" />
88+
</board>
89+
)`}
90+
/>
91+
92+
When the board renders, any assignable via that remains unused keeps its
93+
original net assignment. Otherwise, the autorouter replaces its net with the one
94+
required for the completed connection. For an end-to-end workflow, read the
95+
[Biscuit Board Laser Ablation guide](../guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx).
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
---
2+
title: Biscuit Board Laser Ablation
3+
description: Learn how to route PCBs against a prefabricated via template using the laser_prefab autorouter and the netIsAssignable via property.
4+
---
5+
6+
import CircuitPreview from "@site/src/components/CircuitPreview"
7+
8+
# Biscuit Board Laser Ablation
9+
10+
The **laser_prefab** autorouter pairs tscircuit with a fabrication process that
11+
combines laser ablation and a "biscuit" carrier board. Fabricators pre-drill a
12+
matrix of vias into an inexpensive substrate—the biscuit—then laminate thin
13+
copper to the top and bottom. A UV or IR laser ablates the copper, defining the
14+
traces while leaving the via barrels intact. Because the vias are prefabricated,
15+
you route against a known template instead of drilling new holes for every
16+
board.
17+
18+
This guide walks through designing for that workflow. You'll learn how to:
19+
20+
1. Prepare a via template that can be reused across designs.
21+
2. Configure your board to route with `autorouter="laser_prefab"`.
22+
3. Mark vias as assignable so the autorouter can claim them dynamically.
23+
4. Validate that the generated routing honors the biscuit's geometry.
24+
25+
## 1. Build a reusable via template
26+
27+
Create a library subcircuit that contains every via location available on the
28+
biscuit board. Mark each via with `netIsAssignable` so it becomes an assignable
29+
obstacle when the router runs. The vias can optionally include default net names
30+
to serve as documentation for repeated layouts.
31+
32+
```tsx title="src/biscuit-template.tsx"
33+
import { Fragment } from "react"
34+
35+
export const BiscuitTemplate = () => (
36+
<Fragment>
37+
<via name="B1" pcbX={-4} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
38+
<via name="B2" pcbX={0} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
39+
<via name="B3" pcbX={4} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
40+
<via name="B4" pcbX={-4} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
41+
<via name="B5" pcbX={0} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
42+
<via name="B6" pcbX={4} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
43+
</Fragment>
44+
)
45+
```
46+
47+
Keep the template focused on the vias themselves. Copper features such as fiducials or
48+
alignment marks should live in their own subcircuits so you can swap templates
49+
without affecting the mechanical stackup.
50+
51+
## 2. Place the biscuit template on your board
52+
53+
Include the template inside your `<board />` before adding components. Because
54+
the vias are already drilled in the physical biscuit, avoid translating or
55+
rotating the template in a way that misaligns the coordinates.
56+
57+
<CircuitPreview
58+
defaultView="pcb"
59+
code={`export default () => (
60+
<board width="20mm" height="20mm" autorouter="laser_prefab">
61+
<group name="biscuit" pcbX={0} pcbY={0}>
62+
<via name="B1" pcbX={-4} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
63+
<via name="B2" pcbX={0} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
64+
<via name="B3" pcbX={4} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
65+
<via name="B4" pcbX={-4} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
66+
<via name="B5" pcbX={0} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
67+
<via name="B6" pcbX={4} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
68+
</group>
69+
70+
<testpoint name="TP_TOP" footprintVariant="pad" pcbX={0} pcbY={9} layer="top" />
71+
<testpoint name="TP_BOTTOM" footprintVariant="pad" pcbX={0} pcbY={-9} layer="bottom" />
72+
</board>
73+
)`}
74+
/>
75+
76+
If your biscuit provides fiducials or tooling holes, align them with your CAD
77+
origin so the panelization step can easily merge your routed copper with the
78+
prefabricated template. Keep the board outline slightly inside the biscuit's
79+
usable area so the laser can clear debris without hitting the rails.
80+
81+
## 3. Route with `autorouter="laser_prefab"`
82+
83+
Once the template is in place, add traces exactly as you would for a conventional
84+
board. The router treats assignable vias as neutral territory: any net can claim
85+
them provided both layers are available and no design rules are violated.
86+
87+
```tsx title="src/laser-prefab-example.tsx"
88+
<board width="20mm" height="20mm" autorouter="laser_prefab">
89+
<BiscuitTemplate />
90+
91+
<chip
92+
name="U1"
93+
footprint="soic8"
94+
pcbX={-6}
95+
pcbY={0}
96+
connections={{ pin1: "R1.pin1", pin8: "B6.top" }}
97+
/>
98+
<resistor name="R1" resistance="1k" footprint="0402" pcbX={6} pcbY={0} />
99+
100+
<trace from="TP_TOP.pin1" to="B2.top" />
101+
<trace from="B2.bottom" to="TP_BOTTOM.pin1" />
102+
</board>
103+
```
104+
105+
During routing, tscircuit emits a **simple route JSON** that marks each
106+
`netIsAssignable` via as an obstacle with the `netIsAssignable` flag. The
107+
`laser_prefab` preset looks for that flag, allowing it to reserve a via for any
108+
trace that needs to change layers. The [integration test in the core
109+
library](https://github.com/tscircuit/core/blob/main/tests/autorouting/laser-prefab.test.tsx)
110+
verifies the behavior end to end.
111+
112+
### Reserving specific vias
113+
114+
Sometimes you know that certain vias must stay tied to a particular net—perhaps
115+
they connect to ground pour or stitching features. In that case, omit the
116+
`netIsAssignable` flag on those vias and route them manually. The router will
117+
leave them untouched while still consuming the rest of the biscuit template as
118+
needed.
119+
120+
## 4. Validate the routed output
121+
122+
After calling `circuit.renderUntilSettled()`, inspect the PCB view or export the
123+
Gerber/ODB++ data to confirm that:
124+
125+
- Every claimed via matches a real location on the biscuit template.
126+
- Unused vias remain isolated and keep their original net names.
127+
- Trace clearances respect your fabrication limits.
128+
129+
<CircuitPreview
130+
defaultView="pcb"
131+
code={`export default () => (
132+
<board width="20mm" height="20mm" autorouter="laser_prefab">
133+
<group name="biscuit">
134+
<via name="B2" pcbX={0} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
135+
<via name="B5" pcbX={0} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
136+
</group>
137+
138+
<testpoint name="TP_TOP" footprintVariant="pad" pcbX={0} pcbY={9} layer="top" />
139+
<testpoint name="TP_BOTTOM" footprintVariant="pad" pcbX={0} pcbY={-9} layer="bottom" />
140+
141+
<trace from="TP_TOP.pin1" to="B2.top" />
142+
<trace from="B2.bottom" to="B5.top" />
143+
<trace from="B5.bottom" to="TP_BOTTOM.pin1" />
144+
</board>
145+
)`}
146+
/>
147+
148+
If you need to adjust routing priorities, you can provide a custom autorouter
149+
object instead of the preset. Just make sure the implementation understands the
150+
`netIsAssignable` obstacles that tscircuit produces.
151+
152+
## Additional tips
153+
154+
- **Version your templates.** Include a `templateVersion` prop or layer marker so
155+
your fabrication team can confirm they are loading the correct biscuit.
156+
- **Simulate thermal load.** Prefabricated vias sometimes have smaller annular
157+
rings. Run a design-rule check (DRC) to ensure high-current nets can handle the
158+
reduced copper area.
159+
- **Document drill tolerances.** Share the biscuit's drill chart with your team so
160+
component footprints can account for any off-center holes.
161+
162+
With these practices, you can create a repeatable laser ablation workflow that
163+
leverages tscircuit's autorouting while taking full advantage of prefabricated
164+
via templates.

0 commit comments

Comments
 (0)