pyrobopath.toolpath.toolpath_core.split_by_layers#

pyrobopath.toolpath.toolpath_core.split_by_layers(toolpath: Toolpath) List[Toolpath][source]#

Split a Toolpath into separate layers based on the Z-height of its contours.

Parameters:

toolpath (Toolpath) – The input Toolpath containing a flat list of contours.

Returns:

A list of Toolpath instances, where each toolpath contains contours that share the same base Z-height.

Return type:

list of Toolpath

Notes

  • The lowest Z value in each contour is used to determine its layer.

  • Layer ordering is from lowest to highest Z.