Basic Rhino SVG export.

Basic Rhino SVG export.

HughesTooling
Consultant Consultant
4,965 Views
5 Replies
Message 1 of 6

Basic Rhino SVG export.

HughesTooling
Consultant
Consultant

This script started out as a way to get drill patterns from Rhino to Fusion without the trouble of uploading to the cloud. After getting the script working on circles I thought I might as well add lines then polylines and so on. At the moment it will export curves and polycurves but anything that's not a line or arc will be linearized. Any curves that need linearizing will be highlighted and you will be prompted for a tolerance.

 

To install the plug-in copy the file ExportSVG.rhp from the ZIP to a directory on your computer where you can save Rhino script files. Then drag and drop the file onto Rhino, if you have more than one instance of Rhino running you might want to drop it on all instances. Once installed you get a new command ExportSVG, when run you first select a file then select all the curves you want to export when you hit enter you are prompted to select a canvas rectangle if you are exporting to Fusion just hit enter again. When the script finishes it will open Notepad with the SVG file just close notepad and the files ready to import.

I don't know if the files will be any good if you try to use them in any other programs. If you want to try you need to draw a rectangle starting at 0,0,0 then going X+ and Y- like this.

Clipboard01.png

Then draw all your curves inside the rectangle and select the rectangle when you are prompted for the canvas rectangle. If the script doesn't like the rectangle you pick for the canvas you can pick again or just hit escape.

I've only tested working in mm in Fusion and Rhino, it might work if you work in inches in both but it's not going to work if to work in different units in each program.

Here's an example starting in Rhino.

Clipboard01.png

Imported to Fusion.

Clipboard02.png

And extruded.

Clipboard04.png

Same file opened with Chrome.

Clipboard03.png

Mark.

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Accepted solutions (1)
4,966 Views
5 Replies
Replies (5)
Message 2 of 6

HughesTooling
Consultant
Consultant

Just some more info on the plug-in. The current active cplane will export so for example you can export from the Top, Front Etc. like this, Front view in Rhino.

Clipboard01.png

 

Imported to active sketch in Fusion.

Clipboard02.png

 

Also you can draw in any quadrant and it will import to Fusion.

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Message 3 of 6

charegb
Community Manager
Community Manager

Edit - 

 

Never mind, I only read the second post and thought you wrote an importer for Fusion.

That will teach me to slow down and carefully read a post before replying 🙂

 

Bankim

0 Likes
Message 4 of 6

HughesTooling
Consultant
Consultant
Accepted solution

Just a small update. I found an error where the plugin output Line instead of line also added a line so it scales to fit the browser window. There doesn't seem to be any way to edit the first post so the new plugin is attached to this post.

 

Mark.

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes
Message 5 of 6

sdaitzman
Explorer
Explorer

Hi!! It would be lovely to see this plugin run on MacOS. May I take a look at the sourcecode? I'm currently trying to develop a plugin for diagramming at my school and I need to convert curves in Rhino to a format that another program will understand.

 

Thank you!!!

0 Likes
Message 6 of 6

HughesTooling
Consultant
Consultant

@sdaitzman The code I ended up with was pretty ugly, I started with something I'd written to produce G code with and some of that I don't really want to share. There is an example Rhino script here that might help though,

https://discourse.mcneel.com/t/export-to-svg-challenge/25618/10?u=hughes_tooling

 

I've given up using SVG for transfers between Fusion and Rhino, DXF works a lot better.

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes