mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Dents whose boundary turns backward by no more than the angle are flattened by the hull; deeper dents keep their original boundary. At the maximum of 360 degrees the node produces the fully convex hull as before, and at 0 degrees every dent survives. Bridges between separate subpaths always apply, so disjoint islands stay connected and interior geometry (such as holes) never survives at any setting. The partial hull reuses the convex pipeline, keeping collinear hull vertices so pockets (the boundary stretch each bridge spans, located by gap matching along the subpath) can attach to them. Each pocket is processed by a canonical deletion sweep that repeatedly removes the cheapest reflex sample vertex whose bypassing chord stays on the empty side of the boundary and within the angle budget, which handles nested dents inherently and can never cut into material bumps. Surviving chords are polished to exact tangencies with the same closed-form solves used for hull bridges, and kept stretches are emitted as exact cuts of the original segments.