Skip to content

Per-connection trace widths are ignored: 1.0 mm motor traces emit as 0.15 mm #1721

Description

@seveibar

Bug

The autorouter silently emits default-width PCB traces even when each SimpleRouteConnection carries a larger width and nominalTraceWidth. This is visible on an RP2040 + DRV8833 motor-controller board, where the high-current outputs become 0.15 mm traces.

Public reproduction data and PCB snapshot: https://gist.github.com/seveibar/67a25d17202a343a1c8f3d4c47cd06d2

PCB snapshot

Exact mismatch

The four motor-output source traces specify min_trace_thickness: 1. The generated SimpleRouteJson correctly preserves this on connections source_trace_122 through source_trace_125:

{
  "name": "source_trace_122",
  "source_trace_id": "source_trace_122",
  "nominalTraceWidth": 1,
  "width": 1
}

All four corresponding output pcb_trace routes contain only:

"wire_widths": [0.15]

The same issue occurs selectively on the power nets:

  • VM terminal branch requests 0.8 mm but outputs 0.15 mm.
  • Some merged ground branches request 0.8 mm but output 0.10-0.15 mm.
  • Other nearby VM/ground branches do retain 0.8 mm, so the loss appears branch/merge dependent rather than a global parsing failure.

The public gist JSON contains the complete unrouted simple_route_json, source constraints, and observed PCB widths.

Expected behavior

Every wire segment for a connection with width: 1 / nominalTraceWidth: 1 should remain 1.0 mm wide. A requested minimum must not silently fall back to the global 0.15 mm width. If the requested width cannot be routed, the route should fail or return an explicit width-degradation error instead.

Steps to reproduce

  1. Download rp2040-trace-width-bug.json from the linked public gist.
  2. Pass its simple_route_json field to the default local autorouting pipeline.
  3. Inspect the output routes for source_trace_122, source_trace_123, source_trace_124, and source_trace_125.
  4. Observe that each wire segment is 0.15 mm instead of the requested 1.0 mm.

Versions

  • tscircuit@0.0.2116
  • @tscircuit/core@0.0.1470
  • @tscircuit/capacity-autorouter@0.0.696
  • preset: auto_local
  • effort: 10x

This looks like a regression or incomplete path following #66, since the connection-level width metadata reaches SimpleRouteJson correctly but is not consistently represented in the routed output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions