Skip to content

Conversation

@gpeairs
Copy link
Member

@gpeairs gpeairs commented Jan 14, 2026

[Updated description] Adds a rounded taper as described in #22, based on a GeneralTrace. Discontinuous tapers have rounded tapers inserted between them based on a maximum taper angle or rounding radius, while TaperTrace is rounded based on its length. Tapers that would require a 90 degree taper angle are not allowed.

    pa = Path()
    straight!(pa, 10μm, Paths.Trace(1μm))
    turn!(pa, 90°, 10μm / (pi / 2), Paths.Trace(5μm))
    straight!(pa, 10μm, Paths.Trace(3μm))
    Paths.round_trace_transitions!(pa)
    cell = Cell("test")
    render!(c, pa, GDSMeta())
image

@gpeairs
Copy link
Member Author

gpeairs commented Jan 14, 2026

What is the right interface here? Specifying the maximum taper angle probably does not cover all use cases. We could also specify rounding radius or taper length. They're all related assuming the taper is two circular arcs, so we can default to max taper angle, and if one of the others is provided then override it? [edit: taper length is used only for existing TaperTrace; radius is optional and overrides taper angle.] And just warn if you get a 90 degree taper angle? [edit: we warn and skip, 90 degree tapers cause too many problems.]

We could also have this method take existing tapers and round them based on their length [edit: done]. (Or even round the transition between SimpleCPW and linear taper [edit: not doing that].)

Rendering to SolidModel uses BSpline approximations rather than circular arcs to allow for rounding tapers on curves, but this appears to work reasonably well even on straight segments.

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 98.93617% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/paths/contstyles/periodic.jl 98.09% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@gpeairs gpeairs changed the base branch from main to gp/periodic-style January 15, 2026 18:08
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