Jump to content
You must now use your email address to sign in [click for more info] ×

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

Link to comment
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

------
Windows 10 | i5-8500 CPU | Intel UHD 630 Graphics | 32 GB RAM | Latest Retail and Beta versions of complete Affinity range installed

Link to comment
Share on other sites

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
Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

  • Staff

 

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.

Link to comment
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!

 

Link to comment
Share on other sites

  • Staff
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.

Link to comment
Share on other sites

  • 2 months later...

For the record, CorelDRAW 2020:

image.png.7a9661d2bf2c7651c6c7b6f34d288cbd.png

  • "The user interface is supposed to work for me - I am not supposed to work for the user interface."
  • Computer-, operating system- and software agnostic; I am a result oriented professional. Look for a fanboy somewhere else.
  • “When a wise man points at the moon the imbecile examines the finger.” ― Confucius
  • Not an Affinity user og forum user anymore. The software continued to disappoint and not deliver.
Link to comment
Share on other sites

  • 1 month later...

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

Terms of Use | 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.