Community
Fusion Design, Validate & Document
Stuck on a workflow? Have a tricky question about a Fusion (formerly Fusion 360) feature? Share your project, tips and tricks, ask questions, and get advice from the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SVG scale is wrong

21 REPLIES 21
Reply
Message 1 of 22
Anonymous
11192 Views, 21 Replies

SVG scale is wrong

I've been working in Fusion for about a year now.  Sometimes I layout my model drawing in Illustrator and then insert it in Fusion as an SVG.  I work everything in millimeters, but the trick to importing the drawing perfectly to scale from Illustrator into Fusion in millimeters is that you actually had the design it in points (not millimeters) in illustrator.  Then when you insert it into Fusion it would be the correct scale in millimeters (example: 100points in (Illustrator) SVG = 100mm in Fusion).  The drawing (or sketch) would also be in the correct location in (Top View) that corresponded with the canvas size in illustrator (meaning the upper left hand corner of the Illustrator SVG canvas was the center point in the top view of Fusion--I hope that's clear).

 

Well the problem is, now that you all have made some updates (I'm not exactly sure when), this trick now does not work at all.  When you import a SVG in points it comes in super small (100 x 100points is oddly 26.458 x 26.458mm).  So I tried it in millimeters and it too is incorrect (100 x 100mm square is only 75 x 75mm).  What Happened??  Why has this feature changed and now doesn't work at all?

 

 

 

21 REPLIES 21
Message 2 of 22
ahreum.ryu
in reply to: Anonymous

Hi @Anonymous, 

 

Welcome to the Fusion 360 community! Smiley Happy

Have you seen this Help article? 

 

Importing SVG and scaling

 

One more thing, here is Tips from @HughesTooling

If I missed something, please let me know. 

 

Many thanks! 

Message 3 of 22
HughesTooling
in reply to: ahreum.ryu

Unfortunately there was an update to Fusion a while ago and my tips no longer work. I've edited my tips and add the following.

 

There was an update to Fusion a while ago and SVG import was "Fixed" so it's supposed to scale imports from Illustrator correctly. Unfortunately the FIX doesn't seem to work for a lot of people, I think the new conversion is assuming you are using pixels but this adds to the confusion because I've seen a pixel defined as 1/90, 1/92 and 1/96 of an inch. 

 

Here's a quote from  @FrankCaoin this thread.

"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."

 

Every SVG I've seen and tested from Illustrator has been in pixel set to 1/90" so it looks like the "FIX" will have broken imports for everyone.

 

To add to the problems there's a bug using the scale option on the SVG import dialog and applies the scale twice. You will need to import first then scale the sketch, see this LINK.

 

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 4 of 22
Phil.E
in reply to: HughesTooling

In my days as a designer I used Illustrator quite a lot. I never used pixel, instead using mm units for exports that I consumed in ACAD or Inventor. So for mechanical work, what is the reason people use pixel instead of mm when mm exports should work perfectly? I want to understand this to ensure we are providing the best solution to our customers! 🙂 If mm exports from Illustrator do not work in Fusion, we need to know.

 

Thanks,





Phil Eichmiller
Software Engineer
Quality Assurance
Autodesk, Inc.


Message 5 of 22
HughesTooling
in reply to: Phil.E

I don't use illustrator or SVGs any more now you can insert DXF files. All I know is since the change was made there has been lots of confusion, when there was no scaling on import the info in this link worked for Illustrator and Inkscape now direct imports from illustrator without scaling don't seem to work and and I have no clue what you'd scale Inkscape files by.

 

See this thread, it has a sample SVG from someone using Illustrator and shows the wrong scale. Maybe someone needs to do a tips thread explaining how to setup a document in Illustrator so it scales correctly when exported 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 6 of 22
Snortimer
in reply to: HughesTooling

I was just experimenting with this today, and it doesn't import properly at all.

 

I tried setting my document units in Illustrator to mm, exported an SVG, and imported it into Fusion 360. It showed a 40mm circle at about 30mm. I tried to scale it by 1.33 in the dialog, and it made it over 50mm (applying the scale operation twice).

 

I then tried setting the document units in Illustrator to pixels, and saved and SVG. Upon import to Fusion 360, the 40 pixel circle was just over 10mm (appropriate if I were to scale by 2.83, I expect). Once again, scaling by 2.83 didn't work, as it applied the scale operation twice.

 

I set the units to points and set the circle size in mm, and then tried it. This gave the same results as the original file in mm.

 

So, it looks like regardless of the units chosen, the scaling doesn't work properly (it appears to apply it twice, as stated by the earlier poster). And it doesn't appear to allow me to use either pixels or mm as a unit in Illustrator. Using points as the unit in Illustrator gave the same results as pixels. I'm on a Mac.

 

I don't seem to be able to scale the SVG numerically after inserting it, either, but that could be a learning issue.

 

So, at this point, it looks like there are two issues:

 

1. Importing an Illustrator SVG doesn't properly use the units in the file. In my case, a 40mm circle in a mm file or a points file imported at about 75% size, and a 40-units circle in a points or pixels file imported at about 1/2.83.

 

2. Scaling during the insert operation doesn't work properly. It appears to apply the scaling operation twice.

 

Between those two issues, it's quite difficult to import something at the proper size.

Message 7 of 22
Phil.E
in reply to: Snortimer

Can you try using "save as" rather than "export" to create the SVG. Then try import to Fusion again. According to the developer working on SVG this should provide the correct unit/scaling on import to Fusion.

 

Thanks,





Phil Eichmiller
Software Engineer
Quality Assurance
Autodesk, Inc.


Message 8 of 22
Snortimer
in reply to: Anonymous

"Save As..." is how I've been doing it all along.
Message 9 of 22
JamieGilchrist
in reply to: Snortimer

hi Snortimer,

 

1. Importing an Illustrator SVG doesn't properly use the units in the file. In my case, a 40mm circle in a mm file or a points file imported at about 75% size, and a 40-units circle in a points or pixels file imported at about 1/2.83.

 

SVG units are screen units, so pixels.  Unless the SVG translator options supports mapping logical units (in, mm, cm, etc.) to screen units (pixel dimensions, and these vary depending on what OS and version of OS you're using), which AI does not, you'll never get a 1:1 mapping of an SVG from AI to Fusion.

Why not use DXF as Mark has suggested?  this supports unit mapping, so your drawings from AI will come into Fusion as expected.



2. Scaling during the insert operation doesn't work properly. It appears to apply the scaling operation twice.

 

This is a known issue.  In the video that Ahreum posted, made by yours truly; ) , don't use the scale in the SVG import.  Finish your sketch and use the scale from the modify menu, you'll have to select your sketch from the model browser then apply the appropriate scale level and it scales properly.

 

Hope this helps

hope this helps,


Jamie Gilchrist
Senior Principal Experience Designer
Message 10 of 22
ShirleyShi
in reply to: HughesTooling

Mark has got to the point. Although we can set unit as mm or inch in Illustrator, all values will be converted into points by Illustrator on saving. The problem is, the size of a point is device dependent and application dependent. For example, if we create a 10 mm x 10 mm square in Illustrator, save it, and then open in Inkscape, the size is 8.282mm x 8.282mm. It even shows a different result on my mac. We are making an improvement to let users select DPI and hopefully this will help to fix the issue.

 

Before we make the change, a workaround is to change the scale in Illustrator rather than Fusion:

 

  • Step 1: Open the svg file in Illustrator;
  • Step 2: Select all curves and then select Object->Transform->Scale from the menu;
  • Step 3: In the Scale dialog, input scale value = 96/dpi. By default, the dpi is 72 and so the scale value is 133.333333333%, then hit OK
  • Step 4: Import the SVG in Fusion. You should get the correct result now.

 

 

Shirley

Developer for Fusion Electronics

Autodesk, Inc.

Message 11 of 22
ShirleyShi
in reply to: JamieGilchrist

Thanks all for the input. The another issue about the scale twice (duplicate scale) is solved on Fusion side, which should work on next release.

Shirley

Developer for Fusion Electronics

Autodesk, Inc.

Message 12 of 22
Anonymous
in reply to: ShirleyShi

A simpler option is to export the file (from Illustrator) as an Autocad Interchange file - ".dxf".

This inserts into a sketch in Fusion without any scaling problems.

Message 13 of 22
Snortimer
in reply to: Anonymous

I just tried the DXF option, and while it did keep the scale, it also tried to preserve stroke weights unless I reduced them to nearly nothing. It also wouldn't let me rotate the artwork during the Insert operation, which is problematic as Fusion 360 usually tries to place artwork rotated oddly.

 

It's a decent option, though, until I can find the actual culprit in the current scale issue (the double-scaling issue is resolved). It appears to be Illustrator, so some more investigation is required. I might actually just call Adobe and talk to them about it, and see if there's something that I can do (or if I should submit a bug report to Adobe). No software should export a universal format in such a way that it can't be accurately imported into something else.

Message 14 of 22
Anonymous
in reply to: Snortimer

Stroke weight - had not thought about that as I have been working in Illustrator with designs for laser cutting, and habitually use a weight of 0.001 mm, this presented no problem in inserting to Fusion.
Rotation:  you’re right, can’t do that, so it’s important to select the right plane to insert onto!

SVG: yes, Adobe problem: it is based on points, not lengths (e.g. mm) then there should be an option to allow for this (e.g. being able to specify the point-mm ratio before export

Regards
Peter J
Message 15 of 22
Anonymous
in reply to: Anonymous

So, my issue is similar to the other posts in this thread, but with different numbers.  

 

Scenario: File created in Inkscape.  Document units are set to "mm".  When file is imported into Fusion 360, the file is 26.458% of the proper size.  In order to restore the feature to proper size, a multiplier of 3.77952 must be applied during the import.

 

If my math is correct, this is the same percentage as the ratio between pixels/inch and pixels/mm.  To find this, I took the default DPI of 96 pixels/inch and applied 25.4 mm / inch conversion.  The result was exactly the same as the multiplier I found by experimentation.

I think it is a definite bug that Fusion 360 ignores the fact that the document specifies the units to be be used as "mm", but assumes that the document is using a value of 96 DPI.  This needs to be fixed, as it is very confusing and frustrating.

Message 16 of 22
Snortimer
in reply to: Anonymous

Strange, I’ve never had issues with Inkscape SVG file’s. They always scale correctly upon import for me.
Message 17 of 22
TheCADWhisperer
in reply to: Anonymous

@Anonymous

 

Can you Attach the SVG file here

and

File>Export and then Attach the *.f3d file here?

 

Also, give some indication of the intended size for the imported geometry.

Message 18 of 22
Anonymous
in reply to: Anonymous

I'm experiencing the exact same issue importing Inkscape SVG files into fusion 360 today.

 

My math came out exactly the same as mgg4's. For the moment, after importing into Fusion 360, I need to scale up the svg by 3.77952 to roughly match the svg scale.

 

Both Inkscape and Fusion 360 are set to "mm".

Message 19 of 22
Anonymous
in reply to: Anonymous

For those that want to dive into this, here are some files, screenshots, and info.

 

I've attached an SVG of a square from Inkscape (version 0.92) which should be 100mm as seen in the screenshot. It imports into Fusion 360 (version 2.0.4285) and is scaled down to 26.458mm, also seen in a screenshot.

square-imported.PNGsquare-inkscape.PNG

 

Tags (2)
Message 20 of 22
Anonymous
in reply to: Anonymous

The easiest way I have found to properly set the scale in Inkscape for importing into Fusion 360 is as follows:

  1. Temporarily change document unit to pixels
  2. Change scale back to 1
  3. Change document unit back to your working units - mm in my case

Screencast: https://autode.sk/3hjqvw9

Tags (3)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report