Transport unbroken copper-pour intent through raw Circuit JSON autorouting

Open
#3,379 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
api, backend

Research direction

Start by tracing PcbTraceRender and the raw input_circuit_json paths for auto-cloud and the legacy solve endpoint, then compare them with getSimpleRouteJsonFromCircuitJson and PcbCopperPourRender. Decide how the transport preserves layer, net, geometry, and unbroken intent before routing. Done means raw remote autorouting respects unbroken pours, still permits through vias with antipads, and leaves local, simplified, and ordinary-pour behavior intact.

Written by the indexing model from the issue text.

Description

Problem

Core already makes <copperpour unbroken> authoritative for the normal local autorouter path and for remote calls that send Simple Route JSON. getSimpleRouteJsonFromCircuitJson receives the subcircuit component and emits spatial isCopperPour: true obstacles, so unrelated signal wires cannot fragment the pour while vias may cross it using antipads.

The raw-Circuit-JSON remote paths lose that intent:

  • auto-cloud / autorouting job mode sends input_circuit_json.
  • The legacy solve endpoint also sends input_circuit_json unless inputFormat: "simplified" is selected.

Those payloads are assembled during PcbTraceRender, before PcbCopperPourRender. The unbroken flag currently exists only on the source component; there is no pre-route Circuit JSON element or field carrying the plane intent. As a result, a raw-CJ autorouting service cannot distinguish an unbroken plane from a normal post-routing pour and may place unrelated signal wires on that layer.

This does not affect the default local path or the simplified-SRJ remote path; both already transmit isCopperPour obstacles correctly.

Why a hard obstacle is not equivalent

A board-sized generic keepout/obstacle blocks both planar wires and via transitions. An unbroken copper plane needs different semantics: unrelated wires are excluded from the pour geometry, but through vias may cross it with antipads, and matching nets may terminate into the plane. Converting the plane to a generic hard obstacle would therefore be overly restrictive and can make otherwise valid top-to-bottom routes unsatisfiable.

Possible fixes

Either approach should preserve spatial pour geometry rather than infer a global layer allowlist:

  1. Add a pre-routing copper-plane intent representation to Circuit JSON, carrying at least layer, net, outline/bounds, and unbroken semantics. Raw-CJ autorouting ingestion can map it to isCopperPour SRJ obstacles.
  2. Change these remote Core paths to generate and submit Simple Route JSON while the source component tree is available, as the existing simplified path already does.

Acceptance criteria

  • Raw remote autorouting receives unbroken-pour intent before routing begins.
  • Unrelated generated wire segments do not enter the unbroken pour geometry.
  • Through vias may still cross the plane using antipads.
  • Ordinary copper pours retain their current post-routing behavior.
  • Coverage distinguishes default local/SRJ behavior from the raw-CJ remote transport.

Related work

Dominant language
TypeScript
Stars
58
Forks
203
Avg merge
7h 39m
Merged PRs (30d)
286

Contributor guide

No contributing guide indexed for this repository

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.