simplify_paths_rdp

compas_slicer.post_processing.simplify_paths_rdp(slicer, threshold)[source]

Simplifies a path using the Ramer–Douglas–Peucker algorithm, implemented in the rdp python library. https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm

Parameters
  • slicer (compas_slicer.slicers.BaseSlicer) – An instance of one of the compas_slicer.slicers classes.

  • threshold (float) – Controls the degree of polyline simplification. Low threshold removes few points, high threshold removes many points.