node select alternating - blossommerz/locus-hub GitHub Wiki
Home > Data > Select Alternating
< Previous: Select by Pattern | Next: Select by Condition >
Sort the faces of a pattern so no two that touch are alike.
Category: Data | Add menu: Data > Select > Select Alternating
- Geometry (any): the faces to sort.
- Classes (number, editable, default 2): how many groups to sort into.
- Class (number, editable, default 0): which group comes out of Selected.
- Corner Touch (boolean): whether two faces meeting at only a corner count as touching.
- Divide by: a pulldown, set to wedges. Wedges, rings or rows. Wire something in and the node graph chooses instead.
- Tolerance (number, editable, default 0.001): how close two edges must be to count as shared.
- Selected (any): the faces in the class you asked for.
- Unselected (region): all the rest.
- Class (any): the class number of each face, for driving other nodes.
- Classes (number): how many classes it actually used.
Give it the faces of a pattern and it sorts them so no face sits beside another of its own class. Where a two-class answer exists you get a counterchange; where one does not, it uses three or four.
Wire Selected and Unselected into different Style nodes and the pattern colors itself, with the alternation worked out from the geometry rather than picked by hand. Every time the pattern changes, the sorting follows.
Ask for more classes than the pattern needs and it splits them further to reach the number. Ask for fewer than it needs and it uses as many as it must, because the rule that no two touching faces match comes first. The Classes output tells you what it settled on.
Two faces that meet along an edge always count as touching. Two that meet at a single point are the awkward case, and this switch decides. Turn it on and a checkerboard's diagonal neighbors are forced apart, which usually costs you more classes.
< Previous: Select by Pattern | Next: Select by Condition >
- Select by Condition: split on a measurement instead of on adjacency.
- Style: what the two streams usually feed.

