Svg scaling / units

Hello everyone - got some issues with .svg export : It always exports pt no matter what I choose in the dialogue
Therfore the scaling is wrong - is there any solution for this?
thx

working on rhino 7.21

Hello
have you a 3dm file as example, the SVG you have and what you want (some sketch) ?

Without that it is quite difficult to help

Sorry - here just a simple rectangle
testsvg.3dm (29.0 KB)
with 300mm x 200mm - export selected → pt
testsvg
in the dialogue it no reaction to changing units (mm to inch and vice versa)
Your plugin works perfect (saveassvg)
plugin

There should be pictures in the rectangles hope you can at least see the code

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

Just to be clear does the problem is with Rhino Save As SVG

Or mine exporter from Food4Rhino ?

I never really dig into Rhino Exporter but I think it is an exporter for Document viewing and not for working on real scale. As a simple geometry is transformed with ugly coordinate due to DPI …
here Rhino exporter file


What I use

So first both tools exports path and not point. For the size in Rhino seek on this forum, the problem already occurs.

But in order to be better helped. Try to post all the actions you are doing, what you get and what you want.

your exporter works like a charm (it´s not even for 7 it´s for 6)

  • but the rhinoexporter is the one I got problems with
    I would like the exporter to generate a .svg with the right scaling (1:1)

Look at these discussions. I am not sure you will manage to make it work like you want. Mc Neel choose a logic that is good for some purposes (drawing, printing) but bad for others (cad things like laser cutting).

Ok thanks so far for your quick answers !

that helped a lot to understand what´s the problem (Scale issue with .svg)
And yes it´s bad for laser cutting - so I´ll use your plugin as long as possible which works fine for my purposes.
Also an export to pdf and then save to svg (eg in inkscape) works but this is just a workaround and no solution :wink:
In my opinion export to svg should work out of the box - with the right scaling. As far as I read a lot of people are using this feature.
And again thank you for your brilliant plugin - it helps a lot!

1 Like

@laurent_delrieu Hi Laurent. I’m sticking with your SaveAsSvg in preference to the Rhino exporter because I find it gives more/better control over how things export to .svg (for Affinity Designer). The other thing that I really like is that export behaviour is consistent across Rhino V5 and V8, using your plugin.

That said, I’m having problems with exporting text. For one, it doesn’t scale correctly. All vector objects scale perfectly. Setting ‘Text scale’ to 1.385 seems to cure the problem, for Arial at least. I need to try more fonts to see if that setting works for all.

The other problem I’m seeing in Affinity Designer is that text (imported as text, not curves) comes in as outline with no fill. It can be corrected in AD, but it’s tedious to put right if there’s lots of it.

As you’ve posted with your screenshots above, these settings appear to be text based within the header/ top level settings of the svg file. I’m reading on google that the AD developers have been a bit naughty and haven’t followed all of the W3.org parameters for svg. Would it be possible to expose these details settings in your plugin and then be able to save them as custom profiles? That would mean that Rhino users could tailor the output to save a variety of DTP applications and switch between them easily, all from the same export setting environment.

I really like your plugin! :+1:

Hello, thanks for the kind comments, I didn’t touch to this tool for some years as I had to work in DXF for laser cutting some stuffs. But whatever I can add some features and try to make the tool for Rhino 7 (and 8 ?) and if not difficult with ETO so it could be cross platform.
For the question of no fill if you choose
image
Text is filled in Inkscape, Edge, FireFox, Chrome …
For the size of text, it is really not simple, it is surely why I ended with a custom scale.
http://xahlee.info/js/svg_font_size.html
But if there is somewhere a good logic to apply I can implement it.

I need some help on the GUI and what you want

Can you make a list ?

Do you want something like a button to save custom profiles with some name. Can you draw some example of GUI and logic ?

I’ve tried saving out with “Fill EvenOdd” both checked and unchecked. I’m not seeing much difference. What is it supposed to do?

In AD, I’m also finding that text does not import within the canvas. It appears that AD treats the top left hand corner of the canvas as the origin (0,0). Y-positive values are then down the screen. X-positive values are to the right of the origin. Imported text objects are always above the canvas and to the right on import:

I’m also experimenting with how text justifications are handled, just to see what effect that has. I know that is a problem for several apps. I’d be happy if SaveAsSvg could correctly place Rhino default justified text (Bottom Left) and always work with that, having a box for X and Y values to ‘offset’ text entities on export so that AD (or Inkscape, or Illustrator, or…) bring them in in the correct position on the canvas. I can post some sample files if it helps?

For the GUI - because DTP apps all seem to handle imported data differently, there is no one ‘correct’ set of export settings. What I’d like to see is a ‘Save settings as profile’ button at the top or bottom that would save all of the set preferences against a user-defined name (e.g. “AD text export”). These could then be recalled from a drop-down list at the top (above ‘Visibility’?). I don’t work with DTP much myself (getting svg to export predictably to AD from Rhino might change that!); it would take me a while to mock up a visual of a GUI. Sorry!

There is nothing wrong with what you have at the moment. Adding the one or two features as above would make it a very competent export tool.

Btw - going back to the OP’s original point @floh_arbeit - I too find that the .svg always opens with points as the measurement units in AD. It’s easy enough to change in the AD document preferences and once it’s set to mm, the scaling is correct. Is there a way that the header in the .svg can force the importing app to use the measurement units from the file?

Opacity must be 1 to be seen, I set it to 0 by default (not a good idea)

I see the same thing in Inkscape, so I must add an option.

Ok I will try to add that

I have no idea and I have not AD or DTP.