Closed MartinSStewart closed 1 year ago
The Axis2d.intersectionPoint
is something I would like to use for my project. How might I be able to help this PR along?
If you'd like to help this PR along then QuadraticSpline2d.nearestPoint
still needs some tests to make sure it works correctly. If you just want Axis2d.intersectionPoint
then I recommend just copy pasting that code into your project for now.
OK I think everything in this MR has been merged in, one way or another:
Axis2d.fromLineSegment
as LineSegment2d.axis
(seemed consistent with LineSegment2d.direction
)Axis2d.intersectionPoint
although with a different implementation (when I tried adding some fuzz testing for the implementation in this MR it seemed to have some numerical stability issues, possibly for nearly-vertical axes?)QuadraticSpline2d.nearestPoint
into the quadraticspline2d-nearestpoint
branch of https://github.com/ianmackenzie/elm-geometry-extra, although when I added a simple test for it I got a bunch of failures so those will need investigatingSo I think this MR can now be closed - @MartinSStewart sound good?
...I'm an idiot, the test I added was dumb and didn't consider the case that the nearest point on the spline might be an endpoint! I'll try a better version and see what happens.
Sound good! Though I guess this PR will stay open until new tests are made for QuadraticSpline2d.nearestPoint
?
OK just fixed the test for QuadraticSpline2d.nearestPoint
and everything seems good now, so I think we can close this MR :slightly_smiling_face:
I've added
Axis2d.intersectionPoint
,Axis2d.fromLineSegment
, andQuadraticSpline2d.nearestPoint
. I've only written tests forAxis2d.intersectionPoint
. I don't thinkAxis2d.fromLineSegment
needs any.QuadraticSpline2d.nearestPoint
definately does but I ran out of energy before I got that far 😅.