SVGs upside down!

SVGs upside down!

HughesTooling
Consultant Consultant
3,476 Views
16 Replies
Message 1 of 17

SVGs upside down!

HughesTooling
Consultant
Consultant

Someone reported a problem in the CAM forum with a change in how SVGs are imported. I just tried it out and for some reason if you select a face for the import it comes in upside down, it doesn't really matter to much but I thought I'd report it in this forum.

 

In this image the green TEST was imported onto a plane and the white one after selecting a face.

Clipboard01.png

 

SVG attached.

 

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
3,477 Views
16 Replies
Replies (16)
Message 2 of 17

HughesTooling
Consultant
Consultant

After a bit more testing it seems to be a problem importing DXF and SVG files but it seems to only be a problem using a face on a primitive shape. Perhaps this is not new just something I hadn't tried before.

 

In this image the block on the left is a primitive and the one on the right is an extruded sketch I guess the XY directions are random on the primitive. 

Clipboard02.png

 

Mark

 

Edit spoke to soon this image show a DXF import and a SVG on the same face, SVG is upside down.

Clipboard3.png

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 3 of 17

PhilProcarioJr
Mentor
Mentor

@HughesTooling

This isn't new, I remember a post about this a few months ago. One of the dev's posted on it, I can't remember what was said though.



Phil Procario Jr.
Owner, Laser & CNC Creations

0 Likes
Message 4 of 17

HughesTooling
Consultant
Consultant

Something seems to have changed with scaling though. I wrote an exporter for Rhino that exported SVG files so one unit in Rhino came is as one unit in Fusion now they import at 0.2645 the size they should be. I don't use SVG any more as DXF works better for me but I wonder if the scaling has changed for files from Inkscape and illustrator?

 

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 17

PhilProcarioJr
Mentor
Mentor

@HughesTooling

I read somewhere that they were working on fixing the import of dxf and svg....the what's new says

"There are have been many reports around inserted DXFs having the wrong scale/units. Good news – you can now choose/override units when you insert a DXF"

Maybe they also made changes to the SVG.....

I use SVG all the time but lately I have been focused on T-Splines so I haven't imported any SVG files lately....



Phil Procario Jr.
Owner, Laser & CNC Creations

0 Likes
Message 6 of 17

Anonymous
Not applicable
I can confirm the scaling has definitely changed for Illustrator after the May 7th update. I use SVG import all the time from Illustrator, and my old "1 pixel in Illustrator = 1mm in Fusion" rule no longer works.

Was so happy to not have to fiddle with scaling in my workflow, but now I'm back to it. Hopefully they revert so others like me can have that back.
0 Likes
Message 7 of 17

FrankCao
Alumni
Alumni

Hi 

 

 

 

 

 

0 Likes
Message 8 of 17

FrankCao
Alumni
Alumni

Hi 

 

 

 

 

0 Likes
Message 9 of 17

FrankCao
Alumni
Alumni

Hi JohnVF,

 

Thanks for reporting the scale problem. Yes I have locally made a 100*100 mm SVG file and after import it into Fusion, the size becomes to 75*75 mm. This is defintely a bug. I will log this and send to developer to take a look.

 

I noticed you said "1 Pixel in illustrator = 1 mm in Fusion". Actually Fusion only would make sure "1 mm in illustrator = 1 mm in Fusion". So maybe you have some settings in illustrator to make sure "1 Pixel in illustrator = 1 mm in illustrator", am I right?

 

 

Thanks,
Frank

0 Likes
Message 10 of 17

FrankCao
Alumni
Alumni

 Hi all,

 

Just talked with developer, the scale problem is about how to deal with SVG file saved with pixel format. Today Adobe illustrator will usually save SVG file with the default unit as pixel, which means even if you draw a 100*100 mm rectangle, it will be saved with  a*b pixel. There are no fixed transfrom between mm and pixel, and it depends on your computer's DPI. So different computer may save the 100*100 mm rectangle with different a*b pixel. And Fusion did not know how long a pixel is. Currently Fusion will use following equation to transfrom between pixel and mm, that 96 pixel = 25.4 mm. This transform equation is different with previous Fusion release. But we will always transform 1mm in SVG file to 1mm in Fusion as long as the svg file is saved in mm instead of pixel. Unfortunately most SVG file created from illustrator is saved in pixel, not mm.

 

We know it's not good to always use a fixed equation to transform between mm and pixel. So we are discussing new methods of giving user more options to define how long a pixel should be. Hopefully we can give you some new updates for this for future release.

 

 

Thanks,

