From c33a5c356a5011def36ec077b8be53eeb0cafcb6 Mon Sep 17 00:00:00 2001 From: Severin Ibarluzea Date: Sat, 1 Nov 2025 09:40:16 -0700 Subject: [PATCH 1/4] Document biscuit board laser ablation workflow --- docs/elements/board.mdx | 3 +- docs/elements/via.mdx | 51 ++++++ .../biscuit-board-laser-ablation.mdx | 164 ++++++++++++++++++ 3 files changed, 217 insertions(+), 1 deletion(-) create mode 100644 docs/guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx diff --git a/docs/elements/board.mdx b/docs/elements/board.mdx index de1825a..5946105 100644 --- a/docs/elements/board.mdx +++ b/docs/elements/board.mdx @@ -86,7 +86,8 @@ Usually you'll want to use an autorouter preset: - `autorouter="auto"` - Uses the [platform configuration](../guides/running-tscircuit/platform-configuration.md). For tscircuit.com this defaults to `sequential-trace`. - `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. - `autorouter="auto-local"` - Use the platform configuration, but only route locally (do not make API calls) -- `autorouter="auto-cloud"` - Use the platform configuration for +- `autorouter="auto-cloud"` - Use the platform configuration for +- `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. For complex boards with over 50 traces, you should use `autorouter="auto-cloud"` to take advantage of tscircuit's cloud autorouters, which internally use the popular diff --git a/docs/elements/via.mdx b/docs/elements/via.mdx index 046fa2d..aab9f63 100644 --- a/docs/elements/via.mdx +++ b/docs/elements/via.mdx @@ -42,3 +42,54 @@ import CircuitPreview from "@site/src/components/CircuitPreview" | outerDiameter | number \| string | "0.8mm" | Outer diameter of the copper annular ring | | 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 | + +### Prefabricated vias for laser routing + +The [`laser_prefab` autorouter](./board.mdx#setting-the-autorouter) is designed +for fabrication flows that combine laser ablation with pre-drilled or templated +vias. These workflows start with a "biscuit" carrier board that already contains +a precise matrix of holes. Copper is laminated onto the carrier and a laser +ablates the top copper to define traces before the template's vias are filled or +re-plated. + +When you mark a via with `netIsAssignable`, the autorouter exports an +**assignable obstacle** so the router can reuse the via for whichever net needs +to cross layers during routing. This lets you place a library of vias ahead of +time while still giving the autorouter flexibility to finish the layout. You can +still pre-assign a net to the via in your design; the autorouter only replaces +that assignment if a different trace claims the via. + +:::tip +Group all of the prefabricated vias together—usually in a separate subcircuit or +component library—so you can reuse the same biscuit template across multiple +projects. The `netIsAssignable` flag prevents unused vias from shorting random +nets while remaining available to complete new connections. +::: + + ( + + + + + + + + )`} +/> + +When the board renders, any assignable via that remains unused keeps its +original net assignment. Otherwise, the autorouter replaces its net with the one +required for the completed connection. For an end-to-end workflow, read the +[Biscuit Board Laser Ablation guide](../guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx). diff --git a/docs/guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx b/docs/guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx new file mode 100644 index 0000000..0aec33a --- /dev/null +++ b/docs/guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx @@ -0,0 +1,164 @@ +--- +title: Biscuit Board Laser Ablation +description: Learn how to route PCBs against a prefabricated via template using the laser_prefab autorouter and the netIsAssignable via property. +--- + +import CircuitPreview from "@site/src/components/CircuitPreview" + +# Biscuit Board Laser Ablation + +The **laser_prefab** autorouter pairs tscircuit with a fabrication process that +combines laser ablation and a "biscuit" carrier board. Fabricators pre-drill a +matrix of vias into an inexpensive substrate—the biscuit—then laminate thin +copper to the top and bottom. A UV or IR laser ablates the copper, defining the +traces while leaving the via barrels intact. Because the vias are prefabricated, +you route against a known template instead of drilling new holes for every +board. + +This guide walks through designing for that workflow. You'll learn how to: + +1. Prepare a via template that can be reused across designs. +2. Configure your board to route with `autorouter="laser_prefab"`. +3. Mark vias as assignable so the autorouter can claim them dynamically. +4. Validate that the generated routing honors the biscuit's geometry. + +## 1. Build a reusable via template + +Create a library subcircuit that contains every via location available on the +biscuit board. Mark each via with `netIsAssignable` so it becomes an assignable +obstacle when the router runs. The vias can optionally include default net names +to serve as documentation for repeated layouts. + +```tsx title="src/biscuit-template.tsx" +import { Fragment } from "react" + +export const BiscuitTemplate = () => ( + + + + + + + + +) +``` + +Keep the template focused on the vias themselves. Copper features such as fiducials or +alignment marks should live in their own subcircuits so you can swap templates +without affecting the mechanical stackup. + +## 2. Place the biscuit template on your board + +Include the template inside your `` before adding components. Because +the vias are already drilled in the physical biscuit, avoid translating or +rotating the template in a way that misaligns the coordinates. + + ( + + + + + + + + + + + + + +)`} +/> + +If your biscuit provides fiducials or tooling holes, align them with your CAD +origin so the panelization step can easily merge your routed copper with the +prefabricated template. Keep the board outline slightly inside the biscuit's +usable area so the laser can clear debris without hitting the rails. + +## 3. Route with `autorouter="laser_prefab"` + +Once the template is in place, add traces exactly as you would for a conventional +board. The router treats assignable vias as neutral territory: any net can claim +them provided both layers are available and no design rules are violated. + +```tsx title="src/laser-prefab-example.tsx" + + + + + + + + + +``` + +During routing, tscircuit emits a **simple route JSON** that marks each +`netIsAssignable` via as an obstacle with the `netIsAssignable` flag. The +`laser_prefab` preset looks for that flag, allowing it to reserve a via for any +trace that needs to change layers. The [integration test in the core +library](https://github.com/tscircuit/core/blob/main/tests/autorouting/laser-prefab.test.tsx) +verifies the behavior end to end. + +### Reserving specific vias + +Sometimes you know that certain vias must stay tied to a particular net—perhaps +they connect to ground pour or stitching features. In that case, omit the +`netIsAssignable` flag on those vias and route them manually. The router will +leave them untouched while still consuming the rest of the biscuit template as +needed. + +## 4. Validate the routed output + +After calling `circuit.renderUntilSettled()`, inspect the PCB view or export the +Gerber/ODB++ data to confirm that: + +- Every claimed via matches a real location on the biscuit template. +- Unused vias remain isolated and keep their original net names. +- Trace clearances respect your fabrication limits. + + ( + + + + + + + + + + + + + +)`} +/> + +If you need to adjust routing priorities, you can provide a custom autorouter +object instead of the preset. Just make sure the implementation understands the +`netIsAssignable` obstacles that tscircuit produces. + +## Additional tips + +- **Version your templates.** Include a `templateVersion` prop or layer marker so + your fabrication team can confirm they are loading the correct biscuit. +- **Simulate thermal load.** Prefabricated vias sometimes have smaller annular + rings. Run a design-rule check (DRC) to ensure high-current nets can handle the + reduced copper area. +- **Document drill tolerances.** Share the biscuit's drill chart with your team so + component footprints can account for any off-center holes. + +With these practices, you can create a repeatable laser ablation workflow that +leverages tscircuit's autorouting while taking full advantage of prefabricated +via templates. From 0c771cc65f6c304065fcd81912030867c3b8f40a Mon Sep 17 00:00:00 2001 From: Severin Ibarluzea Date: Sat, 1 Nov 2025 16:03:12 -0700 Subject: [PATCH 2/4] Streamline laser prefab via documentation --- docs/elements/via.mdx | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/docs/elements/via.mdx b/docs/elements/via.mdx index aab9f63..9919352 100644 --- a/docs/elements/via.mdx +++ b/docs/elements/via.mdx @@ -46,26 +46,11 @@ import CircuitPreview from "@site/src/components/CircuitPreview" ### Prefabricated vias for laser routing -The [`laser_prefab` autorouter](./board.mdx#setting-the-autorouter) is designed -for fabrication flows that combine laser ablation with pre-drilled or templated -vias. These workflows start with a "biscuit" carrier board that already contains -a precise matrix of holes. Copper is laminated onto the carrier and a laser -ablates the top copper to define traces before the template's vias are filled or -re-plated. - -When you mark a via with `netIsAssignable`, the autorouter exports an -**assignable obstacle** so the router can reuse the via for whichever net needs -to cross layers during routing. This lets you place a library of vias ahead of -time while still giving the autorouter flexibility to finish the layout. You can -still pre-assign a net to the via in your design; the autorouter only replaces -that assignment if a different trace claims the via. - -:::tip -Group all of the prefabricated vias together—usually in a separate subcircuit or -component library—so you can reuse the same biscuit template across multiple -projects. The `netIsAssignable` flag prevents unused vias from shorting random -nets while remaining available to complete new connections. -::: +The [`laser_prefab` autorouter](./board.mdx#setting-the-autorouter) pairs with +prefabricated ("biscuit") via templates used in laser ablation workflows. +Setting `netIsAssignable` on a via exports it as an **assignable obstacle**, +allowing the autorouter to repurpose the hole for whichever net needs to switch +layers during routing. -When the board renders, any assignable via that remains unused keeps its -original net assignment. Otherwise, the autorouter replaces its net with the one -required for the completed connection. For an end-to-end workflow, read the +Unused assignable vias keep their original net, while claimed vias are updated +to match the completed connection. For a full walkthrough, see the [Biscuit Board Laser Ablation guide](../guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx). From a8317ae6b0e2f31456b75c70a516b8e53c93a2b9 Mon Sep 17 00:00:00 2001 From: Severin Ibarluzea Date: Sat, 1 Nov 2025 16:03:17 -0700 Subject: [PATCH 3/4] Clarify laser prefab terminology --- docs/elements/via.mdx | 5 ++-- .../biscuit-board-laser-ablation.mdx | 28 +++++++++---------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/docs/elements/via.mdx b/docs/elements/via.mdx index 9919352..3fa13ce 100644 --- a/docs/elements/via.mdx +++ b/docs/elements/via.mdx @@ -48,9 +48,8 @@ import CircuitPreview from "@site/src/components/CircuitPreview" The [`laser_prefab` autorouter](./board.mdx#setting-the-autorouter) pairs with prefabricated ("biscuit") via templates used in laser ablation workflows. -Setting `netIsAssignable` on a via exports it as an **assignable obstacle**, -allowing the autorouter to repurpose the hole for whichever net needs to switch -layers during routing. +Setting `netIsAssignable` on a via marks it as reusable so the autorouter can +repurpose the hole for whichever net needs to switch layers during routing. ( ) ``` -Keep the template focused on the vias themselves. Copper features such as fiducials or -alignment marks should live in their own subcircuits so you can swap templates -without affecting the mechanical stackup. +Keep the template focused on the vias themselves. Copper features such as +fiducials or alignment marks should live in their own components so you can swap +templates without affecting the mechanical stackup. ## 2. Place the biscuit template on your board @@ -73,10 +73,8 @@ rotating the template in a way that misaligns the coordinates. )`} /> -If your biscuit provides fiducials or tooling holes, align them with your CAD -origin so the panelization step can easily merge your routed copper with the -prefabricated template. Keep the board outline slightly inside the biscuit's -usable area so the laser can clear debris without hitting the rails. +Keep the board outline slightly inside the biscuit's usable area so the laser +can clear debris without hitting the rails. ## 3. Route with `autorouter="laser_prefab"` @@ -103,9 +101,9 @@ them provided both layers are available and no design rules are violated. ``` During routing, tscircuit emits a **simple route JSON** that marks each -`netIsAssignable` via as an obstacle with the `netIsAssignable` flag. The -`laser_prefab` preset looks for that flag, allowing it to reserve a via for any -trace that needs to change layers. The [integration test in the core +`netIsAssignable` via with the `netIsAssignable` flag. The `laser_prefab` preset +looks for that flag, allowing it to reserve a via for any trace that needs to +change layers. The [integration test in the core library](https://github.com/tscircuit/core/blob/main/tests/autorouting/laser-prefab.test.tsx) verifies the behavior end to end. @@ -147,7 +145,7 @@ Gerber/ODB++ data to confirm that: If you need to adjust routing priorities, you can provide a custom autorouter object instead of the preset. Just make sure the implementation understands the -`netIsAssignable` obstacles that tscircuit produces. +`netIsAssignable` vias that tscircuit produces. ## Additional tips From 75778e807c0ed45e2142544314267eb71b5cc2be Mon Sep 17 00:00:00 2001 From: Severin Ibarluzea Date: Sat, 1 Nov 2025 20:43:04 -0700 Subject: [PATCH 4/4] Trim laser prefab guidance --- docs/elements/board.mdx | 2 +- docs/elements/via.mdx | 35 +------------ .../biscuit-board-laser-ablation.mdx | 51 +++---------------- 3 files changed, 8 insertions(+), 80 deletions(-) diff --git a/docs/elements/board.mdx b/docs/elements/board.mdx index 5946105..82303a2 100644 --- a/docs/elements/board.mdx +++ b/docs/elements/board.mdx @@ -87,7 +87,7 @@ Usually you'll want to use an autorouter preset: - `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. - `autorouter="auto-local"` - Use the platform configuration, but only route locally (do not make API calls) - `autorouter="auto-cloud"` - Use the platform configuration for -- `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. +- `autorouter="laser_prefab"` - Reserve prefabricated vias 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. For complex boards with over 50 traces, you should use `autorouter="auto-cloud"` to take advantage of tscircuit's cloud autorouters, which internally use the popular diff --git a/docs/elements/via.mdx b/docs/elements/via.mdx index 3fa13ce..fad832b 100644 --- a/docs/elements/via.mdx +++ b/docs/elements/via.mdx @@ -42,37 +42,4 @@ import CircuitPreview from "@site/src/components/CircuitPreview" | outerDiameter | number \| string | "0.8mm" | Outer diameter of the copper annular ring | | 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 | - -### Prefabricated vias for laser routing - -The [`laser_prefab` autorouter](./board.mdx#setting-the-autorouter) pairs with -prefabricated ("biscuit") via templates used in laser ablation workflows. -Setting `netIsAssignable` on a via marks it as reusable so the autorouter can -repurpose the hole for whichever net needs to switch layers during routing. - - ( - - - - - - - - )`} -/> - -Unused assignable vias keep their original net, while claimed vias are updated -to match the completed connection. For a full walkthrough, see the -[Biscuit Board Laser Ablation guide](../guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx). +| netIsAssignable | boolean | `false` | Marks the via as prefabricated so autorouters like `laser_prefab` can claim it for any compatible net. For a full workflow, see the [Biscuit Board Laser Ablation guide](../guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx). | diff --git a/docs/guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx b/docs/guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx index 0d8f790..249fdfb 100644 --- a/docs/guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx +++ b/docs/guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx @@ -17,12 +17,10 @@ board. This guide walks through designing for that workflow. You'll learn how to: -1. Prepare a via template that can be reused across designs. -2. Configure your board to route with `autorouter="laser_prefab"`. -3. Mark vias as assignable so the autorouter can claim them dynamically. -4. Validate that the generated routing honors the biscuit's geometry. +1. Build a reusable via template (the biscuit board). +2. Place that template, route with `autorouter="laser_prefab"`, and confirm the results match the prefabricated geometry. -## 1. Build a reusable via template +## 1. Build a reusable via template (a biscuit board) Create a component for your biscuit template that contains every via location available on the board. Mark each via with `netIsAssignable` so it is treated as @@ -48,7 +46,7 @@ Keep the template focused on the vias themselves. Copper features such as fiducials or alignment marks should live in their own components so you can swap templates without affecting the mechanical stackup. -## 2. Place the biscuit template on your board +## 2. Place the biscuit template, route, and validate Include the template inside your `` before adding components. Because the vias are already drilled in the physical biscuit, avoid translating or @@ -76,8 +74,6 @@ rotating the template in a way that misaligns the coordinates. Keep the board outline slightly inside the biscuit's usable area so the laser can clear debris without hitting the rails. -## 3. Route with `autorouter="laser_prefab"` - Once the template is in place, add traces exactly as you would for a conventional board. The router treats assignable vias as neutral territory: any net can claim them provided both layers are available and no design rules are violated. @@ -100,25 +96,8 @@ them provided both layers are available and no design rules are violated. ``` -During routing, tscircuit emits a **simple route JSON** that marks each -`netIsAssignable` via with the `netIsAssignable` flag. The `laser_prefab` preset -looks for that flag, allowing it to reserve a via for any trace that needs to -change layers. The [integration test in the core -library](https://github.com/tscircuit/core/blob/main/tests/autorouting/laser-prefab.test.tsx) -verifies the behavior end to end. - -### Reserving specific vias - -Sometimes you know that certain vias must stay tied to a particular net—perhaps -they connect to ground pour or stitching features. In that case, omit the -`netIsAssignable` flag on those vias and route them manually. The router will -leave them untouched while still consuming the rest of the biscuit template as -needed. - -## 4. Validate the routed output - -After calling `circuit.renderUntilSettled()`, inspect the PCB view or export the -Gerber/ODB++ data to confirm that: +After generating manufacturing data (Gerber or ODB++ exports) or reviewing the +PCB preview, confirm that: - Every claimed via matches a real location on the biscuit template. - Unused vias remain isolated and keep their original net names. @@ -142,21 +121,3 @@ Gerber/ODB++ data to confirm that: )`} /> - -If you need to adjust routing priorities, you can provide a custom autorouter -object instead of the preset. Just make sure the implementation understands the -`netIsAssignable` vias that tscircuit produces. - -## Additional tips - -- **Version your templates.** Include a `templateVersion` prop or layer marker so - your fabrication team can confirm they are loading the correct biscuit. -- **Simulate thermal load.** Prefabricated vias sometimes have smaller annular - rings. Run a design-rule check (DRC) to ensure high-current nets can handle the - reduced copper area. -- **Document drill tolerances.** Share the biscuit's drill chart with your team so - component footprints can account for any off-center holes. - -With these practices, you can create a repeatable laser ablation workflow that -leverages tscircuit's autorouting while taking full advantage of prefabricated -via templates.