Wish: SVG export

unhandled

#1

SVG export would make it possible to exchange data with:

  • Inkscape (Windows version cannot import AI created by Rhino)

  • VisiCut: used at some Fab Labs for controlling laser cutters

But there’s more software that only speaks SVG.


(Brian James) #2

Thanks, this has been on the wishlist for a long time. I’ll nudge the developer who currently owns it to see if they can comment on if it’s possible or planned… @tim


(Steve Baer) #3

This has been on the list for a while, but hasn’t had much work done to it yet.
http://mcneel.myjetbrains.com/youtrack/issue/RH-839

SVG export is very closely related to an improved PDF export. We do want to have an improved PDF (and SVG) exporter at some point, but this actually turns out to be a pretty large project after some initial investigation. This project is not currently active, but you can track it’s progress by “starring” the issue on youtrack.


#4

Could we have this as a wip project (with very basic fujctionalities) until it will be addressed the pdf issue?


(Steve Baer) #5

Not really; I would rather wait and do it the right way when it fits into our development schedule. That said, our SDK is rich enough that people can write their own file exporters and everyone is welcome to do that.


#6

YES, please!

having to make the detour over adobe illustrator is really painful.
I think if rhino gets good/native SVG save/export options you make rhino very interesting for a whole new group of users. especially if creating and exporting SVG will be combined with grasshopper.


(Steve Baer) #7

Next week’s WIP will contain an initial version of an SVG exporter. I’ll write up a post about this once it becomes available


The Pain of Exporting to 2D
#8

@stevebaer
REALLY?! that is absolutely awesome, now I feel like a child waiting for christmas :astonished:
SVG support is needed badly. please take a look at how the webdev community is embracing svg. it hast a bright future in webdev/design:

hopefully this motivates you to push svg integration as far as possible. if it’s done right you could ditch adobe illustrator for a lot of tasks - yes I think it could be that powerful :scream:

if you make it right, you could win a whole new user audience. integration into grasshopper would be very important too.


#9

A nice feature to have: Is to be able to paste to into Illustrator, by copying the SVG to the clipboard. Illustrator and inkscape will be nice, and just paste the SVG. Not sure if SVG import is also on the list, but then Illustrator > Rhino copy pasting should also be easy :slight_smile:


#10

c&p will probably not be possible. that only works if the program from where you copy as well as the program to where you copy to work/understand with the same kind of data. c&p text between different text editors is no problem for example.

a export with a window popping up which presents me with the right set of options - that’s what i’m waiting for.

@stevebaer & @BrianJ
btw where is the next WIP?! :confused:


(Nathan 'jesterKing' Letwory) #11

Next WIP is hiding behind some bugs. Send your warmest thoughts to the devs valiantly battling those - it’ll help.


#12

Well, since SVG is the data-format illustrator talks while copy&pasting, I would argue that it certainly seems possible. Also, the clipboard can contain the similar data in different formats. Illustrator seems to look at what is called the TextDataFormat.Html in the .net framework.

In C# it would be something like this to copy something for illustrator:

// Copy
Clipboard.SetText(svgString, TextDataFormat.Html);

// Paste
var potentialSvg = Clipboard.GetText(TextDataFormat.Html);
// Check if this is really SVG - otherwise - nevermind.


(Steve Baer) #13

Would you expect the geometry to be pasted into Illustrator at the same location and same size every time? If that is the case, then Rhino doesn’t quite have all of the information at hand to properly do this when converting from 3D world units into 2D SVG units.


#14

Could you make it work if all of the selected objects were on the same plane, or even add an option to project to plane at the point of copying to the clipboard?

Also, could the same copy/paste trick also work going into Affinity?


(Steve Baer) #15

I can always make up a plane, but I can’t imagine a way to make this easy and obvious to the user. I assume in this case the scale would always be 1:1


#16

I can see that’s a tricky problem to solve, as Copy/Paste are one-hit calls with no command line dialogue. But if @arendvw 's comments are correct - the clipboard can hold the same data in different formats and the receiving programme looks at this on Paste and works out if there’s a suitable format to import - it would seem a neat way of shifting data between different software on the fly. Does (or could) Rhino do this?

Yes, I’d always go 1:1. Then at least the user always knows what to expect. Changes of unit system between softwares might screw this up though? Testing the copied items for planarity and orienting it to the standard XY would be a welcome time saver. If it’s not all planar, pop up a prompt to ask if you want it projected to plane and re-oriented to XY? That’s a hard call to make, as Copy/Paste is such a universally applied operation and meddling with it probably isn’t wise.

It’s interesting that Illustrator uses SVG format for it’s background workings. Is there anything that .ai format can support that SVG can’t, and vice-versa?


(Steve Baer) #17

I spent some time this weekend researching copy/paste options between Rhino and Illustrator/Affinity Designer and wrote up my findings at
https://mcneel.myjetbrains.com/youtrack/issue/RH-38059

Pasting into Illustrator is not quite as easy as I had hoped. It doesn’t really appear to support pasting SVG content unless I’m missing something.


#19

I tried pasting from Inkscape into AI CS6, and it worked flawlessly.


#20

Do you know what format(s) Inkscape copies to clipboard?


(Steve Baer) #21

Inkscape is probably copying Abode Illustrator Clipboard Format to the clipboard instead of SVG. I can’t find any details on this format.

Edit: I’ll install inkscape and see what kind of data formats it places in the clipboard. It looks like the enhanced metafile format is what inkscape place in the clipboard for Illustrator.