Fabrication
DXF and CNC files for countertops: formats, common errors and clean handoffs
How countertop geometry travels from templater to CNC: DXF files, layers, units, post processors and G-code, the errors that ruin cuts, and how to check a file first.
, CEO, Stonify
A DXF file carries the shape of each countertop piece (outline, cutouts, holes and notes) from the digital templater or drafting software to the shop's CAM software. The CAM software turns that shape into toolpaths, and a post processor writes them as machine code, usually a G-code dialect, that one specific CNC can run. Most bad cuts that start in the file come from a short list of problems: wrong units, outlines that are not fully closed, geometry on the wrong layer, duplicate lines, and cutout templates that do not match the sink actually bought. A two-minute check of every file before programming catches nearly all of them.
How a countertop file travels through the shop
Think of the file chain as four translations. Each one is a place where information can be lost or changed.
Capture. A digital templater (a laser or probe device such as a Prodim Proliner or an LT-2D3D, or photo-based systems) records points in the kitchen. Its software turns them into outlines and saves a DXF. See digital templating.
Drafting and layout. Someone in the office opens the DXF in CAD or shop software, cleans it, adds seams, edge profiles and cutouts, and places the pieces on slabs. The result is a processed DXF, often one per slab. See slab layout and nesting.
CAM programming. CAM (computer-aided manufacturing) software reads the processed DXF and generates toolpaths: the exact routes the blade, router bit or waterjet will follow, with tool choice, cutting depth, feed speed and lead-in points.
Post processing. A post processor is a translator inside the CAM software that writes those toolpaths in the exact dialect one machine's controller understands. The output is the program file the CNC runs.
The key idea: a DXF describes shape, not machining. It says "there is a 30-inch by 16-inch rounded rectangle here." It does not say which bit to use, how fast to feed it, or which side of the line to cut on. That knowledge lives in the CAM setup. A file that opens cleanly is one check, not permission to cut.
What is inside a countertop DXF
DXF (Drawing Exchange Format) was published by Autodesk in 1982 as an open way to move drawings between programs. Nearly every templater, CAD program and stone CAM package reads and writes it, which is why it is the default handoff format in the trade.
A DXF is a list of entities (drawing objects) and their coordinates:
Lines and arcs: single segments.
Polylines: chains of connected lines and arcs. A countertop outline should be one closed polyline, where the last point meets the first exactly.
Circles: faucet and accessory holes.
Splines: smooth freeform curves. Many CNC programs handle them poorly, so they are usually converted to arcs or short segments.
Text and dimensions: labels, piece names, notes.
Every entity sits on a layer, a named group such as "OUTLINE" or "SINK". Layers tell the next program what each line is for: cut it, drill it, polish it, or ignore it.
A typical kitchen DXF is small, often 50 to 500 KB. Size is rarely the problem. Content is.
Units: the number without a label
A DXF stores coordinates as plain numbers. The file header can carry a unit setting, but many programs ignore it or leave it blank. So a line 762 units long is 762 mm (30 inches) to one program and 762 inches (63.5 feet) to another. Going the other way, a 30-inch depth read as 30 mm becomes about 1.2 inches.
The conversion factor is 25.4 mm per inch. If every piece is off by that factor, the problem is units, not the template. The fix is simple and has to be a habit: after every import, measure one dimension you know, such as a 36-inch sink base opening or a wall length written on the templater's field sheet, before doing anything else.
DXF and the other file types you will meet
Format | What it holds | Use in countertop work |
|---|---|---|
DXF | 2D (and some 3D) geometry, open format | Standard handoff between templater, CAD, nesting and CAM |
DWG | AutoCAD's native, proprietary drawing format | Architects' drawings. Convert to DXF for most stone software. |
A picture of the drawing | Customer approvals and shop printouts. Not machine-readable, so it cannot drive a CNC. | |
STEP, IGES | 3D solid and surface models | Occasional 5-axis and sculptural work. STEP has largely replaced IGES. |
SVG | Web vector graphics | Rare in stone shops |
Templater native files | The device's own project format with extra data | Kept as the master record. Exported to DXF for everyone else. |
G-code (ISO 6983) and vendor dialects | Machine instructions: moves, tool changes, spindle and water on or off | The program the CNC runs, written by the post processor |
G-code in one table
You do not need to write G-code by hand, but reading a few lines helps when a program stops mid-job. Codes vary a little by controller, and these are the common ones:
Code | Meaning |
|---|---|
G00 | Rapid move, not cutting |
G01 | Straight cutting move |
G02 / G03 | Clockwise / counterclockwise arc |
G40 / G41 / G42 | Tool radius compensation off / left / right of the line |
M03 / M05 | Spindle on / off |
M06 | Tool change |
M08 / M09 | Coolant (water) on / off |
M30 | End of program |
Tool compensation (G41/G42) is why the CAM needs to know which side of a line is the part. A cut on the wrong side of the line makes a piece too small by the width of the tool.
Which DXF version to export
DXF has changed over the years, and newer versions add entity types that older CNC software cannot read. For countertop work:
R12 is the most widely readable version. It is the safest choice when you don't know what the receiving software supports.
R2000 or 2004 are also widely supported and handle polylines and arcs well.
Newer versions can work, but they may carry splines or other entity types your CAM or controller does not accept.
Test before you standardize. Export one real job in the version you plan to use, import it into your CAM, and cut a test piece or dry-run the toolpath. Then write the setting down so everyone exports the same way.
Layers: agree on names once
Every templater and CAM program has its own default layer names. One device might call the outline "PERIMETER", another "Counter", and the CAM might expect "PROFILE". When names do not match, the CAM might cut the perimeter and skip the sink because it never recognized the sink layer, or it might try to cut a note because the text sat on a cut layer.
Fix it with a written shop standard and a mapping from each source you use. For example:
Shop standard layer | Holds | What the CAM does with it |
|---|---|---|
CUT_OUTLINE | Closed piece outlines only | Cut |
CUT_SINK, CUT_COOKTOP | Cutout outlines | Cut, with the cutout's own tools and radii |
DRILL | Faucet and accessory hole centers or circles | Core drill |
EDGE_ | Edge segments that get a profile | Profile and polish |
SEAM | Seam lines | Split pieces, or reference only |
REFERENCE | Walls, cabinets, appliances, dimensions, text | Ignore |
Rules that prevent most layer trouble:
Only closed, cuttable geometry on cut layers.
All text and dimensions on a reference layer, never on a cut layer.
Wall and cabinet lines from the templater on a reference layer, so they do not get cut or counted in square footage.
One owner for the standard. If layer presets are shared across the office, a change by one person changes everyone's drawings.
The common DXF errors and how to catch them
Error | What happens at the machine or in the quote | How to catch it | Fix |
|---|---|---|---|
Wrong units | Pieces 25.4 times too big or too small | Measure one known dimension after import | Scale by 25.4, and fix the export setting at the source |
Open outline (a gap at a corner, sometimes 0.001 in) | Software cannot find a closed boundary. Piece will not nest, area is wrong, or the toolpath stops. | Closure or "breaks" check. An outline can look closed on screen and still be open. | Join or close polyline. Auto-close tools handle tiny gaps. Investigate anything bigger than a few hundredths of an inch. |
Duplicate or overlapping lines | Double cutting, wasted time, extra blade wear, wrong area | Select-all count looks high; overlap check | "Remove duplicates" (Overkill in AutoCAD-style programs) |
Zero-length entities | Some CAM and post processors stall or crash | Cleanup check | Delete them |
Missing layer (sink cutout absent) | Machine cuts the perimeter and skips the opening | Compare the file to the work order: every cutout present? | Add the cutout on the right layer |
Geometry on the wrong layer | Sink cut as outline, or outline ignored | Turn layers on one at a time | Move entities to the correct layer |
Text on a cut layer | CAM tries to engrave or cut the label | Look for text on cut layers | Move to reference layer |
Mirrored or rotated piece | Piece fits a mirror-image kitchen | Compare with site photos and the sketch: sink on the correct side? | Mirror back. Find the coordinate setting that caused it. |
Faceted curves | Arcs exported as a few straight segments show flats on a curved edge after polishing | Zoom in on curves | Keep true arcs. If segmented, reduce the chord error until flats cannot be seen or felt. |
Wrong origin (zero point) | Piece placed off the slab, or program moves out of range | Check origin against the slab or table reference | Set origin to the agreed point, often the lower-left corner |
Wrong cutout template | Opening fits a different sink model | Compare model number on file to the customer's spec sheet | Replace with the correct, verified template |
The last error is the most expensive one, and no file checker can catch it. A perfectly formatted DXF of the wrong sink is still wrong. Automated checks find broken geometry. Only a person comparing the file to the job finds a wrong model or a wrong measurement. See template errors and verification.
A pre-CNC file check
Run this on every file before programming. With practice it takes a couple of minutes.
Open the file and measure one known dimension. Confirm units.
Count pieces against the work order.
Run a closure check on every outline.
Remove duplicates and zero-length entities.
Turn layers on one at a time. Each cut layer holds only what it should. Text is on the reference layer.
Check each cutout: model number, size, corner radius and centerline position against the manufacturer's current spec sheet.
Check orientation: sink, cooktop and overhangs on the correct sides, matching site photos.
Zoom in on curves for faceting.
Check the origin and slab placement.
Save as a new version with a clear name, and leave the original template file untouched.
What DXF middleware is and when you need it
DXF middleware is software that sits between the templater and the CAM and does the translation work automatically: unit conversion, layer renaming, closing small gaps, removing duplicates, converting splines, and flagging files that fail checks. Some tools also pull edge profiles, seam locations or material thickness from the job record into the file.
Shops meet it in three forms:
Type | Strength | Weakness |
|---|---|---|
Standalone translator or cleanup tool | Works with many devices and CNC brands | One more program and license, and nothing is linked to the job record |
Built into shop or layout software | File is tied to the quote, job and slab layout | You depend on that vendor's device and machine support |
CAM or machine maker's import routines | Tuned for that machine | Usually one brand only, and cleanup is basic |
Manual cleanup of a messy file typically takes 15 to 30 minutes, so middleware pays off in shops that process several files a day, or that run more than one templater brand or more than one CNC brand. A single-machine shop with one templater and a well-set export may never need it.
Set expectations right: middleware makes files consistent, not correct. Kerf, tool approach, lead-ins and the actual cutting parameters still belong to the programmer, and the first job through any new pipeline should be checked piece by piece.
Cutout template libraries
Drawing a sink cutout from scratch on every job invites mistakes. Most shops keep a template library: saved cutout shapes for the sinks, cooktops and accessories they install often. Commercial libraries also exist, organized by manufacturer and model, covering undermount and farmhouse sinks, cooktops and rangetops, faucet hole patterns, air switches, pop-up outlets, grommets and wireless charger recesses.
A library saves time only if the templates are right. Rules for using one:
Match the exact model and revision. Manufacturers change bowl sizes and corner radii between product years. The model on the template must match the box on site.
Check against the manufacturer's current spec sheet or install template, and for undermount sinks, against the physical sink when you can. The cutout also depends on the reveal the customer chose (positive, negative or zero), which a catalog drawing cannot know. See cutouts and sinks.
Check cooktops against the install manual, which gives the cutout and clearance for that model.
Treat library "CNC presets" as starting points. Some libraries sell thousands of presets that are combinations of machine, material and edge profile with the same feed and speed numbers repeated across them. Your tooling maker's data and your own test cuts are the real source.
Watch for blank records. Some library entries have a product name and no real dimensions. Never cut from a template without dimensions you can verify.
Building your own templates
The templates that save the most time are usually your own: the shop's standard drainboard groove pattern, rod channels for sink reinforcement, a routed channel for LED strips, a notch for supply lines, cabinet-attachment slots, spline slots for mitered waterfalls. Draw each one once, check it with a test cut on scrap, name it clearly, and store it as a reusable block. Record which tool and material it was proven on.
Naming, versions and storage
A good file system answers "which file did we cut from?" a year later.
Name files consistently, for example
1247-Smith-Kitchen-Island-v2.dxf: job number, customer, area, piece, version.Never overwrite. Save each change as a new version. Keep the raw template, the processed layout and the CNC-ready file separately.
One folder structure, with no exceptions for rush jobs.
Compare versions before re-cutting a revised job. Overlaying the old and new file shows exactly what moved.
Keep files at least as long as your warranty, and longer if you can. A repair or matching piece years later is much easier with the original geometry.
Where software helps
The fewer times geometry is re-typed, the fewer chances for a units slip or a missing cutout. When choosing shop or layout software, check:
Does it read your templater's DXF directly, and does it show the units and detected layers on import so someone confirms them?
Does it calculate square footage and edge footage from the imported geometry, or just attach the file?
Can it keep cutout positions (centerlines and distances from edges) and edge profiles on the shop drawing the fabricator works from?
Does it keep file versions per job, so the programmer always cuts the latest approved drawing?
Can your CAM read its export without manual cleanup? Test with a real job before you commit.
FAQ
Can a CNC read a PDF drawing? No. A PDF is a picture of lines, not machine-readable geometry. Someone has to redraw it or get the original DXF or DWG from whoever made it.
Why does my file look closed but the software says it is open? Tiny gaps, often thousandths of an inch, are invisible at normal zoom. Run the closure check, or zoom far into each corner. Rounding during export is a common cause.
Do I need AutoCAD to fix DXF files? No. Free and low-cost editors such as QCAD, LibreCAD or DWG TrueView (viewing and conversion) handle closing outlines, moving layers and deleting duplicates. Stone CAM packages have their own cleanup tools too.
Should I store the templater's native file or only the DXF? Keep both. The native file often holds extra data, such as wall heights, photos and point history, that the DXF drops.
Who owns the file check in a small shop? Give it to one person, usually whoever programs the CNC. When everyone is responsible for file quality, no one checks.
Related Articles
Digital countertop templating: how laser and probe systems work, how accurate they are and when they pay off
How digital countertop templating works, the main device types, real field accuracy, time per kitchen, cost and payback, and how to roll it out in a shop.
Countertop template errors: the common ones, how to verify a template before cutting and how to reduce remakes
The template errors that cause most countertop remakes, a step-by-step template verification checklist, what automated and AI checks can do, and how to cut remakes.
CNC machining for stone countertops: how routers work, tooling, calibration and burn marks
How CNC routers cut cutouts, profiles and curves in stone countertops, which tools they use, how to calibrate and maintain them, and why quartz burns.