Skip to content

P2.5.5 OverlayNG-for-circles (Option B contract, OV-P2 / Bar 2) - #27

Draft
grootstebozewolf wants to merge 3 commits into
cursor/p254-tangent-stamp-917cfrom
cursor/p255-overlayng-circles-6671
Draft

P2.5.5 OverlayNG-for-circles (Option B contract, OV-P2 / Bar 2)#27
grootstebozewolf wants to merge 3 commits into
cursor/p254-tangent-stamp-917cfrom
cursor/p255-overlayng-circles-6671

Conversation

@grootstebozewolf

@grootstebozewolf grootstebozewolf commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Stacked on #25 @ 8d1546a. Do not merge into #7.

Unlock / catalog

P2.5.5 is Option B, scoped to OverlayNG-for-circles. Not a new rung. Catalog: do not extend the core interface to lie. Generalize it so the lie becomes impossible: linearization remains an explicit choice.

74 is the grep-count of files that mention SegmentString (47 under noding). It is a warning, not a quota. This PR is 15 files, not a 74-file drive-by.

A-data (getData()) already shipped. C (CurveSegmentString in jts-curve) is the bridge through #25 — kept, not rewritten. B is the core contract.

HotPixel is a sibling ladder — not this card

Do not implement CurveHotPixel / snap leave-angles / faces-after-snap here.

  • This card: OverlayNG-for-circles only (SegmentString contract + EdgeNodingBuilder).
  • HP.1–HP.4: separate card in jts-curve. Not this PR.
  • HP.5 (“core HotPixel = P2.5.5”) is a later join, not the first slice.

HotPixel, SnapRoundingNoder, and ScaledNoder are untouched. Linearization stays the default for that path. The P2.5.4 named null P2.5.4 tangent leave-angle is unchanged. If OverlayNG-for-circles had required snap-round: stamp and stop. It did not.

Public contract (Option B)

[i, i+1] names one of:

SegmentKind Meaning mayCollapseToChord
LINEARIZED Explicit linear fallback. Default earth. true
ARC Exact circular arc (midpoint is metadata, not a vertex) false
CERTIFIED Exact non-arc primitive (true line member) false

Default methods on SegmentString so existing implementors stay linearized without a 74-file edit. OverlayNG (and only OverlayNG, via EdgeNodingBuilder) may consume ARC / CERTIFIED. Stock extract always builds linearized NodedSegmentString. IntersectionAdder asks mayCollapseToChord — it does not treat exact ends as a chord.

What this rung does not fix

Linearization stays the default for:

  • buffer (BufferCurveSetBuilder, OffsetSegmentString)
  • relateng (RelateSegmentString, EdgeSegmentIntersector)
  • coverage / COV / PLG (they wait on 2.5.5; they are not this rung)
  • prep (PreparedPolygon / PreparedLineString)
  • snap / snapround (HotPixel, SnapRoundingNoder, ScaledNoder) — sibling ladder
  • RobustLineIntersector (line–line only), MonotoneChain / Octant (an arc is not octant-monotone), SegmentNodeList (interpolates along the chord)

Cell

H-SHELL-N-MIXED (HALF_DISC × ON_DIAMETER): R-OV converts onto the contract, nodes via OverlayNG’s Noder entry (OverlayNGCircleNoder calls through CurveSegmentString — formulas are not copied into core), and returns a named exact area. isApproximate()=false. Kits stay refused. CC-NEST-ANNULUS stays R2. R1.5 / R1.6 / R1.7 / bite / two-hole stay in charge.

File count vs the 74-file ceiling

15 files. OverlayNG path + the SegmentString default-method contract. No buffer / relateng / coverage / prep / snapround edits.

Package Why
org.locationtech.jts.noding SegmentKind + default contract; CircularNodedSegmentString; IntersectionAdder honors mayCollapseToChord
org.locationtech.jts.operation.overlayng EdgeNodingBuilder is the OverlayNG-for-circles surface
org.locationtech.jts.operation.overlayng.curve Conversion + Noder + R-OV; C-curve-ss unchanged

Pins

Verify (green)

# curve suite + OverlayNGCircle: 248 / 0. PerfGate 82 / 0 at 15%.
# SegmentStringContractTest 4 / 0. OverlayNGTest 51 / 0.
# check-no-curved OK. Checkstyle 0. PMD SUCCESS.
Open in Web Open in Cursor 

