Jump to content
wolfend

Simple SVG file not interpreted correctly on open

Recommended Posts

Affinity Designer 1.8.3

See the attached SVG file. If i open it with other apps, e.g., Google Chrome, Inkscape, LightBurn, it opens correctly. See the attached screen captures from each of those apps and note the the path I indicate. When opened in Affinity Designer, the path indicated is incorrectly positioned as shown in the screen capture from it. I did a "select all" to highlight all of the elements of the drawing. Should be easily reproducible.

chrome.PNG

inkscape.PNG

AffinityDesigner.PNG

Lightburn.PNG

GiftBox.svg

Share this post


Link to post
Share on other sites

This SVG is not so simple. Attached you'll find a view from Illustrator CS6.

If you look at the code at the beginning:

<svg xmlns="http://www.w3.org/2000/svg" width="145.316mm" height="196.500mm" viewBox="156.342133 53.750008 145.315765 196.500000">

you see that the start origin is not 0 0, so Illustrator interprets the start origin better than AD, but not in place like in Inkscape.

illustrator-svg.jpg

Share this post


Link to post
Share on other sites
Posted (edited)

Hi there,

I've got a similar problem on 1.8.3 641 with an SVG exported from https://www.mathcha.io/editor where the exported formula uses a square root (any root for that matter). Try sqrt(a+b) for example.
Importing the resulting SVG into Firefox or IE displays it just fine. Importing it into AD however shifts the root symbol to align with the top of the canvas.

Export:
https://imgur.com/a/rjl5ceq

Result:
https://imgur.com/a/tS8aWhy

Would be nice to have a fix for this. :)

 

Edit:
Could this topic be related?

 

Edited by polynaught

Share this post


Link to post
Share on other sites

This SVG was created by the LightBurn app. This is the program I use to drive my laser cutter/engraver. The workflow that I need starts with a collection of existing DXF files. Lightburn ingests these fine and I use them to cut work, in this case a small gift box from heavy paper stock. I need to get this vector data into AD, where it is the basis for creating artwork that is printed on the paper stock before scoring and cutting on the laser. AD does not import DXF, but LIghtBurn exports SVG, which AD is supposed to be able to ingest, so I was hopeful this approach would work. Some of the SVG files created in this way do open in AD OK after being exported from LightBurn. I can deal with scaling and viewport issues (like in the AI example above and I see when AD exports SVG) but when a vector path segment is randomly misplaced like in the example, and all the other apps I have tried interpret the file correctly, it seems like something basic is broken in AD SVG. I don't know if it is related the the issue that polynaught points to, but it is a bit scary if it is and years later the problem persists.

Share this post


Link to post
Share on other sites

BTW, I can get the vector data from the DXF files into AD using CloudConvert to convert them to PDF first, but I was hoping not to have to add this step to the process.

Share this post


Link to post
Share on other sites

I had an email exchange with the developer of mathcha.io and they believe AD does not handle nested features correctly. When I open their SVG files they make use of lots of nested <g> tags.
That however is nothing I see in your SVG file, wolfend. So that could be two different problems here.
All in all SVG import seems to have long standing issues in AD.

Share this post


Link to post
Share on other sites

 

4 hours ago, wolfend said:

This SVG was created by the LightBurn app. This is the program I use to drive my laser cutter/engraver. The workflow that I need starts with a collection of existing DXF files. Lightburn ingests these fine and I use them to cut work, in this case a small gift box from heavy paper stock. I need to get this vector data into AD, where it is the basis for creating artwork that is printed on the paper stock before scoring and cutting on the laser. AD does not import DXF, but LIghtBurn exports SVG, which AD is supposed to be able to ingest, so I was hopeful this approach would work. Some of the SVG files created in this way do open in AD OK after being exported from LightBurn. I can deal with scaling and viewport issues (like in the AI example above and I see when AD exports SVG) but when a vector path segment is randomly misplaced like in the example, and all the other apps I have tried interpret the file correctly, it seems like something basic is broken in AD SVG. I don't know if it is related the the issue that polynaught points to, but it is a bit scary if it is and years later the problem persists.

Thanks for that I'll get this passed on to development. There have been some SVG fixes made in 1.8.4, but unfortunately your file is still importing correctly.

1 hour ago, polynaught said:

I had an email exchange with the developer of mathcha.io and they believe AD does not handle nested features correctly. When I open their SVG files they make use of lots of nested <g> tags.
That however is nothing I see in your SVG file, wolfend. So that could be two different problems here.
All in all SVG import seems to have long standing issues in AD.

Hi polynaught,

I've just tried that equation exported from Mathcha in both 1.8.3 and the 1.8.4 Windows beta as there have been some SVG fixes. Those fixes have corrected the issue with that export, and that equation is now opening correctly for me in 1.8.4.

Share this post


Link to post
Share on other sites

Sean P,

Thanks! I assume you meant that my file is still not importing correctly. 

The capability for AD to import/export DXF files directly would alleviate much of this messing around. I suspect that is a long standing AD feature request that just doesn't make the cut, but it does not hurt to mention it. Thanks again!

 

Share this post


Link to post
Share on other sites
4 minutes ago, wolfend said:

Sean P,

Thanks! I assume you meant that my file is still not importing correctly. 

The capability for AD to import/export DXF files directly would alleviate much of this messing around. I suspect that is a long standing AD feature request that just doesn't make the cut, but it does not hurt to mention it. Thanks again!

 

Unfortunately it was your file that is still not importing correctly!

DXF support is a much requested feature, so it is definitely something we would like to explore.

Share this post


Link to post
Share on other sites

For the record, CorelDRAW 2020:

image.png.7a9661d2bf2c7651c6c7b6f34d288cbd.png


I gave up using Designer for hobby use - a "professional" vector drawing program without actual vector features. Customers waiting for five years in vain is more than any company can ask for. Maybe if Affinity Designer 2.0 gets real and advanced vector features I can use it. Until then... I am a customer, a potential upgrader and an active observer with an opinion. Currently I am slowly finishing a project I started in Designer.

Further... give up and please hire an UX (usability designer), Serif. It is how professional software is made in this century.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.