Code Library
Complete, working sample code from the manufacturing–software seam: SolidWorks macros, FOCAS loggers, G-code generators, Rhino scripts, shop-data automation. Every sample is MIT-licensed, explained line by line, and free to copy or download — no sign-up, no tracking who you are.
Send a CNC program over RS-232 with Python (DNC / drip-feed)
Python + pyserial script that sends a G-code program to a CNC over RS-232 with XON/XOFF flow control — FANUC-style defaults, progress readout. MIT licensed.
Merge machine CSV logs into a formatted Excel report (openpyxl)
Python script that merges a folder of per-machine CSV logs into one formatted Excel workbook — bold headers, frozen panes, SUM totals. MIT licensed.
Bolt-circle G-code generator with peck drilling (Python)
Python script that generates FANUC-style G81/G83 bolt-circle drilling programs from CLI arguments — fixed header/footer, formatted coordinates, MIT licensed.
FANUC FOCAS: log feedrate & spindle speed to CSV (Python)
Complete Python FOCAS example: ctypes structs included, connects over Ethernet, logs actual feed and spindle RPM to CSV once a second. MIT licensed.
Find the tightest radius on any curve in Rhino (Python)
Free Rhino Python script: scans any curve, finds the minimum radius of curvature, and marks it with a point and text dot. Know your smallest tool before CAM.
Export a flat BOM (part counts) from a SolidWorks assembly to CSV
Free SolidWorks VBA macro: counts every component at every level of the active assembly and writes File, Configuration, Quantity to a CSV. MIT licensed.
Batch-export every SolidWorks drawing in a folder to PDF
Free SolidWorks VBA macro: exports every .SLDDRW in a folder to PDF, all sheets, with a pass/fail count. Copy or download, MIT licensed.
Need a sample that isn't here — or the production version of one that is?
These are starting points. Turning them into deployed shop tools is what I do.