cursoragent and others added 3 commits August 16, 2026 10:36
Core CircularNodedSegmentString carries an arc on [i,i+1] without
lying that the chord is the arc. EdgeNodingBuilder accepts it.
OverlayNGCurve converts leftover MIXED-diameter shells onto that
string, nodes via OverlayNG's Noder entry using CurveSegmentString
closed forms, and returns a named exact area. Kits stay refused.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>
Prepared circular strings are for noding. OverlayNG's linear
extract is not the laser path; do not claim it is.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>
Generalize [i,i+1] so the chord lie is impossible: a segment names
ARC, CERTIFIED, or LINEARIZED. Default is linearized. OverlayNG's
EdgeNodingBuilder is the only consumer of exact edges. IntersectionAdder
collapses only when mayCollapseToChord is true. Buffer, relateng,
coverage, prep, and snap-round stay on linearization.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>
@cursor cursor Bot changed the title P2.5.5 OverlayNG-for-circles (core SegmentString, OV-P2 / Bar 2) P2.5.5 OverlayNG-for-circles (Option B contract, OV-P2 / Bar 2) Aug 16, 2026
@grootstebozewolf

Copy link
Copy Markdown
Owner Author

N-SS lock (16 Aug 2026): Option C, not this PR.

CurveSegmentString stays in jts-curve. Public SegmentString is not generalized. Option A (getData/setData) is already the default and not useful. Option B — making [i,i+1] an arc on the core contract while overlay / relate / buffer / coverage / prep / snapround still assume line–line — is the lie. This draft is that experiment.

Leave this PR open as a record. Do not merge it into #7. Do not restack C work onto cursor/p255-overlayng-circles-6671. The C stack is #16#25.

@grootstebozewolf

Copy link
Copy Markdown
Owner Author

Lock (16 Aug 2026): there will be no public noder. Only the curve-module noder (CurveSegmentString in jts-curve). This PR stays a dead-end record of Option B. Do not merge. Do not restack C work onto it. PLG / COV wait on the curve-local arrangement, not on a core SegmentString / Noder.

cursor Bot pushed a commit that referenced this pull request Aug 17, 2026
Fold #27 OverlayNGCircle / CircleNoder, CurveSegmentString/Noder/Faces,
BiteVsHole, TwoHoleOverlay onto #7 tip. OverlayNGCurve R-OV dispatches
H-SHELL-N-MIXED via CircularNodedSegmentString. 112 overlay/strategy
tests green including OverlayNGCircleTest 7/7.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>
grootstebozewolf added a commit that referenced this pull request Aug 17, 2026
* feat: Option B SegmentKind + linearization strategy + WKB 18–21 codes

