`thickness` on one `<trace>` widens every autorouted trace on the same net

Open
#5,526 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@aswadi is already working on this.

Since Nov 15, 2026.

  • #5534 by @aswadi — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript
Domain
tooling

Research direction

The issue gives a full repro but no file: start where <trace> props are parsed into trace records, then follow how the autorouter derives width and name for each connection on a net. Compare against the existing <net nominalTraceWidth> handling, which is the intended per-net path, and check why a per-trace thickness leaks into the net-level default and into sibling traces' labels. Done means the repro compiles to Circuit JSON where only the R1.pin2–R2.pin1 pcb_trace is 0.8mm and each trace keeps its own name.

Written by the indexing model from the issue text.

Description

Setting thickness on one <trace> makes every autorouted trace on that net use that width, including traces that didn't ask for it.

export default () => (
  <board width="30mm" height="20mm">
    <resistor name="R1" resistance="1k" footprint="0603" pcbX={-10} pcbY={5} />
    <resistor name="R2" resistance="1k" footprint="0603" pcbX={10} pcbY={5} />
    <resistor name="R3" resistance="1k" footprint="0603" pcbX={-10} pcbY={-5} />
    <resistor name="R4" resistance="1k" footprint="0603" pcbX={10} pcbY={-5} />
    {/* only this trace asks for 0.8mm */}
    <trace from="R1.pin2" to="R2.pin1" thickness="0.8mm" />
    {/* same net, no thickness */}
    <trace from="R3.pin2" to="net.VBUS" />
    <trace from="R4.pin1" to="net.VBUS" />
    <trace from="R1.pin2" to="net.VBUS" />
  </board>
)

Result: all three pcb_traces on the net are 0.8 mm wide, and all three are labelled R1.pin2 to R2.pin1, the thick trace's name, even the ones that run to R3 and R4.

Expected: only the R1–R2 connection is 0.8 mm; the others use the default width. <net nominalTraceWidth> already exists for the case where the whole net should be wide.

Why it matters:

  • On a real board (a USB-C powered LED dimmer), I set thickness="0.5mm" on two traces for the LED-strip current path. The whole V5 and LED_N nets went to 0.5 mm, including the hookups to small decoupling caps and 0402 resistors, which crowded the board and caused clearance errors.
  • Because every trace on the net takes the thick trace's name, DRC messages point at the wrong connection. For example, I got PCB trace Q1.D to J1.LED_N is too close to U1.RESET to net.V5 for copper that was actually on a different branch of the net.

Versions: tscircuit 0.0.3188, @tscircuit/core 0.0.2380

Dominant language
TypeScript
Stars
61
Forks
256
Avg merge
20h 21m
Merged PRs (30d)
289

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tscircuit/core

All issues in tscircuit/core

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.