fix : Auto-Tangents node with spread = 0 and preserve existing = true causes weird change#3823
fix : Auto-Tangents node with spread = 0 and preserve existing = true causes weird change#3823Annonnymmousss wants to merge 1 commit intoGraphiteEditor:masterfrom
Conversation
… causes weird change
Summary of ChangesHello @Annonnymmousss, 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 a specific bug within the 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
The pull request addresses an issue where the Auto-Tangents node produced unexpected results when spread was 0 and preserve_existing was true. The proposed change introduces an early return for this specific combination of parameters. However, this early return alters the intended behavior for points with zero-length handles, preventing them from being correctly converted to sharp corners.
| if spread == 0. && preserve_existing { | ||
| return source; |
There was a problem hiding this comment.
The added if statement introduces a functional change that deviates from the expected behavior of spread = 0. (sharp corner) when preserve_existing is true.
If spread is 0. and preserve_existing is true, the existing logic (lines 911-929) correctly handles two scenarios:
- Points with non-zero existing handles are preserved (due to
preserve_existing). - Points with zero-length existing handles (i.e., handles at the anchor position) are explicitly set to
None(due tospread = 0.), making them sharp corners.
The current early return return source; prevents scenario 2 from occurring. This means if a point has a handle that is exactly at its anchor position, it will not be removed, which contradicts the "sharp corner" definition of spread = 0..
To maintain the correct behavior, this early return should be removed, allowing the subsequent logic to process all points as intended.
closes #3822
Screen.Recording.2026-02-24.at.9.54.03.PM.mov