MMF spine for locationtech#1195 on fork #7:
- Option B: SegmentKind (LINEARIZED/ARC/CERTIFIED), CircularNodedSegmentString,
  default methods on SegmentString, IntersectionAdder mayCollapseToChord,
  EdgeNodingBuilder/OverlayNG prepared exact edges (from #27 seed).
- CurveLinearizationStrategy: default LINEARIZED always warns; PRESERVE keeps type.
- WKBConstants zoo SIGN: Clothoid=18, Bezier=19, Ellipse=20, Nurbs=21.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: WKB 18 CRV-CLOTHOID greenfield round-trip

Signed zoo type 18: GeometryFactory.createClothoid stub,
CurveGeometryFactory + ClothoidSegment, WKBReader layout
(startXY[ZM] + tangent + κ0 + κ1 + L), CurveWKBWriter emit,
core writer refuses flatten. ISO 1018 type word covered.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: OverlayNG-for-circles R-OV (Option B) + curve segment bridge

Fold #27 OverlayNGCircle / CircleNoder, CurveSegmentString/Noder/Faces,
BiteVsHole, TwoHoleOverlay onto #7 tip. OverlayNGCurve R-OV dispatches
H-SHELL-N-MIXED via CircularNodedSegmentString. 112 overlay/strategy
tests green including OverlayNGCircleTest 7/7.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: OFF concentric OffsetCurve for single-arc CircularString

Public OffsetCurve.getCurve lasers three-point CircularString to a
concentric arc (left-of-direction sign: CCW +d inward). Collapse to
empty when r'<=0. Multi-arc stays chordsaw. CurveWKTReader defaults to
CurveGeometryFactory. Ship: drop CurveAwarenessSpecTest#test_OFF_*.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: WKB 19–21 BezierCurve EllipseCurve NurbsCurve greenfield

PRF-BEZIER / PRF-ELLIPSE / CRV-NURBS types with factory stubs,
WKBReader/CurveWKBWriter layouts, Linearizable.toLinear, ISO type
words, and round-trip tests. Core writer refuses flatten.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: BUF-1/BUF-NEG open-arc buffer corridor laser

Single-arc CircularString.buffer(d>0) returns CurvePolygon with
CompoundCurve shell (outer, end-cap, inner-rev, start-cap). BUF-NEG:
d<0 and |d|>=R yields EMPTY. Ship meter methods for BUF-1 and BUF-NEG.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: fold HP.2/HP.3 CurveHotPixel + snap headings onto MMF tip

CurveHotPixel (arc ∩ pixel, PM scale) and CurveHotPixelSnap (shared
snapped ray stamp) from the HP pin stack. Option B index lie stays
keyed to PrecisionModel scale. Six green pins.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* spec: retip epic to MMF Option B + WKB 18-21 SIGN

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* spec: epic field contract names Option B and no silent linearize

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: fold CurveSegmentDcel (P2.5.7) onto MMF tip

Package-private curve DCEL for PLG/COV consumers. Half-edges /
twins / next / face stay in jts-curve. Ten green Dcel tests.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* fix: TB-FN #60 Exec stays on selected function, not Buffer

getMetaFunction prefers currentFunc over tree selection so focusing
the shared dX/Distance param field cannot re-bind Exec to
Buffer.buffer. Null-safe functionChanged; param fields request focus
on press. Refs #60.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: BUF-N stadium CompoundCurve buffer subset

Certified stadium CurvePolygon (and closed stadium CompoundCurve)
dilates with arc-preserving caps at r+d and re-joined sides. Open
mixed CompoundCurve corridors stay named miss / chainsaw.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* fix: VBF honesty densify curve inputs via CurveOps.linearise

VariableBuffer samples chord vertices; curve A/B densify with the
explicit strategy warning instead of silent control-polygon flatten.
Full arc-length VBF TAG meter stays red.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* spec: epic §4.0 MMF Option B landed table + MMF_OPTION_B.md

Document Option B, strategy, WKB 18–21, OFF/BUF, R-OV, HP, DCEL,
TB-FN #60, VBF honesty, and #56 test locks. README points at the
quality-gate note. CurvePolygonToolTest 16/16 green on tip.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* doc: README cites WKB 18-21 zoo and MMF Option B gate

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* fix: CompoundCurve/CurvePolygon translate visits all member controls

Fold #59 apply honesty onto MMF tip: Affine/MoveTool translation no
longer drops later CircularString starts omitted from concatMembers.
LogoLines translate tests green.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: BUF-N open two-member line+arc CompoundCurve corridor

Buffer of COMPOUNDCURVE (LineString, CircularString) builds left/right
parallels with round joins and end caps as a CurvePolygon shell.
Ships BUF-N meter (stadium subset already landed).

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* spec: epic notes BUF-N open corridor ship

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: BUF-N open CompoundCurve corridor for N members

Generalize open mixed buffer to any count of single-segment /
single-arc members with round joins between pieces and end caps.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: VBF arc-length densify via CurveOps.lineariseArcLength

CircularString/CompoundCurve feed VariableBuffer after equal-arc-length
sampling (not control-chord length). Strategy warning retained; meter
stays for arc-preserving variable offsets.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: DSF Densifier→toLinear + TRI-DT/VR curve site densify

Densifier.densify routes jts-curve Linearizable types through
toLinear so samples lie on the arc. Delaunay/Voronoi setSites use
the same path for curve-package geometries. Ship DSF, TRI-DT, TRI-VR
meters.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* spec: epic notes DSF and TRI-DT/VR ships

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: ship green meters + AT-NS densify + public CurveIntersection

Ship M-LEN-CS/CC, M-AREA-CP, M-DIM, F-MC/MS, B-CC, H-CV, R-EQ, AT-S,
AT-NS, D-PT, N-AA, N-AL with CurveAwarenessGreenMetersTest. Non-similarity
AffineTransformation densifies curve types. CurveIntersection wraps
arc-arc / arc-line solvers.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: F-CP compound rings, LRF-LEN arc extractPoint, ship B-CP/B-MS

CurveWKTReader parses ISO CURVEPOLYGON ((CIRCULARSTRING, ...)) as
CompoundCurve shell. LengthIndexedLine uses CurveOps analytical arc
length for curve types. Ship F-CP, B-CP, B-MS, LRF-LEN meters.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: C-LIN centroid, S-* preserve CS, ship OV/D-*/R-CONT/F-RD/TB-T

CircularString arc-length centroid (2R/π). Simplifiers keep 3-point
CircularString identity. Ship F-RD, D-AA, D-OP, R-CONT, OV, C-LIN,
C-AREA, V-CS, S-DP/VW/TP, TB-T meters with green verification.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: LRF-LOC CompoundCurve members, C-IP densify, PRC-SN preserve

LinearIterator treats CompoundCurve members as components (LRF-LOC).
InteriorPointArea densifies curve-package polygons before scanning (C-IP).
GeometryPrecisionReducer preserves CircularString when snapped centre
lies on the FIXED grid, else densifies then reduces (PRC-SN).

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: V-CP densify validity, N-SS/R-PR meters, TB-FN badges

CurvePolygon.isValid densifies structural rings before IsValidOp.
Ship N-SS (CircularNodedSegmentString ARC) and R-PR DE-9IM meters.
Metadata.curveAwareness drives ●/◯/✕ badges in the function tree.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: VBF VariableBuffer densifies curves via arc-length

VariableBuffer.buffer reflects into CurveOps.lineariseArcLength so
distance interpolation follows arc parameter (strategy + warn).

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: H-CC densify ConcaveHull sites; PLG densify Polygonizer edges

ConcaveHull densifies curve-package inputs at hull fraction 1e-4 so
sites follow the arc. Polygonizer.add densifies CompoundCurve /
CircularString linework before graph insert (faces remain Polygon).

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: mark HullFunctions concaveHull length-ratio as curve passthrough

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: refresh MMF_OPTION_B shipped meters and HOLD

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: COV CurveCoverageUnion keeps exterior CIRCULARSTRINGs

Dissolve shared shell members across a hole-free CurvePolygon
coverage; stitch remaining edges into CurvePolygon/MultiSurface.
CoverageUnion reflects into CurveCoverageUnion before densify path.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: mark COV shipped in MMF_OPTION_B

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: TestBuilder curve strategy picker + warn sink to Log tab

CurveLinearizationStrategy.WarnSink bridges densify warnings into the
TestBuilder Log panel. Edit menu toggles LINEARIZED vs PRESERVE.
Retip epic §4.0 with COV/PLG/H-CC meter ship status.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: retip epic to bd1dba0

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: tip SHA + MMF TestBuilder WarnSink note

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: sync epic tip SHA to 6f9ae15

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: D-HF densify curve package inputs on general Hausdorff path

Certified apex/disc pairs keep closed form. Other curve operands
densify before the vertex path so control chords are not the sample.
Full TAG meter remains fail() by design.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: note D-HF densify honesty + folded #52/#55 pins

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: fold #40 ClothoidOverlay kit + #26 HP.1 pin docs/tests

ClothoidOverlay answers 0-node identity/disjoint/nest cells; Fresnel
misses return null (never chord-flatten). Wire through
CompoundCurveShellOverlay; refuse clothoid members in TwoNodeClip /
CircularLineOverlay flatten. HP.1 wrong-ring walk pin docs + tests.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: note #40 ClothoidOverlay and #26 HP.1 fold

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: cherry-pick #47 LaTeX guide sources onto MMF tip

Bring doc/latex/ (Makefile, three manuals, figures, sty) without
replacing conflicting Amyuni PDF binaries. Point MMF_OPTION_B at
the rebuild path; retip latex README to PR #61.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: epic notes doc/latex cherry-pick from #47

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: retip latex README to MMF PR #61

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: WKB 18-21 inspect labels + curve strategy status strip

GeometryLocationsWriter labels Bezier/Ellipse/NURBS for mouse inspect.
Edit-menu strategy picker also updates the bottom status bar; frame
startup shows LINEARIZED.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* feat: show Curve strategy LINEARIZED on TestBuilder status at startup

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* test: WKB 18-21 ISO Z round-trips + Option B PM kind stability

Lock Phase 4 accept (XY + ISO Z for 18–21). Assert PrecisionModel
coordinate snap does not rename SegmentKind.ARC (allowed index lie).

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: Phase 4 ISO-Z and PM kind-stability accept criteria

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs+fix: Option B prose in guides; clothoid ISO M/ZM honesty

Update technical-specs and developer-guide for SegmentKind, no-silent
linearize, and WKB 18-21. Preserve Z/M on ClothoidSegment start so ISO
2018/3018 type words round-trip.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: user-guide Option B prose + MMF verification walkthrough

Document TestBuilder strategy/badges/WKB 18-21 in user-guide.tex.
Add doc/MMF_WALKTHROUGH.md with smoke evidence and HOLD checklist.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: retip epic MMF ship status + explicit named-miss list

Correct stale OFF/BUF/H-CC/N-*/PLG/COV 'still open' claims against
tip meters. List leftover named misses for Phase 2 accept.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* docs: sync epic tip SHA to 0cf0eb3

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* fix: CI red — SqlMmTypes HOLD 15-17, CurveWKTWriter owns CurvePolygon, BiteVsHole honesty

- Allow Triangle/Tin/PolyhedralSurface through WKTWriter (HOLD 15-17).
- CurveWKTWriter always formats CurvePolygon (EMPTY / all-linear).
- BiteVsHole refuses densified outer CAP; update H-SHELL-HOLE-*
  assertions to certified arc-preserving bites.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* fix: restore logoBuffer JOIN_MITRE + mitre limit (CI app tests)

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

* fix: headless-safe AppCursors for CI drawing-tool tests

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@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.

2 participants