mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-01 13:58:12 +08:00
Finish the convex hull node: in-repo algorithm, robustness, and tests
Replaces the WIP node crate, which depended on a convex_hull crate that only existed outside the repository, with a self-contained implementation: - The curved hull algorithm lives in vector-types' algorithms module. It splits curves at inflections and cusps into curvature-monotone arcs, discovers the boundary structure from a sampled polygonal hull, refines every transition to an exact tangency with closed-form quartic tangent-through-point solves, then emits the boundary as cuts of the original segments joined by straight bridge lines. - The node moves into vector-nodes alongside the other 'Vector: Modifier' nodes, ported to the List/attributes model. It accepts Graphic[] or Vector[], wraps every subpath (open or closed) and free-floating anchor point across all items, and outputs a single world-space hull path. - The boolean-union pre-pass is dropped as unnecessary: the hull of all segments equals the hull of their union, and the polyline connector it relied on lost floating points and mishandled open paths.
This commit is contained in:
@@ -89,7 +89,6 @@ vector-nodes = { path = "node-graph/nodes/vector" }
|
||||
repeat-nodes = { path = "node-graph/nodes/repeat" }
|
||||
math-nodes = { path = "node-graph/nodes/math" }
|
||||
path-bool-nodes = { path = "node-graph/nodes/path-bool" }
|
||||
convex-hull-nodes = { path = "node-graph/nodes/convex_hull" }
|
||||
graph-craft = { path = "node-graph/graph-craft" }
|
||||
graph-storage = { path = "document/graph-storage", default-features = false }
|
||||
document-format = { path = "document/document-format" }
|
||||
|
||||
Reference in New Issue
Block a user