Skip to content

fix(schematic): normalize wrapped arc sweeps - #121

Merged
ShiboSoftwareDev merged 1 commit into
tscircuit:mainfrom
hrithik18k:repro/magnetic-core-inductor-rendering
Sep 3, 2026
Merged

fix(schematic): normalize wrapped arc sweeps#121
ShiboSoftwareDev merged 1 commit into
tscircuit:mainfrom
hrithik18k:repro/magnetic-core-inductor-rendering

Conversation

@hrithik18k

@hrithik18k hrithik18k commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Motive: Render Altium schematic arcs correctly when their angles cross zero degrees.

Altium arcs use a positive counterclockwise sweep, but the SVG renderer treated angles such as 360° to 90° as a −270° sweep instead of 90°, causing magnetic-core inductors and other wrapped arcs to appear distorted. This PR normalizes the arc sweep using a reusable helper, preserves full circles, and updates the relevant tests and snapshots without component-specific hardcoding or hacks.

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

@hrithik18k is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

@hrithik18k hrithik18k changed the title Repro/magnetic core inductor rendering fix(schematic): normalize wrapped arc sweeps Sep 3, 2026
@hrithik18k
hrithik18k force-pushed the repro/magnetic-core-inductor-rendering branch 2 times, most recently from 5a2088a to 9594622 Compare September 3, 2026 16:17
Comment thread lib/svg-serialization/approximate-altium-arc.ts Outdated
Comment thread lib/svg-serialization/serialize-altium-pcb-to-svg.ts Outdated
Comment thread lib/svg-serialization/approximate-altium-arc.ts Outdated
@hrithik18k
hrithik18k force-pushed the repro/magnetic-core-inductor-rendering branch from 9594622 to 919803b Compare September 3, 2026 17:44
@ShiboSoftwareDev
ShiboSoftwareDev merged commit ae761ad into tscircuit:main Sep 3, 2026
5 of 6 checks passed
@tscircuitbot

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! 🎉

PR Rating:
Impact: Tiny

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


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