SVG files contain units and are inherently scaled - fusion 360 ignores this on import

SVG files contain units and are inherently scaled - fusion 360 ignores this on import

kedugger
Observer Observer
1,343 Views
6 Replies
Message 1 of 7

SVG files contain units and are inherently scaled - fusion 360 ignores this on import

kedugger
Observer
Observer

Its seems Fusion360 handles svg file scaling poorly.    It does some weird guess at the scale of the file despite the fact that svg files contain units and scale information.  Literally every other CAD program I have used seamless uses and handles the embedded scale data in the svg file.  But for some reason Fusion 360, a leading CAD program, somehow can't use this data.  The explanations are about dpi and OS dependent data, and that that information is favored for some reason even though an SVG file is primarily vector data and pixel independent. 

 

The current process for importing svg files is:

 

-Import the file

-The file comes in too small and guesses at the scale don't help.

-Open the measure tool.

-Measure a known segment

-Manually calculate the scale factor from the measured segment to the desired size.

-Undo the import (forced to completion by opening the scale tool)

-Reimport the svg file 

-Add the scale factor from the previous calculation

 

My last import the scale fix factor was:  3.xxx-xxxxxxxx 

 

I feel a bit of insanity doing this knowing that fusion360 is leading software in this space and every other software does this better.  (Easel, Sketchup, Shapr3d, Blender)

For those software packages importing goes like this:

-Import the svg
-it comes in at the scale designated in the file.

 

Please change this and compete in this area.  This is a pain point and it really sucks to have to work around this this way.  

0 Likes
1,344 Views
6 Replies
Replies (6)
Message 2 of 7

Warmingup1953
Advisor
Advisor

Can you share an (example) .svg file noting what software created it and the dimension in your "units of measure" you assert it to be?

0 Likes
Message 3 of 7

g-andresen
Consultant
Consultant

Hi,

I don't think you can expect a CAD application to be able to import different SVG interpretations from graphics applications without errors.
This will not change as long as the applications are not able or willing to agree on comprehensive standards.

 

günther

0 Likes
Message 4 of 7

MRWakefield
Advisor
Advisor

It seems to work correctly for me with a couple of my test files (mm and Inch). If you can attach some examples that don't work with Fusion we can take a look. I'll be off to bed soon so I might not be able to look at it until tomorrow morning but I'm sure someone else will.

If this answers your question please mark the thread as solved as it can help others find solutions in the future.
Marcus Wakefield


____________________________________________________________________________________
I've created a Windows application (and now Mac as well) for creating custom thread files for Fusion. You can find out about it here. Hope you find it useful.
If you need to know how to offset threads for 3D printing then I've created a guide here which you might find useful.
If you would like to send me a tip for any help I've provided or for any of my software applications you've found useful, you can do this via my Ko-Fi page here.
____________________________________________________________________________________

0 Likes
Message 5 of 7

kedugger
Observer
Observer

Inkscape (Inkscape 1.2.2 (732a01da63, 2022-12-09)), Windows 11

I've attached the most recent file I tried. 

 

So I should probably clear up some confusion.  Up until posting just now I had assumed the feature was designed this way (doesn't observe scale).   I come to this conclusion from two things.  I have only personally ever had it fail, and I've tried at least 10 different files.  All of these imported fine in Easel for instance.  And after googling:  "svg files don't come in to scale in fusion 360"  I found numerous articles showing (some from Autodesk) showing work arounds and describing justification for the "feature" or lack thereof as an issue with dpi settings and OS specific data.  I assumed from this that it just didn't work they way I expected and thus the post.  So I came into this post with that state of mind.  So sorry about that.

 

I was encouraged by you all acting surprised by my allegation and expressing an expectation that this should work, so I tried a few things.

 

I've been importing the svg while in sketch mode and that is when I see the scaling issue.   I have only ever tried it that way.  I never thought to do it any other way.  When tried to import out of sketch mode the svg does import to scale.   So my apologies if I've been doing this wrong and expecting this to work.  I'm happy to learn the right way to do this.  Or maybe this is a bug?

 

I did look at the svg file format and do realize that the units are there at the beginning.  

<svg
   width="210mm"
   height="297mm"
   viewBox="0 0 210 297"
...
 
I also learned that the dimensions for each object in an SVG are actually in pixels!  That is crazy.  It seems like a really weird decision considering that its primarily intended to be a vector file format.  I would not have assumed any pixel or OS dependencies in a file format that has the purpose of being a vector format.  And that does make this problem harder to solve from a  development perspective.  I created the file on the same system that is running fusion360.  I hope this helps.
0 Likes
Message 6 of 7

MRWakefield
Advisor
Advisor

If the SVG files are interpreted differently depending on whether you're importing them inside or outside of a sketch then I'd say that sounds like a bug.

 

I have to admit that I try to avoid using SVG for any CAD work unless it is something 'arty' and it is unavoidable as it is too problematic (not just in Fusion btw). To the best of my knowledge SVG was originally created for online viewing, i.e. in an on-screen browser. The default format is pixels (which makes sense if it's intended for on-screen viewing) but as you know it does support other units. I believe the format is very 'loose' with many options and alternative ways of describing the same geometry and is difficult for application developers to support fully. If you try various SVG's in different applications you will find varying degrees of compatibility. You're usually better off using DXF if you want to import 2D geometry.

 

I don't know whether the example SVG that you posted is typical of the kind of thing you're importing but designs like this are much better done within Fusion using the native sketch elements.

 

Hope this helps.

If this answers your question please mark the thread as solved as it can help others find solutions in the future.
Marcus Wakefield


____________________________________________________________________________________
I've created a Windows application (and now Mac as well) for creating custom thread files for Fusion. You can find out about it here. Hope you find it useful.
If you need to know how to offset threads for 3D printing then I've created a guide here which you might find useful.
If you would like to send me a tip for any help I've provided or for any of my software applications you've found useful, you can do this via my Ko-Fi page here.
____________________________________________________________________________________

0 Likes
Message 7 of 7

MichaelT_123
Advisor
Advisor

Hi Mr MRWakefield, Fellows

 

The SVG is a pretty old format specified within the Extensible Markup Language paradigm (XML). Its specification is drafted by the World Wide Web Consortium (W3C - https://www.w3.org/TR/SVG2/) . It is flexible, and many XML object representations can be tailored to specific needs. It can be stripped to bare necessities or complemented with numerous markup tags (e.g., units).

Most serious software interpreting the SVG (like web browsers, graphics software) deals with the format without a hitch. 

F360 .... ??? ... shows from time to time ... bipolar behaviour ... as Mr MRWakefield pointed out in the sentence:

"If the SVG files are interpreted differently depending on whether you're importing them inside or outside of a sketch then I'd say that sounds like a bug."

 

There are also some other examples of SVG mishandling documented on the Forum.

Yes, from CAD/Fusion perspective, SVG is some kind of the outcast.

 

Nevertheless, it would be applauded if TF360 looked at the current SVG specification draft ... and corrected/enhanced its own SVG/XML format interpreter(s)

 

Regards

MichaelT

 

MichaelT