Skip to content

Fix inner-layer copper pour rendering#737

Open
techmannih wants to merge 2 commits intotscircuit:mainfrom
techmannih:cop
Open

Fix inner-layer copper pour rendering#737
techmannih wants to merge 2 commits intotscircuit:mainfrom
techmannih:cop

Conversation

@techmannih
Copy link
Copy Markdown
Member

@techmannih techmannih commented Apr 12, 2026

test : https://pcb-viewer-7xytbyoag-tscircuit.vercel.app/?fixture=%7B%22path%22%3A%22src%2Fexamples%2F2026%2Frepros%2Finner-layer-copper-pours.fixture.tsx%22%7D

  • render copper pours through the shared copper layer loop used by other copper elements while traces/pads/text already looped across top, bottom, and inner1-inner6
  • remove the duplicate top/bottom-only copper pour draw pass
  • add an 8-layer repro fixture covering top, inner1-inner6, and bottom

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pcb-viewer Ready Ready Preview, Comment Apr 12, 2026 6:01am

Request Review

@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.

for (const { canvas, copperLayer } of copperLayers) {
if (!canvas) continue
drawCopperPourElementsForLayer({
canvas: bottomCanvas,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems wrong

@Abse2001
Copy link
Copy Markdown
Contributor

when selecting a layer except top and bottom the pout is not translucent it's solid, make them like top and bottom

@techmannih
Copy link
Copy Markdown
Member Author

@Abse2001 so how it should be works for the inner layers?

@Abse2001
Copy link
Copy Markdown
Contributor

like top and bottom always transparent but when selected add more opacity and render on top , look how top and bottom layers look when selected and not

@techmannih
Copy link
Copy Markdown
Member Author

yes, I checked this in circuit-to-canvas. Currently, only the top and bottom layer copper colors are defined with a lighter (translucent) appearance, which is why their pours look transparent. Inner layers don’t have this defined, so their pours appear solid.

We should apply the same translucent color logic to the inner layers to keep the behavior consistent. Right?

@techmannih
Copy link
Copy Markdown
Member Author

Currently, top and bottom layers use an opacity of 0.5, which makes their pours translucent, while all other layers use 1, making them fully solid.

Because of this, inner layers appear solid instead of translucent. We should apply the same opacity (e.g., 0.5) to inner layers as well to make the rendering consistent across all layers./
Screenshot from 2026-04-13 18-59-53

@Abse2001
Copy link
Copy Markdown
Contributor

OK let's patch circuit to canvas first?

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.

3 participants