CNC SAMPLE FILES
Sample files and G-code examples for CNC routers
This page collects sample SVG/DXF files and sample G-code so you can understand how a job is structured before generating real code in Gcodai. Use them for learning, and always double-check before cutting for real.
Sample SVG for testing
This sample is a 100 x 60 mm rectangle, used to test path reading and job size.
<svg xmlns="http://www.w3.org/2000/svg" width="100mm" height="60mm" viewBox="0 0 100 60">
<path d="M5 5 H95 V55 H5 Z" fill="none" stroke="black" />
</svg>
DXF concept example
A DXF should contain 2D lines with no hidden layers or duplicate lines. The example below is a shortened straight-line structure to explain the data.
0
SECTION
2
ENTITIES
0
LINE
8
CUT
10
0
20
0
11
100
21
0
0
ENDSEC
0
EOF
Basic G-code example
This example shows the typical structure of G-code for a CNC router. Adjust the depth, speeds and start point to match your actual machine.
%
G90 G21
G54
G0 Z10.000
G0 X0.000 Y0.000
M3 S18000
G1 Z-3.000 F1000
G1 X100.000 Y0.000 F3000
G1 X100.000 Y60.000
G1 X0.000 Y60.000
G1 X0.000 Y0.000
G0 Z10.000
M5
M30
%
What to check after you get sample G-code
Check that Z does not go deeper than the material thickness or what the bit can handle.
Check that safe Z clears clamps and workholding.
Check feed rate, plunge rate and spindle speed for the actual material.
Check that the X/Y extents stay within the machine work area.