fix: prevent geometry shift in Auto-Tangents when spread is 0#3890
fix: prevent geometry shift in Auto-Tangents when spread is 0#3890Chetansahney wants to merge 1 commit intoGraphiteEditor:masterfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue where the Auto-Tangents feature could inadvertently alter geometry when the 'spread' parameter was set to zero. The fix ensures that existing manipulator handles are correctly maintained under these specific conditions, preventing unwanted modifications and preserving the intended shape of the geometry. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a fix to prevent geometry shifts in the Auto-Tangents node when spread is 0 and preserve_existing is enabled. The added logic correctly preserves the existing manipulator groups in this specific case, preventing their handles from being reset. My review includes a minor suggestion to improve the code style and readability of the new block, aligning it with idiomatic Rust formatting.
|
|
||
| // Changes to the original logic: | ||
| if preserve_existing && spread == 0.0 | ||
| { | ||
| new_manipulators_list.push(*curr); | ||
| continue; | ||
| } |
There was a problem hiding this comment.
The added logic is correct. However, it can be formatted more idiomatically to improve readability. The temporary comment and extra blank line can be removed, and the if statement can be formatted using standard Rust style (opening brace on the same line).
if preserve_existing && spread == 0.0 {
new_manipulators_list.push(*curr);
continue;
}There was a problem hiding this comment.
No issues found across 1 file
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Fixes #3822
Here is the fix to Spread==0 error and the AutoTangents error.
Based on the discussion : https://discord.com/channels/731730685944922173/731738914812854303/1481764902266736660