Skip to content

Use pcb_board DRC values and remove JLC specs dependency import#137

Closed
imrishabh18 wants to merge 1 commit intomainfrom
codex/remove-@tscircuit/jlcpcb-manufacturing-specs-dependency
Closed

Use pcb_board DRC values and remove JLC specs dependency import#137
imrishabh18 wants to merge 1 commit intomainfrom
codex/remove-@tscircuit/jlcpcb-manufacturing-specs-dependency

Conversation

@imrishabh18
Copy link
Copy Markdown
Member

Motivation

  • Remove the hard dependency on @tscircuit/jlcpcb-manufacturing-specs and instead use DRC values embedded in the pcb_board element of the circuit JSON.
  • Allow board-level manufacturing DRC properties to override library defaults so checks reflect per-board constraints.

Description

  • Removed @tscircuit/jlcpcb-manufacturing-specs from devDependencies and replaced dependency-backed defaults with local numeric fallbacks in lib/drc-defaults.ts.
  • Added getBoardDrcValue(circuitJson, key, fallback) to read manufacturing DRC properties from the pcb_board element and return a typed numeric fallback when unset.
  • Updated clearance/thickness fallbacks so checks read from board DRC properties when minClearance or trace widths are not explicitly provided: pad-pad uses min_pad_to_pad_clearance, pad-trace and via-trace use min_trace_to_pad_clearance, via spacing uses min_via_to_via_clearance, and trace thickness falls back to min_trace_width.
  • Updated via off-board checks to use min_board_edge_clearance (with fallback) for the board-edge margin.

Testing

  • npm run build completed successfully.
  • Ran npx biome format --write on all touched files (succeeded) to apply formatter fixes.
  • npm run format:check initially reported repository-level warnings due to large test fixtures, and formatter suggestions were applied to the modified files; formatting of touched files is now applied.

Codex Task

@imrishabh18 imrishabh18 changed the title Use pcb_board DRC values and remove JLC specs dependency Use pcb_board DRC values and remove JLC specs dependency import Apr 23, 2026
@imrishabh18 imrishabh18 requested a review from seveibar April 23, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants