clusters - blossommerz/locus-hub GitHub Wiki
Home > Working with clusters
< Previous: Inspect | Next: Input >
Collapse a recipe into one reusable node you can edit, save, and stamp.
A cluster collapses a whole sub-recipe into a single node. Instead of a tangle of a dozen nodes, you get one tidy node with just the sockets that matter - and you can reuse it across designs.
Select the nodes you want to bundle and run Group Selection - from the Cluster menu (buttons at the top of the menu, both in the native menu bar and the in-window menu) or from the node search. Locus wraps them into one cluster node, keeping every connection to the rest of the node graph intact. To take it apart again, select the cluster and run Ungroup Selection - you get the original nodes back, wired exactly as before.
Before - a perpendicular-bisector recipe: eight nodes turning one segment into the line that bisects it.
After Group Selection - the eight nodes collapse into one Perp Bisector cluster, showing only the sockets that matter: a Segment in, a Line out.
Double-click a cluster's body to step inside and edit its child nodes in place. A breadcrumb trail (Root > Cluster > ...) across the top shows how deep you are; click a crumb or press Esc to pop back out. Clusters can nest, so you can descend through several levels.
Inside the cluster - the breadcrumb (Root > Perp Bisector) shows where you are and gets you back out. The Input and Output nodes at either end are what declare the cluster's face sockets.
Edits inside a cluster flow back out immediately - your pattern in the model window keeps updating as you work, and saving is always correct even mid-edit.
A cluster's sockets come from special Cluster Input and Cluster Output nodes that live inside it. Each Input pulls a value in from the parent; each Output pushes a result back out. Add them from the Cluster category while you're inside a cluster.
The order is a number, not a position. Each Input and Output carries an Order value, and that number alone decides where its socket sits on the cluster's face, counting from the top. Renumber it and the socket moves. Dragging a node around inside the cluster does not reorder anything; it works the other way round, and Tidy Layout restacks them to match their numbers.
If a cluster input feeds a plain number inside - a count, or the Deskew option below - its socket becomes inline-editable: double-click it and type a value, no wiring required. Inputs that carry geometry stay wire-only, since there's nothing to type for a shape.
An untouched socket shows the value it is actually running on. It used to draw 0 while the node inside quietly used its own default, which made a socket look unset when it was not. Where you will notice: the symmetry clusters' Repeat sockets read 3 rather than 0. They always arrayed 3. Only the number on the socket was wrong.
Save a finished cluster once and stamp it into any file. Right-click a cluster to save it - Save to Library (keep it in Locus for reuse) or Save to File (write it out to share). A library cluster appears both in the node search as Library: <name> and under the Cluster menu's Library flyout, which lists every saved cluster ready to drop in. On the desktop app the library persists between sessions, so your saved clusters are there next time you open Locus.
Dropped instances are fully self-contained - the recipe travels inside the cluster, so a saved file carries everything it needs with no outside dependency.
The Cluster menu's Library flyout is split into two labeled sections:
- User: clusters you've saved yourself, on top.
-
Library: the built-in clusters Locus ships with (the 17 wallpaper-group clusters and their
randvariants, the compass-and-straightedge construction clusters, and two layout helpers, Auto Mirror and Auto Array), below.
A section is only shown when it has something in it. Saving your own cluster under a name that matches a built-in doesn't overwrite the built-in - your save is silently kept as your own (Locus renames it, adding "copy" if needed) so a shipped default can never be shadowed by a stale save, and a Locus update to a built-in cluster always reaches you.
The wallpaper-group clusters whose lattice is slanted - p1, p2, cm, cmm, p3, p6, p3m1, p31m, and p6m - expose a Deskew input. Set it to 1 or 2 to straighten the repeat block so it sits square to the page rather than following the oblique or hexagonal lattice angle: 1 squares up V1 (the columns), 2 squares up V2 (the rows), and 0 leaves the block as the lattice makes it - the same three values as the Deskew pulldown on Array: Directed. The eight always-rectangular groups don't offer it, because their block is already square.
Every wallpaper-group cluster (all 17 groups, plain and rand) welds coincident tile edges by default - the seams where one repeated copy meets the next are dissolved into a single edge rather than left as two overlapping edges sitting on top of each other. That's what keeps a line-based export clean: no doubled lines to trace twice, no gap where floating-point rounding leaves a hairline crack between tiles.
The weld isn't exposed on the cluster's face - it's set on the internal tiling node. If you need the unwelded seams (say, to select and inspect individual tile edges), double-click into the cluster and turn Weld off on that node directly.
Caution
Confirm against the build Which groups expose Deskew, whether weld is on by default, and the exact set of wallpaper-group clusters available, may differ in your version - check what's actually on the cluster in front of you.
Two things sound similar but do different jobs:
- A cluster is functional: it packages real nodes into one reusable node with its own sockets, editable inside and saveable to the library.
- A Group is cosmetic: a colored backdrop that tidies the canvas without collapsing anything. See Keeping the node graph tidy.
Inside a cluster, these two nodes declare its sockets - they're only available while you're editing a cluster.
Input - declare a cluster input socket.
Output - declare a cluster output socket.


