Bezier-rs: Add joins and caps to offsets and outlines - #1083
Conversation
Deploying with
|
| Latest commit: |
14ec93e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a625e87e.graphite.pages.dev |
| Branch Preview URL: | https://bezier-rs-join-caps.graphite.pages.dev |
|
It looks really good! A really small nit I found was with the inner outline generated, at certain distances, it doesn't look like they connect at a point, looks like they overlap just barely. This screenshot was taken at 250% zoom so the misalignment is exaggerated. I think the current level of precision is fine, I just wanted to point this out. |
13f7e5e to
b9d2cc6
Compare
RobNadal
left a comment
There was a problem hiding this comment.
Thanks for all the effort you put into this feature @hannahli2010, looks amazing!
b9d2cc6 to
d07737f
Compare
d07737f to
63809fc
Compare
Keavon
left a comment
There was a problem hiding this comment.
Please resolve the comments and merge conflicts, then you're good to merge. Nice work!
| let normalized_in_tangent = in_tangent.normalize(); | ||
| let normalized_out_tangent = out_tangent.normalize(); | ||
|
|
||
| // The tangents must not be parallel for the miter join |
There was a problem hiding this comment.
Can you also implement https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-miterlimit please? We need this in Graphite.
There was a problem hiding this comment.
I'm planning to implement this in a different PR so that we can merge this one first.
I'm thinking of adding this feature via an additional optional param on offset and outline - does that sound alright to you @Keavon ?
There was a problem hiding this comment.
Sounds good, and that is probably the best way to add it to the API.
63809fc to
14ec93e
Compare
* Intial work * Improve miter and add round join * Get arcs to go opposite direction * Add cap and other refactors * Rename joint to join, fix some bugs * Fix single point issue * Clean up * Fix iframe sizes and update UI * Address comments and handle single point outline * Rename variables, fix branches in outline * Address comments

Add the following caps: Butt, Round, and Square
Add the following joins: Bevel, Miter, Round
Handle bad offset cases where the object being offset was essentially a single point
Fix issue with attempting to normalize a zero vector
Change
reduced_curves_and_t_valuesto return pairs oftvalues