Path Delete
Filter whole sub-paths out of a Shape based on a per-path attribute or a scalar field sampled at each path's centroid. Companion to PointDelete — operates at the path level (drops a full glyph, fill region, etc.) instead of the vertex level.
Category: Shape Ops Menu path: Shape Ops > Path Delete
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
shape_in | shape | input | Source shape — output drops a subset of its sub-paths |
mask_in | scalarField | input | Optional scalar field. When connected, sampled at each path's centroid for the delete decision |
out | shape | output | Shape with deleted paths removed and orphaned vertices garbage-collected |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
rule | enum | By Attribute | What marks a path for deletion: By Attribute (a selection over any per-path attribute or the mask field), Range (a path-order span), Every Nth (periodic thinning — no attribute needed) |
attribute | string | (empty) | By Attribute rule: per-path value read when mask_in isn't connected — an attribute, group, or path intrinsic (@index = path ordinal; @num, @indexnorm also resolve). Vec values reduce. Empty deletes nothing (the old glyphIndex default silently ate glyphs on text shapes) |
attrRule | enum | Member | How the value marks a path: Member (> 0.5 — "delete the group", no extra knob), Greater Than, Less Than. Committing an intrinsic auto-flips Member to Greater Than |
attrValue | scalar | 0 | Comparison operand for Greater Than / Less Than. Hidden under Member — so @index · Greater Than · 2 deletes every path past the 3rd |
rangeFirst / rangeLast | scalar | 0 / 9 | Range rule: inclusive path-order span to delete |
everyN / everyOffset | scalar | 2 / 0 | Every Nth rule: delete path i when (i − offset) mod n = 0 |
invert | boolean | false | Flip any rule into "keep only these" — keep the group / span / every Nth, delete the rest |
How It Works
For each sub-path in the input shape, PathDelete computes a single scalar mask value, then decides keep-vs-delete based on threshold. The result is a new shape containing only the kept paths.
Mask source priority:
- If
mask_inis connected → sample the scalar field at the path's centroid (average of all referenced vertex positions). - Otherwise → read
path.attributes[attribute](the per-path attribute map, as written byShapeAttributesor by source nodes likeTextToShapeandVectorSource). - Missing → 0.0 (path is kept by default).
Topology: Whole sub-paths are removed atomically — vertices, control points, and per-path attributes go together. Vertices that are no longer referenced by any surviving path are garbage-collected (along with their per-vertex attribute entries) so downstream ShapeToPoints / ShapeAttributes don't see dangling points.
Difference from PointDelete
| PointDelete | PathDelete | |
|---|---|---|
| Filters | individual vertices | whole sub-paths |
| Attribute source | shape.points.attributes (per-vertex) | path.attributes (per-path) |
| Behavior on shape input | Deletes vertices, rewires segments around gaps (paths get jagged) | Deletes whole paths, preserves internal geometry |
| Right tool for | "wobble away specific points in a stroke", per-vertex attribute filtering | "drop letters from text", "remove pieces from an SVG", glyph-level filtering |
If you want to delete an entire glyph from TextToShape, use PathDelete — TextToShape writes glyphIndex at the per-path level. PointDelete would only see the per-vertex attribute map (which is empty for text glyphs) and would no-op.
Usage Examples
Delete the last N glyphs of a text string
Text → TextToShape → PathDelete (attribute=glyphIndex, threshold=N-0.5) → DrawShape. Each glyph has glyphIndex equal to its 0-based position; setting threshold to N - 0.5 deletes everything from glyph N onwards.
Animate text deletion
Keyframe the threshold param from -0.5 → totalGlyphs+0.5. The text appears to "type out" letter by letter (or use invert: true for "delete from the front"). Combine with TextAnimate for richer effects.
Drop SVG paths by name or color
VectorSource → ShapeAttributes (target=Custom, attribute=keepFlag, value-by-name) → PathDelete (attribute=keepFlag). Use ShapeAttributes to tag specific paths and then PathDelete to remove them.
Field-driven path filtering
DistanceField (from a shape) → PathDelete.mask_in. Each input path's centroid samples the field; paths in the field's "high" region get dropped. Sweep a moving distance source to reveal/hide pieces over time.
Trim a multi-path shape by region
Rectangle → ShapeBoolean ← Multi-path shape → PathDelete.mask_in (from a Gradient field). Useful for cutting boolean results into bands.
Tips
glyphIndexis the default attribute because text filtering is the most common case. For other inputs (VectorSource paths, ShapeAttributes-tagged paths), changeattributeto whatever you've tagged.- Threshold of
0.5works well for integer attributes likeglyphIndex— values 0 and below are kept, 1 and above are deleted. Shift threshold by an integer to keep more/fewer paths. - Use
invertfor "keep only the front" — flips the comparison so smaller values are deleted. - Field masks sample at the path centroid only. For per-vertex precision (e.g., trimming an open path mid-stroke), use
PointDeleteinstead — but expect topology rewiring. - The output preserves shape-level
fill_ruleand any shape-level attributes set viaShapeAttributes. - PathDelete is a pure shape transform — no rasterization, no GPU. Cost is O(paths × vertices_per_path).
Related Nodes
- PointDelete — vertex-level filter (rewires paths around deleted vertices)
- TextToShape — emits glyph outlines tagged with
glyphIndexper path - ShapeAttributes — set custom per-path attributes for PathDelete to filter on
- ShapeExploder — explicitly peel one sub-path at a time (manual alternative)
- DistanceField, Gradient — scalar field sources for
mask_in