Frank

0 Likes
Message 11 of 17

Anonymous
Not applicable
There are no special settings, previously I would set my units in Illustrator to pixels and on import of the SVG, Fusion 360 would use the pixels as mm. So if I wanted a 100mm by 100mm shape in Fusion, I'd make a 100px by 100px shape in Illustrator, it would import into Fusion 360 at 100mm by 100mm, no special conversion or formula required, simples

After the update, not so simples.

Currently, it makes the most sense to do it the way it was done before the update because as you stated the pixel is a different length in comparison to mm on different screens, but no matter what screen 1px will always be 1px.

So if we work with pixels in Illustrator and just pretend they are millimiters we can direct export SVG drawings and import them into Fusion without having to take the time to calculate how to get them to scale properly.

At least until the developers can write some code to identify each screens scaling of pixels to mm.

In the interim I'd much rather keep pretending the pixels in Illustrator are millimeters so I don't have to bother with inaccurate conversions. Perhaps an option that can be added to the preferences that allows one to revert the SVG import to the old "1 pixel = 1 millimeter" form.

For me it would remove the complication introduced by the latest update, I use SVG import multiple times daily. The product designers I work with use Illustrator for their concepts, and I pull profiles, etc from Illustrator to convert them into 3D CAD models for 3D printing or CNC milling.

Perhaps we should also move this to its own thread, instead of hijacking the upside down SVG thread.
0 Likes
Message 12 of 17

HughesTooling
Consultant
Consultant

@FrankCao wrote:

Hi 

 

 

 

 


 

Hi Frank

 

I've written a plugin for Rhino to export curves. It saves the files as unitless so in the past if you work in Fusion in mm and Rhino in mm file came across 1 to 1, same if you worked in inches in both. Now Fusion is scaling the file at an odd scale about 0.26 the correct size working in mm. Here's a link to a thread with the Rhino exporter and how to use it, latest version in the last 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 13 of 17

HughesTooling
Consultant
Consultant

@FrankCao wrote:

 Hi all,

 

Just talked with developer, the scale problem is about how to deal with SVG file saved with pixel format. Today Adobe illustrator will usually save SVG file with the default unit as pixel, which means even if you draw a 100*100 mm rectangle, it will be saved with  a*b pixel. There are no fixed transfrom between mm and pixel, and it depends on your computer's DPI. So different computer may save the 100*100 mm rectangle with different a*b pixel. And Fusion did not know how long a pixel is. Currently Fusion will use following equation to transfrom between pixel and mm, that 96 pixel = 25.4 mm. This transform equation is different with previous Fusion release. But we will always transform 1mm in SVG file to 1mm in Fusion as long as the svg file is saved in mm instead of pixel. Unfortunately most SVG file created from illustrator is saved in pixel, not mm.

 

We know it's not good to always use a fixed equation to transform between mm and pixel. So we are discussing new methods of giving user more options to define how long a pixel should be. Hopefully we can give you some new updates for this for future release.

 

 

Thanks,

Frank


Hi Frank

Are you now scaling all file assuming pixels? Actually from what I've seen illustrator uses points and inkscape uses pixels, points are 1/72" and pixels are 1/90". If you've made the importer work with illustrator people with inkscape are going to struggle figuring out how to scale now. Before the last update it was easy someone with inkscape, could enter 1/72 or 25.4/72 for mm and illustrator users 1/90 or 25.4/90 and get the correct size. I don't have both programs to test so don't know if it's a problem.

 

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 14 of 17

HughesTooling
Consultant
Consultant

Here's some interesting info on units\lenghts using points and pixels and how it should work.

 

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 15 of 17

HughesTooling
Consultant
Consultant

@FrankCao wrote:

Hi 

 

 

 

 

 


 

Hi Frank

Rotate is an easy fix for SVG but there's no option on the DXF import dialog. I've made a screencast to demonstrate how unpredictable it can be. I've attached the SVG and DXF, before the last update they would both insert the same size.

 

 

 

 

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 16 of 17

FrankCao
Alumni
Alumni

Hi 

 

 

 

 

0 Likes
Message 17 of 17

FrankCao
Alumni
Alumni

Hi JohnVF,

 

Thanks for your reply. Yes I understand your point. But there are also some other users complaining about the unit conversion, saying "1 px" should NOT equal to "1 mm" during svg insert in previous posts. So we think the better solution should be to provide user an option to decide how long 1 px is.

 

We are discussing this issue internally and will get you updated when we have some new updates.

 

 

 

Thanks,
Frank

0 Likes