Skip to content

Rename 'Sample Points' node to 'Sample Polyline' and add a parameter spacing based on separation or quantity - #2727

Merged
Keavon merged 18 commits into
GraphiteEditor:masterfrom
Moharum1:Radio-button-for-sample-by-count-option
Jun 26, 2025
Merged

Keavon merged 18 commits into
GraphiteEditor:masterfrom
Moharum1:Radio-button-for-sample-by-count-option

Conversation

@Moharum1

Copy link
Copy Markdown
Contributor

Closes #2720

Comment thread editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs Outdated
Comment thread node-graph/gcore/src/vector/algorithms/bezpath_algorithms.rs Outdated
@Moharum1

Copy link
Copy Markdown
Contributor Author

@Keavon FIxied the points you mentioned above

@Keavon

Keavon commented Jun 18, 2025

Copy link
Copy Markdown
Member

!build

@github-actions

Copy link
Copy Markdown
📦 Build Complete for c3667ca
https://03867918.graphite.pages.dev

@Keavon

Keavon commented Jun 18, 2025

Copy link
Copy Markdown
Member

Please ensure this works with the adaptive spacing parameter.

@Moharum1

Copy link
Copy Markdown
Contributor Author

@Keavon but isn't it already adaptive without the need of the adpative spacing option, i mean the code distruibute the lenght equally on the number of points specified, so what should an adaptive spacing do ?
i will do some search but further explination would be nice

@Keavon

Keavon commented Jun 19, 2025

Copy link
Copy Markdown
Member

Please test how the node works with adaptive spacing on and off. You'll see how it isn't incompatible with your new mode.

@Keavon
Keavon force-pushed the master branch 2 times, most recently from 34dced3 to 5cacab2 Compare June 20, 2025 06:47
@Keavon
Keavon force-pushed the Radio-button-for-sample-by-count-option branch from c3667ca to 8f19ca7 Compare June 20, 2025 07:18
@Keavon

Keavon commented Jun 20, 2025

Copy link
Copy Markdown
Member

I have force pushed this branch to move it to a new base. Ensure you have the branch checked out. Then please run git stash on any local changes (and ask me before following these steps if you have any un-pushed commits on your local machine). Then fetch this branch and git reset --hard origin/Radio-button-for-sample-by-count-option. And finally git stash pop your stashed local changes, if you stashed them.

@Keavon Keavon changed the title Create a Radio button for sample by count option Add a parameter to the 'Sample Points' node for count instead of spacing Jun 23, 2025
@Keavon Keavon changed the title Add a parameter to the 'Sample Points' node for count instead of spacing Add a parameter to the 'Sample Points' node for points count instead of spacing Jun 23, 2025
@Keavon
Keavon marked this pull request as draft June 23, 2025 11:00
@Keavon

Keavon commented Jun 23, 2025

Copy link
Copy Markdown
Member

I've marked this as a draft while waiting on the requested change. Please mark this as "ready for review" once completed. Thank you!

Keavon and others added 8 commits June 23, 2025 13:53
…ox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector' (GraphiteEditor#2697)

Make repeater nodes use pivot not bbox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector'
…raphiteEditor#2662)

* use kurbo's default accuracy constant

* fix append_bezpath() method

* refactor bounding box node

* fix append bezpath implementation.

