3dSynth

Docs / Fabric Sculpt

Open in the interactive docs reader

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.

Before and after TSP: a mess of paths becomes an efficient traversal

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:

  1. Picks the first path as the starting point.
  2. Repeatedly finds the closest unvisited path's start or end, whichever is nearer.
  3. If the end is closer, the path is reversed before being added.
  4. 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