Skip to content

Show Circuit JSON and Altium in round-trip snapshots - #62

Open
techmannih wants to merge 5 commits into
mainfrom
oo
Open

Show Circuit JSON and Altium in round-trip snapshots#62
techmannih wants to merge 5 commits into
mainfrom
oo

Conversation

@techmannih

Copy link
Copy Markdown
Member

Previously, the real-board round-trip snapshots rendered Altium on both sides, making conversion differences difficult to identify.

This PR updates the snapshots to show:

  • Left: Circuit JSON render
  • Right: Generated Altium render

It also updates the affected PCB, schematic, and multi-sheet snapshots for consistent visual comparison.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@ShiboSoftwareDev

Copy link
Copy Markdown
Contributor

don't add fall backs to element dimensions, if a dimension is missing don't render the element otherwise it may look correct when it's not

return typeof value === "number" && value > 0 ? value : undefined
}

function createRenderableSourceCircuitJson(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This normalization is only used to render the Circuit JSON side of the visual snapshots. The Altium-to-Circuit JSON converter currently emits some pads and holes using non-canonical field combinations that circuit-to-svg cannot render directly.

These are likely bugs in the Altium-to-Circuit JSON conversion and should eventually be fixed there. Until then, this helper maps valid dimensions to renderer-compatible shape variants. If any required dimension is missing or invalid, the element is skipped instead of using a fallback value that could make incorrect geometry appear valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants