Skip to content

Fix line-segment intersection for scaled homogeneous endpoints - #282

Open
Doribelove wants to merge 1 commit into
rai-opensource:masterfrom
Doribelove:fix/line-segment-homogeneous-endpoints
Open

Doribelove wants to merge 1 commit into
rai-opensource:masterfrom
Doribelove:fix/line-segment-homogeneous-endpoints

Conversation

@Doribelove

Copy link
Copy Markdown
Contributor

For the line y = 0, the segment from (0, 1) to (1, 2) lies entirely above the line. Passing the same second endpoint as (-1, -2, -1) previously reported an intersection. A small positive homogeneous scale could also make an off-line endpoint pass the endpoint tolerance check.

Normalize finite homogeneous endpoints to unit weight before applying the existing side and tolerance tests. Regression cases cover a same-side segment, a crossing segment, and a small positive scale.

Validation: python -m pytest -q tests/test_geom2d.py tests/test_geom3d.py (60 passed, including the new parameterized regression).

This branch has not been deployed

No deployments
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