* comments

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
…ers (GraphiteEditor#2630)

* Add selection overlay for free-floating anchors

* Add hover overlay for free-floating anchors

* Refactor outline_free_floating anchor

* Add single-anchor click targets on VectorData

* Modify ClickTarget to adapt for Subpath and PointGroup

* Fix Rust formatting

* Remove debug statements

* Add point groups support in VectorDataTable::add_upstream_click_targets

* Improve overlay for free floating anchors

* Remove datatype for nodes_to_shift

* Fix formatting in select_tool.rs

* Lints

* Code review

* Remove references to point_group

* Refactor ManipulatorGroup for FreePoint in ClickTargetGroup

* Rename ClickTargetGroup to ClickTargetType

* Refactor outline_free_floating_anchors into outline

* Adapt TransformCage to disable dragging and rotating on a single anchor layer

* Fix hover on single points

* Fix comments

* Lints

* Code review pass

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
…Editor#2682)

* Improved comments

* Add point sliding with approximate t value

* Add similarity calculation

* Numerical approach to fit the curve

* Reliable point sliding for cubic segments

* Fix formatting and clean comments

* Fix cubic with one handle logic

* Cancel on right click and escape

* Two parameter optimization

* Esc/ Right click cancellation

* Code review

* Fix dynamic hints

* Revert selected_points_counts and fix comments

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
…ing its sampled paths (GraphiteEditor#2714)

* Skip duplicate endpoint and close sampled paths in Sample Points node
Closes GraphiteEditor#2713

* Comment

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
@Moharum1
Moharum1 marked this pull request as ready for review June 23, 2025 12:56
@Moharum1

Copy link
Copy Markdown
Contributor Author

@Keavon Is there any problem with the re-written version ?

@Keavon

Keavon commented Jun 25, 2025

Copy link
Copy Markdown
Member

I'm currently finishing up my work on getting this ready to merge.

Also I realized that you were right about "count" not needing "adaptive spacing", I'd misunderstood that when I was testing it. Sorry about that confusion.

Should be merging shortly.

@Keavon
Keavon force-pushed the Radio-button-for-sample-by-count-option branch from 5590162 to f21a252 Compare June 26, 2025 01:04
@Keavon Keavon changed the title Add a parameter to the 'Sample Points' node for points count instead of spacing Rename 'Sample Points' node to 'Sample Polyline' and add a parameter spacing based on separation or quantity Jun 26, 2025
@Keavon
Keavon merged commit 504af4e into GraphiteEditor:master Jun 26, 2025
@Keavon

Keavon commented Jun 26, 2025

Copy link
Copy Markdown
Member

Please remember to leave a comment in #2720 with this PR number.

@Moharum1
Moharum1 deleted the Radio-button-for-sample-by-count-option branch June 29, 2025 18:52
urisinger pushed a commit to urisinger/Graphite that referenced this pull request Jul 15, 2025
…spacing based on separation or quantity (GraphiteEditor#2727)

* Added Count point Radio button to property pannel

* Implemented on Count radio button functionality

* Fixed linting and Title case problem

* Fixing more linting problem

* Instance tables refactor part 8: Make repeater nodes use pivot not bbox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector' (GraphiteEditor#2697)

Make repeater nodes use pivot not bbox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector'

* Refactor the 'Bounding Box' node to use Kurbo instead of Bezier-rs (GraphiteEditor#2662)

* use kurbo's default accuracy constant

* fix append_bezpath() method

* refactor bounding box node

* fix append bezpath implementation.

* comments

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>

* Add overlays for free-floating anchors on hovered/selected vector layers (GraphiteEditor#2630)

* Add selection overlay for free-floating anchors

* Add hover overlay for free-floating anchors

* Refactor outline_free_floating anchor

* Add single-anchor click targets on VectorData

* Modify ClickTarget to adapt for Subpath and PointGroup

* Fix Rust formatting

* Remove debug statements

* Add point groups support in VectorDataTable::add_upstream_click_targets

* Improve overlay for free floating anchors

* Remove datatype for nodes_to_shift

* Fix formatting in select_tool.rs

* Lints

* Code review

* Remove references to point_group

* Refactor ManipulatorGroup for FreePoint in ClickTargetGroup

* Rename ClickTargetGroup to ClickTargetType

* Refactor outline_free_floating_anchors into outline

* Adapt TransformCage to disable dragging and rotating on a single anchor layer

* Fix hover on single points

* Fix comments

* Lints

* Code review pass

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>

* Add anchor sliding along adjacent segments in the Path tool (GraphiteEditor#2682)

* Improved comments

* Add point sliding with approximate t value

* Add similarity calculation

* Numerical approach to fit the curve

* Reliable point sliding for cubic segments

* Fix formatting and clean comments

* Fix cubic with one handle logic

* Cancel on right click and escape

* Two parameter optimization

* Esc/ Right click cancellation

* Code review

* Fix dynamic hints

* Revert selected_points_counts and fix comments

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>

* Fix Sample Points node to avoid duplicating endpoints instead of closing its sampled paths (GraphiteEditor#2714)

* Skip duplicate endpoint and close sampled paths in Sample Points node
Closes GraphiteEditor#2713

* Comment

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>

* Implemented on Count radio button functionality

* Fixed linting and Title case problem

* The sample count can now work with adaptive spacing

* Readying for production

* Rename to 'Sample Polyline' and add migration

* Upgrade demo artwork

* Add monomorphization

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Priyanshu <indierusty@gmail.com>
Co-authored-by: seam0s <153828136+seam0s-dev@users.noreply.github.com>
Co-authored-by: Adesh Gupta <148623820+4adex@users.noreply.github.com>
Co-authored-by: Ezbaze <68749104+Ezbaze@users.noreply.github.com>
@Keavon

Keavon commented Jun 13, 2026

Copy link
Copy Markdown
Member

Hi @Moharum1, thanks again for this code contribution to the project! We're still hoping you will respond to the request to relicense this code. Please see #4208 ASAP, thank you!

@Keavon

Keavon commented Jun 15, 2026

Copy link
Copy Markdown
Member

Hi @Moharum1, we're grateful of your past code contribution to Graphite, but unless we hear from you by the end of this weekend with agreement about relicensing your code to include the MIT license, we will begin steps to remove your code contributions so that you will no longer be a Graphite code contributor. We'd much rather avoid this outcome, so please respond now.

To agree, simply log into your GitHub account, visit #4208, and copy-paste this into a comment:

"I license my past and future contributions to Graphite under the dual MIT/Apache-2.0 license, allowing licensees to choose either at their option."

If you're hesitant because you disagree or have questions, feel free to respond with another message; we'll do our best to answer your questions or concerns. More explanation is at the top of the linked thread if you're confused. So far, 164 contributors have agreed and you are among the 11% remaining whom we are still hoping to hear from before we begin removing your code from the project starting this Monday. (If you only see this later than Monday, your future belated response will still be appreciated.)

Thank you for your cooperation and support of open source, and we hope you'll help us keep your valued contributions in-tact.

@Keavon

Keavon commented Jun 15, 2026

Copy link
Copy Markdown
Member

For the record: after some investigation, I have concluded that @Moharum1 retains effectively 0% authorship of this PR and I am the sole author of all copyrightable code edits that were merged into master as 504af4e. In hindsight, I should have merged this implementation under my own account and closed this PR to accurately reflect the authorship history.

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.

Sample Points should have option to sample by count (like in blender)

6 participants