Skip to content

Fix the Bevel node so it applies a consistent bevel size regardless of angle #2293

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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

MohdMohsin97
Copy link

Previously algorithm only spilt the line from both side with the give length.

411837396-7bfb998d-604c-45d5-90e4-c607c3144855

Update the bevel algorithm for straight line only to give same bevel length.

Screenshot 2025-02-15 222335

Issue #2281

@Keavon
Copy link
Member

Keavon commented Feb 16, 2025

Thanks!

Update the bevel algorithm for straight line only to give same bevel length.

Based on this sentence, do I presume correctly that this means curved segments are left for future work?

@Keavon Keavon changed the title feat: update the bevel algorithm for same bevel length Fix the Bevel node so it applies a consistent bevel size regardless of angle Feb 16, 2025
@MohdMohsin97
Copy link
Author

MohdMohsin97 commented Feb 17, 2025

Based on this sentence, do I presume correctly that this means curved segments are left for future work?

Yes, currently it only work for straight line only, I'll try to make it work for curve line also.

@Keavon
Copy link
Member

Keavon commented Feb 20, 2025

!build

Copy link

📦 Build Complete for 2900271
https://93383e91.graphite.pages.dev

@Keavon
Copy link
Member

Keavon commented Feb 20, 2025

This doesn't seem to have the expected behavior after passing a certain size, see video:

capture_33_.mp4

Could that be fixed, please?

@Keavon Keavon marked this pull request as draft February 20, 2025 11:27
@MohdMohsin97
Copy link
Author

I attempted to resolve the algorithm. Is this the expected behavior?

Screen.Recording.2025-02-20.212534.mp4

@Keavon
Copy link
Member

Keavon commented Feb 20, 2025

!build

Copy link

📦 Build Complete for 8c2de3b
https://77b9d277.graphite.pages.dev

@Keavon
Copy link
Member

Keavon commented Feb 20, 2025

capture_34_.mp4

@Keavon
Copy link
Member

Keavon commented Mar 11, 2025

!build

Copy link

📦 Build Complete for 8001050
https://764db1b7.graphite.pages.dev

@MohdMohsin97 MohdMohsin97 marked this pull request as ready for review March 15, 2025 08:31
@MohdMohsin97
Copy link
Author

Screen.Recording.2025-03-15.144906.mp4

Fixes the curve part

@Keavon
Copy link
Member

Keavon commented Mar 15, 2025

!build

Copy link

📦 Build Complete for f716b8b
https://9f507811.graphite.pages.dev

Copy link
Member

@0HyperCube 0HyperCube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution; however it does not work if the layer has a transform applied to it.

if bezier.is_linear() {
bezier.handles = bezier_rs::BezierHandles::Linear;
}

prev_bezier = prev_bezier.apply_transformation(|p| vector_data.transform.transform_point2(p));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0HyperCube 0HyperCube marked this pull request as draft March 26, 2025 18:33
@Keavon Keavon force-pushed the master branch 4 times, most recently from aa7ff13 to e11b57a Compare April 6, 2025 11:41
@MohdMohsin97
Copy link
Author

Fixes the layer transformed issue.

Screen.Recording.2025-04-27.150918.mp4

@MohdMohsin97 MohdMohsin97 marked this pull request as ready for review April 27, 2025 09:48
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.

3 participants