Skip to content

GEOM-04A: bounded exact triangle distance and contact predicates - #62

Merged
Poyqraz merged 1 commit into
mainfrom
agent/geom04a-triangle-distance
Sep 16, 2026
Merged

Poyqraz merged 1 commit into
mainfrom
agent/geom04a-triangle-distance

Conversation

@Poyqraz

@Poyqraz Poyqraz commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

GEOM-03 cannot refine overlapping bounding boxes. This first GEOM-04 slice adds an independent Python kernel for triangle, segment and point distances, including interior edge-face intersections, coplanar contact and degenerate geometry.

Exact rational predicates and squared minima are converted to outward-rounded distance intervals. Witness coordinates and exact feature IDs are retained. Bounded feature work and precision limits return unknown rather than false separation. No physical qualification or upstream transform certification is claimed.

TDD: 39 focused tests pass, with observed RED for missing kernel and reviewer-requested feature IDs. Separate mathematical review passed: 120 exact-rational KKT reference cases enclosed correctly, plus 300 numerical comparison cases. Full CI must pass for this exact head before merge. GEOM-04B/C/D integration stays outside this PR.

Includes the source-linked GEOM-04 plan and roadmap links. Gemini is not a gate; Cursor Bugbot is requested alongside independent review. PR #3 and unrelated report edits are untouched.


Note

Low Risk
New isolated geometry module and tests only; conservative unknown on limits; no service/UI or clearance pipeline changes in this PR.

Overview
GEOM-04A adds a standalone exact-rational geometry kernel in pyfoldable/geometry/triangle_distance.py for point–triangle, segment–segment, segment–triangle, and triangle–triangle queries. Results are outward-rounded lower_m/upper_m intervals with witness points, contact_status, geometric feature IDs, and a bounded max_feature_tests budget; precision or budget limits yield conservative unknown ([0, ∞]) instead of false separated.

Triangle–triangle logic explicitly tests edge–face interior crossings before closest-feature pairs. Docs add geom04_execution_plan.md and link GEOM-04 from the Python research and validation roadmaps as a multi-slice plan (04A delivered; 04B–04D not in this PR). 39 analytic/metamorphic tests in tests/geometry/test_triangle_distance.py; no surface_clearance or UI wiring yet.

Reviewed by Cursor Bugbot for commit ca0360b. Configure here.

Copilot AI lite review requested due to automatic review settings September 16, 2026 15:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Poyqraz commented Sep 16, 2026

Copy link
Copy Markdown
Owner Author

bugbot run verbose=true

@cursor

cursor Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Bugbot request id: serverGenReqId_13f615ca-640c-4990-9c6f-2e70e23368ba

@cursor

cursor Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Bugbot rules debug

No rules were used for this review.

https://cursor.com/docs/bugbot#team-rules

Bugbot request id: serverGenReqId_13f615ca-640c-4990-9c6f-2e70e23368ba

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ca0360b. Configure here.

@Poyqraz
Poyqraz merged commit fa1b88d into main Sep 16, 2026
3 checks passed
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