Free Browser-Based CAD/CAM for CNC & Laser Cutting — Design Swiftly

All Articles
Guides 8 min readMarch 28, 2026

SVG Import for CNC: Best Practices and Common Pitfalls

Not all SVGs are CNC-ready. Learn how to clean up transforms, resolve nested groups, handle text-to-path conversion, and prepare any vector file for reliable G-code generation.

M
· CNC Specialist & Lead Developer
SVGCNCVector Design

SVG is the universal format for CNC-ready vector art. But SVG files from graphic design apps often contain transforms, clipping masks, raster embeds, and encoded text that break G-code generation. Here's how to prepare any SVG file in Design Swiftly for a clean cut.

Importing an SVG into Design Swiftly

Drag and drop a .svg file onto the canvas, or use File → Import SVG (Ctrl+I). Design Swiftly's sanitization layer:

  • Normalises numeric IDs (which are invalid in some SVG parsers)
  • Converts <use> references to inline <path> elements
  • Preserves viewBox scaling relative to your canvas dimensions
  • Strips embedded raster images (they cannot be cut — use the Trace tool instead)

Problem 1: Nested Transforms

Design apps (Figma, Illustrator) often leave transform="translate(x,y) rotate(deg) scale(x,y)" attributes on groups and paths. These stack multiplicatively and can produce wildly wrong cut positions.

Fix in Design Swiftly: After importing, select all shapes and run Flatten SVG from the Ops menu. This resolves every transform into raw absolute path coordinates. The shape looks identical, but the coordinates are now clean world positions.

Problem 2: Groups and Sub-Groups

Complex SVGs have layers of <g> group elements nesting shapes 5 or 6 levels deep. Design Swiftly imports these as grouped objects, but the CAM engine needs individual paths to generate toolpaths.

Fix: Select the imported SVG and run Explode SVG (Ctrl+Shift+E). This breaks every group recursively into raw path segments. You can then select, delete, or style individual elements.

Problem 3: Text Elements

SVG text (<text> elements) requires the font to be installed on the rendering machine. CNC senders do not have fonts, so text must be converted to paths before export.

Fix: Double-click any text element in Design Swiftly and choose Text to Path (or press Shift+T then select Convert). The text glyphs become closed path outlines that the CAM engine treats as normal shapes.

After converting: check for overlapping paths

Some fonts produce overlapping path segments on letters like "B", "P", "O". Use Boolean → Union to merge overlapping paths into a single clean outline before setting toolpaths.

Problem 4: Invisible Strokes vs Filled Shapes

Design Swiftly's CAM engine treats stroke paths as cut lines and filled closedpaths as pocket candidates. An SVG designed for print may have fills but no strokes — meaning the CAM engine finds nothing to cut.

Fix: Select all shapes and set Stroke: #000000, Stroke Width: 0.5mm, Fill: none in the Properties panel. This ensures every shape is treated as a cut path.

Problem 5: Extremely Complex Paths

Highly detailed SVGs (photos traced to vectors, detailed illustrations) can have tens of thousands of nodes. This overloads the G-code generator and produces files that are gigabytes large.

Fix: Select complex paths and use Simplify Path in the Ops menu. Adjust the tolerance slider — 0.1mm simplification removes redundant nodes while keeping visual fidelity at CNC scales.

Recommended SVG Export Settings from Design Apps

SettingRecommended Value
UnitsMillimetres (not pixels)
Decimal precision3 decimal places
Flatten transformsYes / Always
Text as pathsYes / Always
Embed rastersNo / Never
Preserve viewBoxYes
Quick test

Import your SVG and immediately click Generate G-Code. If Design Swiftly produces output with reasonable file size (<500KB for a typical sign), you're good. If the file is huge or errors appear, run Flatten → Explode → Simplify in that order.

Try it yourself →

Open Design Swiftly — Free, No Install

No account. No download. Just open and create.

Launch Design Swiftly

More Articles