Scale issue with .svg

Hello everybody,

I am trying to export and import .svg files. I have a 0.35277 scale factor between creating the .svg file and opening it. I guess it is linked to the point definition (1pt = 0.35277 mm). Do you have any idea of how to keep the dimensions when saving as .svg ?

Hi;
Export Top view @ 1:1 (100%) scale in the “View and Output Scale”
Paper size has nothing to do here, it’s only a bounding box

Thank you for your answer, I did exactly this and I have a scale issue.

Hello - it should work to set the print options to scale 1:1 - like so:

This is a 100 by 50 rectangle: junk.zip (420 Bytes)

-Pascal

Hello Pascal,

I opened your file and it is not really a 100 by 50 rectangle…

Hello
I looked at the file an indeed there are no real length in it. Surely unit converted in points …
You can use my SVG converts but it works just in Rhino 5. I used it to laser cut things without any problem

“Unfortunatly” I am using Rhino 6 !

50 mm = 1.97 inches…

-Pascal

What SVG program are you reading it into? We made some changes to 6.8 to include units. But, SVG units are a little odd.

For the moment I am creating the file with Rhino and then just reading it with Rhino. (then I will use it for cutting)

In Rhino 6.8, the SVG is scaled properly. But the SVG also has the units of printer points. This is an update to 6.8.

So, if you write out an SVG, then read it back in. Check the units, they will probably be Printer points. By changing the units to mm or inches and letting Rhino scale the results the size is correct.

Now in the previous SVG writer the units could be selected. That plugin also runs in Rhino 6 so you can also continue to use the plugin.

Scott I didn’t check the new features of Rhino but I made a SVG plugin to laser cut objects with Sculpteo service. I don’t know for others but sculpteo doesn’t take into account the header with width … A line with 100 length in Rhino and 100 length is SVG is correctly interpreted.
So my advice to @methode2 make an account at Sculpteo and upload a SVG to see what it gives.

https://www.sculpteo.com/

I have done a test with a 100 mm wide and 50 mm height rectangle and Sculpteo made the scaling
image
with this file


Rhino open it correctly but in “printer points”.

But one strange thing is that as I selected the object the “handle” were also part of the file ! It explains the dimensions from Sculpteo that are 100.5 and 50.5. Is it done on purpose ?

My personal though is that pt must be avoided and prefered, if possible, by the unit the user use.

("em" | "ex" | "px" | "in" | "cm" | "mm" | "pt" | "pc" | "%")?

And some explanation of weirdness of SVG
https://mpetroff.net/2013/08/analysis-of-svg-units/

Thank you for all these informations, I am running a 6.8 revision with still the same issue. I am scaling the model each time I open it and it is ok.
Is there a way to choose the unit when I create a .svg file ? I didn’t see any …

Test.svg.zip (875 Bytes) I am also having issues with the svg export. It doesn’t seem to be scaling the dimensions correctly. Currently my workflow involves saving as an ai and then a svg from illustrator. It would be nice to eliminate the need for illustrator. Here’re my export settings.

I can’t seem to attach and svg but here’s what I get when I import the svg.


I’m on 6.18 for mac.

I want to export a Rhio Layout as svg.

I click on file>export selected>svg

But when the Export SVG dialog pops up I set up the right format, but it doesn’t export the svg correctly.
In the picture attached you see the difference between layout and svg.

On current Rhino 6 exporting to .svg is still messed up.
That print-like UI popping up is really not helpful and confusing. Resulting .svg are on wrong scale with any setting I’ve tried.
Importing the exact same .svg file Rhino6 just exported results in misplaced and mis-scaled curves.
Not reliable.

@laurent_delrieu , your plugin works great on Rhino 5!
It doesn’t work on Rhino 6. Is it expected or it’s happening only to me?

Calling the SaveAsSVG open the path+filename form correctly, but after clicking the “Save” button nothing happens, on Rhino 5 it opens your plugin UI.

Hello - Just testing V6 here with a simple file, exporting 1:1 seems to work fine; dimensions are reading correctly… I’ll try mac.

-Pascal

Hi Pascal.
I’m on windows.
Other than out of scale and misplaced, rhino svg export function also alter the shapes: circles and nurbs curves are deformed in the process.
On Laurent plugin that doesn’t happen.

Hi Riccardo - can you post a simple example (3dm file, svg export, settngs, please) of that? - please also send a version, that you like, from the plug-in.

thanks,

-Pascal