Path Optimizer (TSP)
Reorders the paths using a nearest-neighbour heuristic for the Travelling Salesman Problem. Each path's start or end is chosen greedily based on distance to the previous path's endpoint, minimizing travel moves.

Parameters
Path Optimizer parameters
(none)- This filter has no parameters. It always runs a single-pass nearest-neighbour TSP starting from the first path in the collection.
The filter:
- Picks the first path as the starting point.
- Repeatedly finds the closest unvisited path's start or end, whichever is nearer.
- If the end is closer, the path is reversed before being added.
- Continues until all paths are placed.
It's a heuristic — not an optimal solver. Good-enough for thousands of paths; not perfect for tight corners where an exhaustive TSP might find shorter orderings.
Typical use
- Multi-path generators like Voronoi Mesh and Grid Lattice which produce many small disconnected edges.
- Before Connect Paths — reordering paths close together ensures Connect Paths can fuse them.
- Production-ready exports — always cheap to include at the end of a stack.
Related
- Fabric Sculpt Overview
- Connect Paths filter — merges nearby endpoints after TSP reordering.