← Back to help center

What exactly does the SVG cleaner strip out?

asked by arcadist · 2026-05-24
Six things, all leftovers from Inkscape / DXF imports that no part of a valid foam-cutter shape ever needs:

1. **`<symbol id="*…">`** — DXF Model_Space / Paper_Space placeholders. The `*` makes the file invalid XML to strict parsers.
2. **`<inkscape:path-effect …>`** — Live Path Effects (fillet_chamfer, etc.). The visible path is fine on its own; the LPE definition is only useful if you're going to re-edit the path inside Inkscape.
3. **`<pattern id="Hatch…">`** — DXF hatch fills, never referenced by anything we cut.
4. **`<marker id="DistanceX…">`** — DXF dimension-line arrowheads.
5. **Unused defs** — anything in `<defs>` that nothing in the document references via `url(#…)`, `href="#…"` or `xlink:href="#…"`. Catch-all for the long tail.
6. **`xml:space="preserve"`** on the root `<svg>` — harmless but Inkscape adds it everywhere and our serialiser doesn't need it.

What it does NOT touch: paths, polygons, rects, circles, transforms, `<sodipodi:namedview>` (Inkscape view state), or any def that's actually referenced.

Test it on your own file at https://cncfoam.com/svg_cleaner.php — the result page lists exactly what it stripped, by count and type.

Your reply

Create an account or sign in to reply.