Skip to content

Add keep_upright to pcb_silkscreen_text#639

Closed
technologyet31-create wants to merge 1 commit into
tscircuit:mainfrom
technologyet31-create:add-keep-upright-to-pcb-silkscreen-text
Closed

Add keep_upright to pcb_silkscreen_text#639
technologyet31-create wants to merge 1 commit into
tscircuit:mainfrom
technologyet31-create:add-keep-upright-to-pcb-silkscreen-text

Conversation

@technologyet31-create

Copy link
Copy Markdown

Adds an optional keep_upright?: boolean to pcb_silkscreen_text (mirrors the existing is_mirrored flag — optional, off by default).

It lets a renderer keep reference-designator text readable when a component is rotated (flip any ccw_rotation that would render it upside-down, like KiCad's "keep upright"), while text without the flag still honors its raw ccw_rotation. This is the property @imrishabh18 asked for in tscircuit/circuit-to-canvas#251 — the renderer will gate its keep-upright behavior on this flag, and @tscircuit/core will set it on auto-generated refdes.

Added to both the zod schema and the interface (expectTypesMatch keeps them in sync) plus a small parse test.

A renderer can use this to keep reference-designator text readable when a
component is rotated (flip any ccw_rotation that would be upside-down, like
KiCad's "keep upright"), while text without the flag still honors its raw
ccw_rotation. Optional, defaults off — mirrors the existing is_mirrored flag.

Co-authored-by: abdalrouf-AAA <236259618+technologyet31-create@users.noreply.github.com>
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.

1 participant