Skip to content

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

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
merged 8 commits into from
Jun 8, 2025

Conversation

indierusty
Copy link
Collaborator

@indierusty indierusty commented May 22, 2025

Partly closes #2635.

Now the Bounding Box node uses Kurbo instead of Bezier-rs.

Also: Refactor to use kurbo's predefined default accuracy constant.

@indierusty indierusty changed the title Refactor: Use Kurbo's default accuracy constant. Refactor: 'Bounding Box' node to use Kurbo instead of Bezier-rs. May 25, 2025
@indierusty indierusty marked this pull request as ready for review May 25, 2025 07:24
@indierusty indierusty requested a review from Keavon May 25, 2025 07:24
@indierusty indierusty closed this May 25, 2025
@indierusty indierusty reopened this May 25, 2025
@indierusty indierusty closed this May 25, 2025
@indierusty indierusty reopened this May 26, 2025
@indierusty indierusty marked this pull request as draft May 26, 2025 05:15
@indierusty indierusty marked this pull request as ready for review May 27, 2025 05:29
@Keavon Keavon changed the title Refactor: 'Bounding Box' node to use Kurbo instead of Bezier-rs. Refactor the 'Bounding Box' node to use Kurbo instead of Bezier-rs Jun 8, 2025
@Keavon Keavon merged commit e6a7325 into master Jun 8, 2025
4 checks passed
@Keavon Keavon deleted the ir/refactor-constants branch June 8, 2025 21:49
Keavon added a commit that referenced this pull request Jun 20, 2025
…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]>
Moharum1 pushed a commit to Moharum1/Graphite that referenced this pull request Jun 23, 2025
…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]>
Keavon added a commit that referenced this pull request Jun 26, 2025
…spacing based on separation or quantity (#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' (#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 (#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 (#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 (#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 (#2714)

* Skip duplicate endpoint and close sampled paths in Sample Points node
Closes #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]>
@0HyperCube
Copy link
Member

@Keavon @indierusty I'm really confused about why you did this? It seems to significantly reduce performance since a lot of unnecessary allocations occur all of the time.

@indierusty
Copy link
Collaborator Author

I refactored the function for calculating the bounding box specifically for refactoring 'Bounding Box' node implementation. We can split the function in two where first calculate tight bbox and second losse bbox that can be used by the renderer.

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: Refactor nodes to use Kurbo instead of Bezier-rs
3 participants