Fix bottom copper text auto-mirroring in board textures and add regression tests#755
Open
rushabhcodes wants to merge 3 commits intotscircuit:mainfrom
Open
Fix bottom copper text auto-mirroring in board textures and add regression tests#755rushabhcodes wants to merge 3 commits intotscircuit:mainfrom
rushabhcodes wants to merge 3 commits intotscircuit:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ureForLayer function
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes bottom-layer copper text rendering in the 3D viewer by defaulting bottom pcb_copper_text elements to mirrored during copper text texture generation (while preserving explicit is_mirrored overrides).
Changes:
- Added
applyDefaultBottomCopperTextMirroring()to defaultis_mirroredtotruefor bottom-layer copper text when unspecified. - Updated copper text texture generation to apply this defaulting to filtered copper text elements.
Comments suppressed due to low confidence (1)
src/textures/create-copper-text-texture-for-layer.ts:16
- PR description mentions adding regression tests for bottom copper text auto-mirroring, but no new/updated test files appear in this change set (and the existing tests/ directory contains no pcb_copper_text coverage). Please either add the promised tests or update the PR description to match what’s actually being delivered.
export function createCopperTextTextureForLayer({
layer,
circuitJson,
boardData,
copperColor = "rgb(230, 153, 51)",
traceTextureResolution = TRACE_TEXTURE_RESOLUTION,
}: {
layer: "top" | "bottom"
circuitJson: AnyCircuitElement[]
boardData: PcbBoard
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR reproduces and fixes a subtle rendering bug where bottom-layer copper text was not automatically mirrored in the 3D viewer unless is_mirrored was explicitly set.
Changes:
Why this matters:
Before
After