-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add tangentToEnd stdlib function #4541
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4541 +/- ##
==========================================
+ Coverage 85.96% 86.00% +0.03%
==========================================
Files 81 81
Lines 29506 29551 +45
==========================================
+ Hits 25366 25416 +50
+ Misses 4140 4135 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
6ccd5b7
to
0f9608b
Compare
0f9608b
to
6ca4791
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is just one case that this doesn't seem to work for me that we should support I think, since we're going the angle utility route: arcTo
doesn't return an accurate result:
sketch001 = startSketchOn("XY")
|> startProfileAt([0, 0], %)
|> line([5, 0], %)
|> tangentialArcToRelative([3.14, 2.14], %, $a)
|> angledLine([segmentTangentialAngle(a), 5], %)
|> line([-5, 0], %, $b)
|> angledLine([segmentTangentialAngle(b), 4.07], %)
|> arcTo({
end: [10, 10],
interior: [5.14, 9.14],
}, %, $c)
|> angledLine([segmentTangentialAngle(c), 5], %)
It might be worth documenting that:
- For straight segments, there is no difference between
segAng
andsegmentTangentialAngle
- For tangential arcs, this is getting the tangency angle coming out of the end of the arc. Maybe that's fine to be implicit because the tangency going in would be a previous segment. But in the future with
arcTo
I could see a use for getting the tangent angle going into the arc.
6ca4791
to
e7cd8c6
Compare
1fa23a8
to
842211d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Just verified I get the expected behavior in local development. Really cool LFG
365eea3
to
49e9a02
Compare
Awesome |
Resolves #4403.
We add a function that gets the angle that's tangent to the end of a given segment. This is useful for making a sketch with an arc followed by a line that smoothly follows the arc.