node keep by pattern - blossommerz/locus-hub GitHub Wiki

Home > Data > Select by Pattern

< Previous: Select Every Nth | Next: Select Alternating >

Node Library

Select by Pattern node icon   Select by Pattern (node)

Keep items by a text mask or an index list; the rest go to Unselected.

Select by Pattern node diagram

Category: Data | Add menu: Data > Select by Pattern

Inputs

  • Geometry (any): the list to filter.
  • Pattern (any): a text mask (wire a Text node in). Either a repeating 0/1 or T/F mask where 1/T = keep (e.g. 100 keeps every third item), or a comma-separated list of indices to keep (e.g. 0,2,5; a negative index counts from the end).

Outputs

  • Selected (any): the items the pattern selects.
  • Unselected (any): the rest, live so you can style or reuse them.

What Select by Pattern is for

The most expressive of the keep family - you spell out exactly which items to keep as text. A short mask repeats across the whole list: 110 keeps two, drops one, keeps two, drops one, and so on. Or name exact positions with an index list like 0,2,5. Feed the mask from a Text node wired into Pattern.

Reach for it when the selection isn't a simple step (Select Every Nth) or a solid block (Select Range) - when you want an arbitrary, repeating, or hand-picked set.

< Previous: Select Every Nth | Next: Select Alternating >

Related

⚠️ **GitHub.com Fallback** ⚠️