SVG files, and how to turn one into a 3D model
An SVG is a flat drawing. Turning one into a 3D model means giving it a thickness, and that works beautifully for signs, stencils, keyrings, cookie cutters and laser parts. It also means the drawing has to be built a particular way, and most drawings are not.
.svg · image/svg+xml
SVG conversions that work today
Convert a SVG file into something else
Make a SVG file from something else
Things to do with a SVG file
SVG guides
Only closed paths become solid
A path that starts and ends at the same point encloses an area, and an area can be given a thickness. A path that does not close encloses nothing, so there is nothing to extrude, and it is skipped.
This is the whole reason a drawing that looks perfect on screen produces an empty or broken model. A stroked line looks like a shape but is not one: it is a thin path with a wide pen drawn along it, and the path itself has no area. In Illustrator the fix is Object then Expand; in Inkscape it is Path then Stroke to Path. After that the outline is a real closed shape and it extrudes.
Text has the same problem. Letters are drawn from font outlines that are not in the file, only referenced. Convert text to outlines before saving — Type then Create Outlines in Illustrator, Path then Object to Path in Inkscape — or use the text tool on this site, which does exactly that with its own fonts.
Holes work, if the drawing nests properly
A letter O has an outer outline and an inner one. The inner one becomes a hole because it sits inside the outer one, and that is worked out from the geometry rather than from anything in the file. The same rule gives a washer its bore and a stencil its gaps.
Where this goes wrong is overlapping shapes that were never meant to nest. Two circles that cross produce a result that depends on which is inside which, and the answer is neither. Union them in the drawing program first and the ambiguity disappears.
Units in an SVG are usually meaningless
SVG allows real units — a width in millimetres or inches — and Inkscape writes them. Illustrator and most other tools write bare user units, which are pixels by another name, and a pixel is not a length.
So a drawing that is 500 units wide might be intended as 500 mm or as a business card. Set the size you actually want after converting, using the measurements shown beside the model. Getting this right first time is rare and checking takes a second.
Going the other way: a model to a drawing
Cutting a model with a flat plane and writing the outline as an SVG is a genuinely different operation, and it is the one people want when they are making a bracket, a template or a laser-cut part that has to fit something that already exists.
The result is a true cross-section at whatever height you choose, as closed paths at real millimetre sizes, ready for a laser cutter or a drawing program.
What SVG cannot store
- Any 3D information — an SVG is flat, and the thickness comes from you
- A meaningful unit, in most files
- Anything a stroke or a gradient implies about depth — both are dropped
SVG in detail
| Property | SVG.svg |
|---|---|
| File contents | XML. A text description of shapes, readable and editable by hand. |
| Geometry | Flat paths: lines, arcs, and cubic and quadratic Bézier curves. |
| Units | Real units are allowed — mm, cm, in — but most files use bare user units. |
| Colour and texture | Fills, strokes, gradients and patterns, none of which describe a solid. |
| Separate objects | Groups and layers, with ids and names on both. |
| Published by | The W3C, 1999. Version 1.1 is what tools write; SVG 2 is still arriving. |
| Written by | Illustrator, Inkscape, Affinity Designer, Figma and every drawing program. |
Questions
- Why is my converted model empty?
- Almost always because nothing in the drawing is a closed path. Strokes and text are the two usual culprits. Expand strokes to outlines and convert text to paths, then try again.
- Do colours and gradients survive?
- No. A colour describes how a flat shape is painted and says nothing about a solid. The outline is used and the fill is ignored, whatever it is.
- How thick should I make it?
- For a keyring or fridge magnet, three millimetres. For a stencil or an inlay, one. For a freestanding sign that should not fall over, ten or more. You can see the result before downloading, so try one and look.