Issue with importanting SVGs, scaling incorrect
Hello,
I use Illustrator to create SVGs that I want to import into PrusaSlicer but the files are the wrong.
The sample is supposed to be 1.5"/38.1 mm in height.
When brought into PrusaSlicer 2.9.4 the item is only 34.26 mm.
When I scale it in Illustrator by 2, to 76.2 mm, and important it into PrusaSlicer it is 57.15 mm
Does anyone know why this happens?
Is it a setting in the graphic software or something in the slicer?
RE: Issue with importanting SVGs, scaling incorrect
Its worse in Blender. When loading into that is is 0.0524mm by 0.0609mm, so really tiny. I would be checking all the settings on your graphics software.
RE: Issue with importanting SVGs, scaling incorrect
I've never tried this but you might want to check the viewbox attribute. I don't know if this is accessible in Illustrator but you can edit SVG in a text editor. Maybe someone with more time can check the PrusaSlicer source code and see if there is an easy fix.
SVG is/was originally intended for web page graphics that must expand/contract to fit within whatever display is used, it's actually XML. It's a set of open standards, W3C publish the various standards at w3.org
@studio-sagan has nailed the root cause, SVG files resize to fit the available ViewPort unless absolute values are defined (and they can be overridden) - if you open your SVG file as text you will find the only bounding defintion is:
viewBox="0 0 612 792"
- which means that by default it is rendered within 612x792 pixels and the size of the pixel is not specified.
I don't know Illustrator but it's not outputting scaling data - there may be a setting to change this.
Cheerio,
RE: Issue with importanting SVGs, scaling incorrect
Just so y'all know: I cursed a LOT figuring out how to make this work.
Diem got me on the right track. I googled "illustrator export SVG as absolute size" and finally found a two year old reddit post with just one person replying to it with the correct answer.
If this is also your problem, this is how you do it:
File > Export > Export for Screens
Bottom right is the Formats panel, click the little gear to get into settings
Select SVG and unselect "Responsive"
This will make it correct.