Skip to main content

Module toolpath

Module toolpath 

Source
Expand description

The planned geometry of a print, read from its G-code by the one read the GcodeIndex makes: each object’s footprint outline, and one layer’s toolpath read back from the print’s spool.

The index’s single streamed read of a print’s file also copies its bytes to a per-print spool file and records each layer’s byte range, so a toolpath is read from that range of the spool and never from a second read of the printer’s file. The core alone reads G-code; what leaves it is segments in bed millimetres, each with the ExtrusionKind its ;TYPE: maps to.

Structs§

LayerRef
One layer of an index, as the index that answered it numbers it.
LayerToolpath
Every extrusion move of one layer, in file order.
ObjectOutline
One object’s footprint: an outward bound of the convex hull of every extrusion move laying it, in bed millimetres, counter-clockwise, with at most OUTLINE_DIRECTIONS vertices.
ToolpathSegment
One extrusion move, or one chord of an arc, of a layer.

Enums§

ExtrusionKind
What a toolpath segment lays, from PrusaSlicer’s ;TYPE: label.
SpoolError
Why a layer’s toolpath could not be read back.

Constants§

OUTLINE_DIRECTIONS
How many directions an outline is bounded in: its most vertices.

Functions§

spool_path
The spool file of one print under a spool directory.