feat: laser convex hull of circular-plus-straight members - #41
Draft
grootstebozewolf wants to merge 2 commits into
Draft
feat: laser convex hull of circular-plus-straight members#41grootstebozewolf wants to merge 2 commits into
grootstebozewolf wants to merge 2 commits into
Conversation
Exact hull for CompoundCurve / stadium / two-cap mixes: a CurvePolygon whose shell is the exposed arcs plus supporting tangents. Disc and single-arc paths stay as they were. Clothoid and all-straight members are a named null so densify stays the fallback and is never flagged exact. Not a noder; not Bar 2; not a merge into #7. Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>
Arc vertices from cos/sin were within eps of the input points but not equal, so the legacy LinearRing derived from the CompoundCurve shell rejected the ring. Snap junctions and pin the bulge on the arc member rather than the densified distance path. Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>
This was referenced Aug 16, 2026
This was referenced Aug 16, 2026
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.
Laser hull for the closed-form cases that were still chordsaw after the disc / single-arc path.
What this is
CurveExact.convexHullstill answers a circular disc (the disc) and a single-arcCircularString(arcChordHull). Circular-plus-straight members now take a package-private gift-wrap (CurveConvexHull): aCurvePolygonwhose shell is the exposed arcs plus the supporting tangent / chord segments. A stadium stays the two caps + two outer tangents.isApproximate()is not involved — this is not overlay — and the result is an exact closed form, not a densifiedPOLYGONflagged exact.COMPOUNDCURVE (CIRCULARSTRING (0 0, 5 5, 10 0), (10 0, 10 10))keeps the left bulge as an arc. Area is50 + 12.5 acos(0.6), not the control-point 50.What this is not
feature/sfa-curve-rgr@ 8e39e39.Fallback
Clothoid members and any uncertified mix return
nullfromCurveExact.convexHull.CurveOpsthen densifies. That path is never flagged exact. An all-straightCompoundCurveis also a named null so coreConvexHullstays bit-identical.Out of scope
ConcaveHull / alpha-shape stay out. Issue #6's concave path is a different product (static
ConcaveHull, no virtual dispatch).Verification
jts-curvedefault Surefire: 608 tests, 0 failures (spec class still excluded).HullFunctionsCurveTest: 12 tests, 0 failures.jts-curve. Naming guard clean.