Skip to content

Instantly share code, notes, and snippets.

View berkakinci's full-sized avatar

Berk Akinci berkakinci

View GitHub Profile
@berkakinci
berkakinci / gcode_to_csv.py
Last active September 3, 2025 02:10
Convert Some 3D Printer (or other) G Code to CSV format for data analysis. I used this to diagnose a failing 3D print due to pathological layers over-utilizing retractions.
#!/usr/bin/env python
import sys
import re
import csv
# Define column headers for common G-code fields
parameters = ["X", "Y", "Z", "E", "F", "S", "T"]
fields = ["Command", *parameters, "Other", "Comment"]