How the laser file check works
What's measured, the tolerances used, and what isn't checked. No part of the check uses AI; the same file always gives the same result.
Where your file goes
Nowhere. The file is read by code running in your browser, in a background thread on your device. It isn't uploaded, stored or logged. The preview is drawn from the measured geometry, never by displaying your SVG itself, and scripts inside SVG files are never run.
Input and output
- Input: one SVG or ASCII DXF file up to 30 MB. The format is detected from the contents. Binary DXF and DWG aren't supported.
- Optional: bed size, material size, smallest feature you can cut, and the units to assume when the file doesn't say.
- Output: an on-screen report, a preview with problem shapes highlighted, and, when exact duplicates exist, a copy of the file with them removed.
How geometry is measured
Every shape is converted to real-world millimeters. For SVG that includes the document's width, height and viewBox, nested groups and transforms, use references and nested SVG elements. For DXF it includes the drawing units, block inserts (position, scale, rotation and arrays, up to 8 levels deep), polyline bulges, arcs, ellipses and splines. Curves are converted to line segments within 0.05 mm of the true curve.
The checks and their tolerances
Units and size
SVG sizes in mm, cm, in, pt or pc are exact. Unitless or pixel sizes are ambiguous: the check assumes 96 pixels per inch and also shows the size at 72 per inch. Files marked as made by Illustrator or Inkscape 0.91 are named with their 72 or 90 pixels per inch. DXF units come from the drawing's unit setting; when it's missing, millimeters are assumed and inch sizes are shown too. Drawings larger than 10 m, smaller than 1 mm, or more than 1 km from the origin are flagged as likely unit mistakes.
Open and nearly closed shapes
Segment ends within 0.01 mm of each other are joined, including separate lines and arcs in a DXF, and a line that ends on another line counts as connected, so parts sharing a cut edge aren't reported. An end that meets nothing is loose. If every loose end is within 0.1 mm of another end or line, the shape is reported as nearly closed; otherwise it is open. A lone straight line that touches nothing (a hinge slit, score or fold line) is listed as a note.
Duplicates and overlaps
Two shapes are duplicates when their geometry matches within 0.001 mm, regardless of drawing direction or starting point. Straight segments that lie along each other for more than 0.01 mm (within 0.005 mm) are reported as overlapping lines, which would also be cut twice.
Tiny, zero-size and complex shapes
Shapes whose bounding box is smaller than your minimum feature size (0.5 mm if you don't enter one) are reported. Shapes with no length or no area are zero-size; zero-length segments where other lines meet, left by some DXF exporters, aren't counted. A single shape with more than 5,000 nodes, or a file with more than 250,000, is flagged as excessively complex.
Self-intersections
Closed shapes with up to 20,000 segments are checked for edges that cross each other. Crossings that only form a loop smaller than 0.5 mm, such as burn-compensation loops at inner corners, are ignored. Because curves are approximated, the report says a shape “may” cross itself.
Text, images and hidden objects
SVG text elements and DXF TEXT, MTEXT and attribute entities are reported with a short snippet. Embedded and linked images are reported. Hidden geometry in SVG means display none, hidden visibility, zero opacity, or no stroke and no fill; in DXF it means frozen or turned-off layers and invisible entities.
SVG features that may not import
Filters, clipping paths, masks, markers, foreignObject elements, gradients and patterns are reported. They aren't applied to the measured geometry. Styles are read from attributes, inline styles and simple CSS rules (element, class and id selectors); other CSS is skipped and counted.
DXF entities that may not import
Hatches, solid fills, dimensions and leaders, infinite lines, wipeouts, images, and 3D/ACIS objects (regions, solids, meshes, surfaces) are reported. Non-zero Z values and entities on a tilted plane are flagged for 2D work.
Bed and material
When you enter sizes, the drawing's bounding box is compared with them, including whether it would fit if rotated 90°.
The one automatic fix
Only exact duplicates are removed, because that's the only change that can't alter what gets cut. In SVG, an element is removed only when its geometry and every style that affects it match an earlier element, and nothing else refers to it; its exact text is deleted from the file. In DXF, only top-level entities whose type, layer, color, line settings and geometry match an earlier entity are removed, by deleting exactly their lines. Everything else stays byte for byte, including the text encoding and line endings.
What isn't checked
- Kerf, material thickness, power and speed, and which lines should cut, score or engrave.
- Thin slots and narrow bridges between shapes (only overall shape size is measured).
- How your specific laser software interprets colors, layers or stroke widths.
- The effect of clipping, masks and filters on the final shape.
- Glyph outlines of unconverted text.
Tested with
The checks are tested against hand-made fixtures (including malformed XML, an entity-expansion attack, blocks, splines, mirrored extrusions, hidden layers and binary DXF) and 61 real exports: 21 made for this project with boxes.py, Inkscape 1.4 (SVG, DXF R12 and R14), FreeCAD 1.1 and ezdxf, and 40 public files from Illustrator, Inkscape, Affinity, CorelDRAW, Sketch, Vectornator, xTool, Glowforge, MakerCase, OpenSCAD, QCAD, LibreCAD, FreeCAD, Fusion 360, SolidWorks, Onshape, AutoCAD, Rhino, SketchUp, KiCad and EAGLE. Sizes were cross-checked with ezdxf and Inkscape. How specific laser software (such as LightBurn) imports these files wasn't tested.