Engraive

Vertex merging.

The fourth stage, and the last thing to touch the geometry. A trace can carry more detail than the machine cutting it can resolve — a cluster of vertices a few hundredths of a millimetre apart is a stack of moves the controller has to read, plan and blend, and none of it reaches the finished piece. This pass collapses each such cluster into one vertex. It is off by default and no preset turns it on: how much geometry is worth keeping is a fact about your machine rather than about the artwork.
  1. Preprocess
  2. Trace
  3. Corners
  4. Vertices

It runs last on purpose. Corners reads the short fillet runs the tracer lays across a sharp point; merging first would have thinned those away before Corners ever saw them.

Merge radius

The one number that decides how much goes. Vertices within this distance of the vertex that opened their cluster become a single vertex. Drag it and watch where the contour gives way first: the arcs the tracer sampled finely thin out, and the long sparse runs are left as they were, because nothing on them is close enough to anything else to group.

as traced — 108 vertices

merged — 74 vertices

one radius, to scale
4.0 px

108 vertices in, 74 out34 dropped, 31%

The same contour twice. On the right the vertices it arrived with are still drawn, in grey, so the ones the pass took are visible by their absence — and the outline they were carrying is visibly still there. At radius 0 the pass returns the path untouched and the two drawings are identical.

The radius is marked in source-image pixels, the same unit the Corners figures use and for the same reason: it has to mean one fixed distance whatever preprocess Scale is set to. It is not millimetres. The trace bench has no physical size of its own — the DXF comes out in the tracer's own pixels — so a figure in millimetres would be one the app could not stand behind.

Keep: middle or farthest

A cluster leaves one vertex behind, and this is where it lands. Middle puts it at the average of the vertices it replaces, which keeps a cluster straddling an edge centred on that edge. Farthest keeps whichever of them sat furthest from the last vertex the pass kept, which holds the reach of a spike or a corner instead of averaging it away.

Below is the same star at the same radius under both. Each point of it is a tip with a shoulder either side, close enough together to be one cluster. Middle rounds the tips off, because the survivor is the average of three vertices and two of them sit behind the point. Farthest lands the survivor on the tip itself: measured from the vertex kept back in the valley, the tip is the furthest of the three.

middle

farthest

8.0 px

20 vertices in; 10 out on middle, 10 out on farthest

Both modes drop the same vertices — the grouping is the radius's business and the mode has no say in it. They differ only in where the survivor is put, which is the difference between a point that still reaches and one that has been rounded off.

How a cluster is decided

A cluster is a run of consecutive vertices that all sit within the radius of the one that opened it. Anchoring on that first vertex is what stops the rule chaining. Measured instead against each vertex's predecessor, a finely sampled edge would merge neighbour into neighbour the whole way along and come out as a single point, however long the edge is. Bounded the way it is, no vertex moves further than the extent of its own cluster.

anchored — what the pass does7chained — what it avoids1one radius
The same evenly spaced run under both rules, at the radius drawn beneath it. Above, anchored on the vertex that opened each run, which is what the pass does: the run thins and keeps its length. Below, chained to each vertex's predecessor, which the pass does not do: every vertex is within the radius of the one before it, so the whole edge collapses to a single point and the shape it belonged to goes with it.

What it will not do

It will not delete a contour.

A radius wide enough to swallow a whole shape leaves it alone: where merging would take a contour below three vertices there is no shape left to cut, so the pass hands back exactly what arrived. Removing small shapes is what Speckle size is for.

It will not straighten your curves.

Where a merged run is spanned by a curve, that curve is kept and each handle travels with the end it belongs to. The result holds the tangents the tracer drew and stays within the distance those ends moved, a distance the radius has already called too small to cut.

It will not move a vertex further than its own cluster.

That is the whole of what the anchor rule buys, and it is why the radius can be read as a bound on the error: nothing lands further from where it started than the extent of the group it was in.

It will not change with preprocess Scale.

The radius is in source-image pixels. Scale changes how finely the tracer samples, not what a pixel of the original means, so the same radius removes the same real detail at any Scale.

Reading it on the bench

The node count in the workbench header is the figure to watch: it is what the preview plots and what the DXF holds, which makes it the same number these figures count. Turn Merge vertices on, raise the radius until the count sits where your controller wants it, then check the result in Overlay view — that is where a radius set too high stops being a number and becomes a visibly rounded outline.

Open the trace workbench