Free calculator
DXF to G-Code Converter β Turn a 2D Drawing into a CNC Program in the Browser
Open a 2D DXF drawing and get a program for milling, engraving, plasma or laser. Contours are joined automatically, arcs stay real arcs and inside shapes are cut before the outer one. A sample plate is loaded so you can try it at once.
How it works
Polyline bulge to arc: bulge = tan(angle / 4), centre offset from the middle of the chord = chord Γ (1/bulge β bulge) / 4. Line ends closer than 0.02 mm are treated as connected.
Preparing the drawing
- Save as ASCII DXF, version R12 or 2000.
- Explode blocks and text, convert splines and ellipses to polylines or arcs.
- Delete dimensions, frames and construction lines. Everything that is left will be cut.
- Check the size shown under the preview. If it is 25.4 times too small, choose Drawing in inch.
On the line or with G41?
"On the line" moves the tool centre along the drawing. That is right for engraving, drag knives and for lasers with small kerf. "Beside the line" adds G41 with a lead-in, so the control shifts the path by the radius in offset D01. Inner shapes are cut on the inside and the outer shape on the outside. GRBL does not support G41, so use an offset in the drawing there.
Embed this calculator on your site
Free for workshops, schools and forums β copy this snippet:
<iframe src="https://cnccode.com/embed/dxf-to-gcode/" width="100%" height="720" style="border:0" loading="lazy" title="DXF to G-Code Converter"></iframe>More free CNC tools
- Bolt Circle Calculator
- Thread Milling Calculator
- G-Code Checker
- G-Code Generator
- Text Engraving G-Code
- Feeds & Speeds Calculator
- Drilling Speed & Feed Calculator
- Surface Finish Calculator
- Thread & Tap Drill Calculator
- Chip Thinning Calculator
- Machining Cost & Cycle Time Calculator
- Inch / mm / Fraction Converter
- G-Code Viewer & Simulator
- Lathe Turning Calculator
- All tools