gcode_reader¶
A Python library for reading, analyzing, and processing G-code files.
- Quick Start:
>>> import gcode_reader as gr
# Fast parsing (10-50ms, recommended for most use cases) >>> df = gr.gcode_file_to_dataframe(‘file.gcode’, fast=True) >>> print(df[[‘x’, ‘y’, ‘z’, ‘time’]].head())
# Full machine emulation (slower but includes kinematics) >>> df = gr.gcode_file_to_dataframe(‘file.gcode’, machine=’cead’, fast=False)
# Or access the Operation object intermediate representation >>> operation = gr.gcode_to_operation(‘file.gcode’, machine=’cead’)
# List all supported machines >>> gr.list_supported_machines()