Skip to content

Fix- pen tool causing jitter at the endpoints#3913

Open
Chetansahney wants to merge 9 commits intoGraphiteEditor:masterfrom
Chetansahney:fix/pen-tool-closed-path-merge
Open

Fix- pen tool causing jitter at the endpoints#3913
Chetansahney wants to merge 9 commits intoGraphiteEditor:masterfrom
Chetansahney:fix/pen-tool-closed-path-merge

Conversation

@Chetansahney
Copy link

Fixes #3912
(the pen merging issue at the endpoints) with reference to the conversation:

https://discord.com/channels/731730685944922173/731738914812854303/1483829916096139377
&
https://discord.com/channels/731730685944922173/731738914812854303/1481800685107544165

Any feedbacks are appreciated.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 addresses a specific pen tool issue related to merging paths at their endpoints by refining the logic for identifying extendable paths. Additionally, it significantly enhances the user experience for editing fundamental vector shapes like circles, arcs, and spirals by introducing linked collinear manipulators, allowing for more intuitive and unified adjustments of these geometric forms.

Highlights

  • Pen Tool Endpoint Merging Fix: The should_extend utility function has been refactored to directly identify the closest anchor endpoints for path merging, resolving an issue where the pen tool had difficulties merging at endpoints.
  • Improved Vector Shape Editing: The circle, arc, and spiral node generators now explicitly add colinear_manipulators to their generated vector shapes. This enhancement links adjacent handles, making these shapes easier to edit and manipulate as cohesive units, especially for curves.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request refactors the should_extend function with an inline implementation for finding the closest point, though a review comment suggests encapsulating this logic for better readability and maintainability. Additionally, the circle, arc, and spiral shape generation functions were updated to add colinear_manipulators to the generated Vector objects, linking all handles for circles and linking handles for adjacent cubic bezier segments in arcs and spirals. Review feedback suggests refactoring the duplicated handle linking logic in arc and spiral into a reusable function, adding comments to explain the is_cubic() check, and considering HandleId::new for creating handle IDs for consistency and safety.

@Chetansahney Chetansahney changed the title Fix/pen tool closed path merge Fix- pen tool causing jitter at the endpoints Mar 19, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@Keavon Keavon force-pushed the master branch 5 times, most recently from 9b97ab7 to 2e842cb Compare March 19, 2026 11:00
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.

The pen merging tool is creating a jitter at the endpoints [RESOLVED]

2 participants