DXF File Problems in Nesting Software: How to Fix Open Contours, Scaling, and Duplicate Lines
A practical troubleshooting guide for the most common DXF import failures in nesting software: open contours, wrong units, duplicate geometry, block references, and spline errors.
The same five problems cause 90% of DXF failures in nesting software. I know because I track every support ticket Lapas receives, and the pattern is consistent: parts show up at the wrong size, the nesting algorithm skips a part entirely, or the export opens blank in LightBurn.
This guide goes through each failure mode, explains why it happens, and gives the specific fix for the most common CAD tools.
Why DXF is harder than it looks
DXF (Drawing Exchange Format) is a 40-year-old format that has accumulated decades of interpretations, optional fields, and export behaviors that vary by CAD tool, version, and user settings. A DXF file from AutoCAD 2024 and a DXF file from FreeCAD 0.21 can both be technically valid and still behave completely differently in nesting software.
The core issues fall into five categories.
Problem 1: Open contours
Symptom: The nesting software skips a part, shows it as an error, or places it incorrectly. The part outline looks correct visually but the algorithm can’t recognize it.
Why it happens: Nesting software needs a closed loop to identify a part boundary. When a DXF contains individual line segments that are nearly touching but not connected, the parser sees a collection of lines rather than a part. This is extremely common when exporting from tools that don’t enforce polyline closure, or when a part outline was drawn by hand using the line tool instead of a single polyline command.
How to check: Open the DXF in your CAD tool and zoom into the corners of the part outline. If you see gaps, even 0.001 mm ones, those break the contour.
Fix by tool:
AutoCAD: Select all geometry forming the outline, type PEDIT, choose Multiple, select the lines, then Join. Set the fuzz distance to 0.01 mm to close micro-gaps. Then Close the polyline.
FreeCAD: Select the part outline wires, go to Part > Boolean > Connect Wire, or use Draft > Upgrade to convert lines to a wire. Use Part > Check Geometry to verify it’s a valid closed shape.
Fusion 360: In the sketch, use Sketch > Fix/Unfix and inspect for open sketch profile indicators (orange markers). Use Sketch > Close Sketch Profile to close gaps. Export only after the sketch profile is fully closed (shown with a filled region).
SolidWorks: Use the DXF/DWG Wizard and choose “Export as” with flat pattern layer only. If the flat pattern isn’t fully closed, check for sketch over-constraints or gaps in the sheet metal fold definition.
Inkscape (SVG-first workflow): If working from SVG, use Path > Break Apart followed by Path > Combine to merge overlapping segments, then check that the resulting path has a closed subpath.
Problem 2: Units mismatch — the 25.4x scale error
Symptom: A part that should be 150 mm shows up as 5.9 units, or a part designed in millimetres appears at 3,810 mm wide. The 25.4x ratio is the giveaway: inches vs. millimetres.
Why it happens: DXF files store a $INSUNITS variable in the header that tells the reading application what unit was used. Many CAD tools set this to 0 (undefined) or write it inconsistently. When a nesting tool reads the file and assumes millimetres, parts designed in inches come in 25.4x too small. The reverse also happens.
How to check: Open the DXF file in a text editor (it’s plain text). Search for $INSUNITS. The value immediately after $INSUNITS in the HEADER section tells you:
1= inches4= millimetres0= undefined (dangerous)
Fix by tool:
AutoCAD: Before exporting, run UNITS and set Drawing Units to Millimetres. Then export DXF. AutoCAD will write $INSUNITS 4 in the header.
Fusion 360: In Sketch > Export DXF, there is no explicit units field. Fusion exports in the active document unit. Check Design > Preferences > Units and set to Millimetres before exporting.
SolidWorks: File > Save As > DXF, Options > Document Units. Set to mm.
FreeCAD: Export with Part > Export and choose DXF format. FreeCAD typically exports in the document’s active unit; check Edit > Preferences > General > Units.
In Lapas: If the imported part dimensions don’t match expectation, use the scale override field on the upload step. Set it to 25.4 if the part is too small (was in inches), or 0.03937 if too large.
Problem 3: Duplicate and overlapping geometry
Symptom: The part appears correctly, but the nesting result has unexpected gaps between parts, or the exported DXF has doubled cut paths that cause the machine to run each edge twice.
Why it happens: Duplicate geometry occurs when the same line exists twice in the same position. Common causes: copy-paste operations in the CAD tool that accidentally duplicate the base sketch; exporting from a multi-body model where shared faces generate duplicate edges; or running a DXF cleanup that duplicated rather than merged.
Nesting algorithms that detect part outlines by tracing closed loops can produce false boundaries when duplicate lines are present, treating the “inner” duplicate as a separate part or boundary.
Fix by tool:
AutoCAD: Select all geometry and run OVERKILL. This removes duplicate and overlapping entities. Set tolerance to 0.001 mm.
FreeCAD: Draft > Utilities > Delete Duplicates. Or export to SVG, clean in Inkscape (Path > Clean Up Document), then re-export.
General: Open the DXF in a viewer that shows entity count. If a simple part has 300+ entities when it should have 20, duplicates are present.
Problem 4: Block references instead of direct geometry
Symptom: Nesting software imports the file but shows nothing, or shows a single point/marker rather than the part outline.
Why it happens: AutoCAD and some other tools use “blocks” — named symbols that are inserted by reference rather than drawn directly. A DXF that contains INSERT entities (block references) instead of direct LWPOLYLINE or LINE entities may parse as empty because the nesting tool follows the reference but can’t resolve the block definition, or ignores INSERT entities entirely.
How to check: Open the DXF in a text editor and search for INSERT. If you find it in the ENTITIES section, your file uses block references.
Fix: In AutoCAD, select all geometry and run EXPLODE to replace block references with their constituent geometry. Then re-export as DXF. Verify there are no remaining INSERT entities in the output.
Problem 5: Splines that don’t import correctly
Symptom: Curved parts come in with straight facets, or complex spline curves produce errors or incorrect outlines.
Why it happens: DXF stores splines as SPLINE entities using control points and knot vectors. Not all nesting tools implement full NURBS spline parsing. Some tools approximate splines as polylines with too few segments, producing flat facets on curved parts. If a part has a 50 mm radius curve approximated with 4 line segments, the nesting will fit parts based on that approximated shape, not the true curve.
Fix by tool:
Fusion 360: Before exporting, convert splines to polylines in the sketch: right-click the spline > Convert to Polyline. Set a small tolerance (0.1 mm or less for production parts) to get a smooth approximation.
AutoCAD: Use FLATTEN to convert 3D splines to 2D, then PEDIT > Spline to convert to a polyline. Or use SPLINEDIT > Convert to Polyline on each spline entity.
SolidWorks: In the DXF export options, enable “Map to Polylines” and set a chord tolerance of 0.05–0.1 mm.
When Lapas detects a SPLINE entity, it approximates it internally to a polyline. For tight tolerance parts, pre-converting splines in your CAD tool gives you control over the approximation quality.
Checklist before uploading any DXF
- Closed polylines only — no open contours, verified in CAD
- Units set explicitly to millimetres in export settings
- OVERKILL or equivalent cleanup run to remove duplicates
- Blocks exploded if your workflow uses INSERT entities
- Splines converted to polylines for complex curves
- Annotation layers (dimensions, text, title blocks) deleted or excluded from export
- File opened in a DXF viewer to verify correct dimensions before uploading
Running this check before uploading saves more time than fixing a bad nest after the fact.
FAQ
Why does the same DXF work fine in AutoCAD but fail in nesting software?
AutoCAD is forgiving — it can interpret approximate geometry, unclosed contours, and ambiguous units because it’s designed for drafting, not for algorithmic processing. Nesting software needs geometrically exact, closed boundaries to detect and pack parts. The DXF spec allows many things that nesting algorithms can’t reliably handle.
My DXF works in LightBurn but not in Lapas (or vice versa). Why?
LightBurn and nesting software parse DXF differently. LightBurn is tolerant of open paths because it drives a laser that follows paths; it doesn’t need closed part boundaries. Nesting software needs closed shapes to calculate area, detect holes, and pack parts. A file that opens fine in LightBurn can still have open contours that break nesting.
How do I know if the part outline Lapas detected is correct?
After upload, Lapas shows a thumbnail preview of each detected part. Compare the preview to what you see in your CAD tool. If the outline looks wrong, check the five problems above. The most reliable indicator of an open contour is a part preview that shows extra geometry or a significantly different bounding box than expected.
What’s the fastest way to clean a DXF for nesting?
Export from your CAD tool with these settings: millimetres, single-layer export (part outline only), polylines not lines, close sketch profile enabled. If you work from existing DXF files provided by clients, run AutoCAD’s OVERKILL on every file before uploading — it takes 5 seconds and catches 60% of problems.