Milling know-how

Convert a STEP file to G-code: step by step

In short: a STEP file is not simply "converted" like an image format — between the 3D model and the machine sits the toolpath computation (CAM). step2gcode automates that step: upload the STEP file, pick tool and material, and pockets, holes and contours are detected straight from the model, including their depths. A few minutes later the finished G-code for GRBL, Mach3 or LinuxCNC is ready.

Forums often say STEP to G-code is "not a simple conversion" — and that is true for the classic CAM route with operations, tool libraries and post-processor setup. For 2.5D parts like plates, brackets and front panels, however, exactly that effort can be automated. Here is how.

Convert your STEP file now: to the CNC milling tool →

STEP to G-code in five steps

  1. Export STEP: in Fusion 360, FreeCAD, Onshape or SolidWorks, save the part as STEP/STP — for assemblies, export only the one part to be milled.
  2. Upload the file to step2gcode: pockets, holes, inner and outer contours are detected automatically from the geometry, including their depths.
  3. Pick tool and material: enter the cutter diameter and apply a material preset (wood to aluminum) — feed, speed and step-down are then sensibly pre-filled.
  4. Check origin and operations: XY corner or center, Z on the workpiece surface or spoilboard; holding tabs for the outer contour are preset per material.
  5. Check the preview and download the G-code: the 3D preview shows the complete toolpath, then pick the post-processor (GRBL, Mach3, LinuxCNC) and download the file.

Why STEP is the best format for milled parts

STEP carries real 3D solids: every pocket and every hole brings its depth along. That removes the manual depth entry required for DXF and SVG, and slips like a wrongly set pocket depth cannot happen in the first place.

Add dimensional accuracy: STEP is an exact CAD exchange format without faceting. Unlike STL meshes there is no deviation from triangle approximation — the contour in the G-code matches the contour in CAD.

Common pitfalls and their fixes

Assembly instead of a single part: export only the part that goes on the machine. Multiple bodies in one file work when they are to be machined together — for a single part, exporting it alone is cleaner.

True 3D freeform surfaces: step2gcode is built around 2.5D (flat pockets, holes, contours, chamfers). Curved reliefs and organic surfaces are detected and offered the 3D path (beta: roughing with an end mill, finishing with a ball end mill, every program checked against the part) instead of producing wrong 2.5D code.

Units: STEP stores the unit and the import converts to millimetres. When in doubt, check the model size in the preview before the G-code goes to the machine.

And without a STEP file?

If only a 2D drawing is available, the same workflow works with DXF or SVG — then the milling depth is specified during generation. Which format is the best choice when is covered by the "STEP, DXF or SVG" article here in the knowledge base.