Skip to content

Add molding segments to the Path tool#2660

Merged
Keavon merged 28 commits into
GraphiteEditor:masterfrom
4adex:moulding_segment
Jun 13, 2025
Merged

Add molding segments to the Path tool#2660
Keavon merged 28 commits into
GraphiteEditor:masterfrom
4adex:moulding_segment

Conversation

@4adex
Copy link
Copy Markdown
Contributor

@4adex 4adex commented May 21, 2025

Partly closes #1870:

Closes #615.

@4adex 4adex changed the title Moulding of cubic bezier Molding Segments with Path Tool May 21, 2025
@4adex 4adex marked this pull request as ready for review May 23, 2025 19:44
@Keavon
Copy link
Copy Markdown
Member

Keavon commented May 24, 2025

!build

@Keavon Keavon changed the title Molding Segments with Path Tool Add molding segments to the Path tool May 24, 2025
@github-actions
Copy link
Copy Markdown

📦 Build Complete for 81bfca4
https://f7febd05.graphite.pages.dev

@Keavon
Copy link
Copy Markdown
Member

Keavon commented May 26, 2025

  • Right-click and Escape need to work to cancel molding
  • Alt should temporarily break colinearity and mold only the dragged segment, while also snapping the handles back to where they began before the molding drag began
  • C should permanently toggle colinearity on the two adjacent anchors, without snapping the handles back like above (be sure to handle the case where they're each initially of opposite state)
  • Hints should be updated for all of the above
  • We can merge this but then move onto finding a better algorithm that suits our desired molding behavior better
  • Please don't put any new code into Bezier-rs, find somewhere reasonable in the editor code to put that. Thanks.

@Keavon Keavon marked this pull request as draft May 26, 2025 04:03
@4adex 4adex marked this pull request as ready for review May 27, 2025 17:34
Comment thread editor/src/messages/tool/common_functionality/shape_editor.rs Outdated
@Keavon
Copy link
Copy Markdown
Member

Keavon commented May 30, 2025

!build

@github-actions
Copy link
Copy Markdown

📦 Build Complete for 55cc159
https://07657a88.graphite.pages.dev

@Keavon
Copy link
Copy Markdown
Member

Keavon commented May 30, 2025

I should update my request about C: it should do the same that Alt does now, except on a toggle basis instead of a held bass like Alt. Tapping C two times is equivalent to pressing then releasing Alt. But if it starts as already not colinear on both ends, then C does nothing and shouldn't be shown in the hints bar.

@Keavon
Copy link
Copy Markdown
Member

Keavon commented Jun 7, 2025

  • If you hover and then scroll with a scroll wheel or middle click drag to pan, the line that follows your cursor when hovering over a segment doesn't go away when your cursor goes out of range, until you next move your cursor by a pixel after panning. Please fix that to make things nice and polished.
  • After testing it, I've realized that C adds more complexity than it's worth, so let's please remove it and just stick with Alt.
  • When Alt isn't valid, please make sure the hints reflect that by only showing what's valid when it's valid.

Nearly ready to merge!

@4adex 4adex marked this pull request as ready for review June 10, 2025 09:55
@Keavon
Copy link
Copy Markdown
Member

Keavon commented Jun 12, 2025

!build

@github-actions
Copy link
Copy Markdown

📦 Build Complete for 033a761
https://7add1763.graphite.pages.dev

@Keavon Keavon merged commit f16b917 into GraphiteEditor:master Jun 13, 2025
4 checks passed
Keavon added a commit that referenced this pull request Jun 20, 2025
* Moulding of cubic bezier

* Implemented falloff with interpolation

* remove conflict

* Move falloff to consts

* Spelling

* Refine falloff param and bug fix

* Code review

* Add colinear disable modes to molding degment feat

* Clean comments and unused code

* Code refactor

* Fix error

* Change colinear toggle behaviour

* Code review

* Remove KeyC feat + Fix overlay

* Dynamic hints in path tool

* Revamp molding logic

* Code review

* Remove unused Bezier algorithms (maybe useful for future reference)

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
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.

Tracking Issue: Pen and Path tool improvements Sculpting / molding segments with the Path tool

2 participants