Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add CircularArcIntersector #1171

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

dbaston
Copy link
Member

@dbaston dbaston commented Oct 2, 2024

This PR adds a CircularArcIntersector that computes intersections between
circular arcs and/or line segments. The intersections may be points or arcs.
The interface generally mimics that of the LineIntersector.

Missing features:

Use of a PrecisionModel
Handling of Z, M
isProper()
isInteriorIntersection()

A challenge I ran into when writing test cases is the lossy conversion between how arcs are stored (three points) and how we generally must work with them (a center point, radius, two angles). This can cause small differences in the computed center point, which currently prevents the code from recognizing the arcs as co-circular. It may be necessary to add some tolerance in the center-point equality testing, possibly by using the scale of a provided PrecisionModel.

@pramsey
Copy link
Member

pramsey commented Oct 3, 2024

Is there a similar tolerance issue around arcs with infinite radius (aka straight lines (aka three control points in a line))?

@dbaston
Copy link
Member Author

dbaston commented Oct 3, 2024

Is there a similar tolerance issue around arcs with infinite radius (aka straight lines (aka three control points in a line))?

Good point. See the final (failing) test added in 9910456.

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