Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Moharum1
Copy link
Contributor

Closes #2720

@Moharum1
Copy link
Contributor Author

@Keavon FIxied the points you mentioned above

@Keavon
Copy link
Member

Keavon commented Jun 18, 2025

!build

Copy link

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

@Keavon
Copy link
Member

Keavon commented Jun 18, 2025

Please ensure this works with the adaptive spacing parameter.

@Moharum1
Copy link
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
Copy link
Member

Keavon commented Jun 19, 2025

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
Copy link
Member

Keavon commented Jun 20, 2025

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
Copy link
Member

Keavon commented Jun 23, 2025

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 <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
@Moharum1 Moharum1 marked this pull request as ready for review June 23, 2025 12:56
@Moharum1
Copy link
Contributor Author

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

@Keavon
Copy link
Member

Keavon commented Jun 25, 2025

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
3 of 4 checks passed
@Keavon
Copy link
Member

Keavon commented Jun 26, 2025

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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Priyanshu <[email protected]>
Co-authored-by: seam0s <[email protected]>
Co-authored-by: Adesh Gupta <[email protected]>
Co-authored-by: Ezbaze <[email protected]>
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