Options.simplifyEdgeChains

If true, then simplify the output geometry by replacing nearly straight chains of short edges with a single long edge.

The combined effect of snapping and simplifying will not change the input by more than the guaranteed tolerances (see the list documented with the SnapFunction class). For example, simplified edges are guaranteed to pass within snap_radius() of the *original* positions of all vertices that were removed from that edge. This is a much tighter guarantee than can be achieved by snapping and simplifying separately.

However, note that this option does not guarantee idempotency. In other words, simplifying geometry that has already been simplified once may simplify it further. (This is unavoidable, since tolerances are measured with respect to the original geometry, which is no longer available when the geometry is simplified a second time.)

When the output consists of multiple layers, simplification is guaranteed to be consistent: for example, edge chains are simplified in the same way across layers, and simplification preserves topological relationships between layers (e.g., no crossing edges will be created). Note that edge chains in different layers do not need to be identical (or even have the same number of vertices, etc) in order to be simplified together. All that is required is that they are close enough together so that the same simplified edge can meet all of their individual snapping guarantees.

Note that edge chains are approximated as parametric curves rather than point sets. This means that if an edge chain backtracks on itself (for example, ABCDEFEDCDEFGH) then such backtracking will be preserved to within snap_radius() (for example, if the preceding point were all in a straight line then the edge chain would be simplified to ACFCFH, noting that C and F have degree > 2 and therefore can't be simplified away).

Simplified edges are assigned all labels associated with the edges of the simplified chain.

For this option to have any effect, a SnapFunction with a non-zero snap_radius() must be specified. Also note that vertices specified using ForceVertex are never simplified away.

DEFAULT: false

class Options
const
bool
simplifyEdgeChains
()

Meta