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

SVG export, still not fixed


M44

Recommended Posts

Bug:
When the document is exported to SVG format, the units and values are compromised

Proposed Solution: 
Respect the unit configuration in the document setup, and don't do any conversions, just export the values as they are in the document.

Description:
When the document setup has units set to mm, the exported SVG defines the dimensions in pixels. Actually regardless of any setup, the export of SVG is in pixels. It's frustrating that there is no DXF support, so can you at least fix the SVG dimensions to export in proper units? I've tried every combination of export SVG "more" options, but no luck. 

Technically what seems to be happening is that you are calculating the pixels based on the document DPI setting and making a viewBox with the most awkward "user coordinate system" that is in pixels derived from the DPI against the unit used. Honestly, DPI should have nothing to do with this, and it seems that this DPI setting in Affinity Designer is unnecessarily creating problems where it shouldn't be, here and in other places.   

What is concerning is if you import an SVG from another application that has mm units, it is imported with the expected identical structure. When you use the export provided by Affinity Design, and then reimport it to the same program, it is not identical, but rather distorted in very strange ways. Clearly his is a side effect from the erroneous unit conversions. 

Comments:
Do you understand how much easier it would be for you to simply skip the DPI and skip the calculations and just give straight 1:1 unit definition in the xml output? It really seems that you are overcomplicating the situation and doing unnecessary conversions, which even if they did coincidentally match up with the current DPI, would still be slightly off due to the floating points that are being rounded. You do realize that SVG has built in unit support right? You can explicitly set all dimensional properties in mm (height="20mm") 

bug.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Thank you for this consideration.

This item has been marked as fixed in the past, but was not. This is actually very crucial to my workflow. Of course nagging for something to be fixed is not the most effective way to get things done, but having created a tremendous amount of work in affinity designer that now needs to be used in production is not a possibility, I am stumped as to how to move forward.

It's not like I can just use another program at this point, I am stuck within Affinity Designer and there is no way to even export the work at all to retain its proper dimensions.

If you take a moment to think about my scenario, you too would agree that something like this is mission critical, and completely blocking from moving forward or using a workaround.

If I could I would, and spare you the whining, but I cannot, and it really does not appear like it would be any work at all on your part to do, since this is actually just exporting units as is, without additional modification.

Link to comment
Share on other sites

  • 3 weeks later...
On 4/14/2021 at 11:09 PM, M44 said:

needs to be used in production is not a possibility, I am stumped as to how to move forward

It's going to be painful, but you can load your svg files into Inkscape (which is free) and export from there to have your mm units. Your export settings from Affinity need to be correct to load in at the proper sizes:

https://forum.affinity.serif.com/index.php?/topic/109961-export-svg-wrong-size/&do=findComment&comment=727443

In fairness to Serif, you are using the wrong tool for the job - it's a vector art package, not a CAD drafting program.

Link to comment
Share on other sites

Of course that is not a solution, and it's no secret to just use other software for some features or entirely, that's not the point. I am using this software, and this bug is a major bug. To be honest with you, that is not fair at all, this is a straight up bug and regardless of how this software is used, should work as expected. Otherwise, why are unit changes available in the first place? This is definitely not limited to CAD usage, and this software is targeted for people who design vector art graphics and media for print, and when used in this matter, some need elements to be a certain physical size when printing and that is more than reasonable to expect.

Link to comment
Share on other sites

 

11 hours ago, M44 said:

this software is targeted for people who design vector art graphics and media for print

That was my point, a pdf is the standard format for print work so those people wouldn't be looking to export a mm-unit svg.

11 hours ago, M44 said:

To be honest with you, that is not fair at all, this is a straight up bug and regardless of how this software is used, should work as expected

What specific software are you loading your svg files in to? Unless it refuses to load files defined in pixels then you should be able to work directly with the files from Affinity without having to convert them with other software first.

This point about units in the export has been raised a few times before, it's on Serif's radar. I wouldn't pin your hopes on anything happening with it soon. If you have as you say loads of files that you have to work from then you just need to find the way of exporting that works. My earlier linked post might help with that.

Link to comment
Share on other sites

  • 8 months later...

I opened a nice graphical flourish that had previously been saved as an AI file.  Initially I opened it with Designer and saved it back out as a SVG and then tried to open it in LaserGRBL, it looked shocking.  I then opened the same flourish in Inkscape and again saved it back out as an SVG and once more opened it in LaserGRBL.

When opening the Designer's SVG it was dreadful and that is putting it politely.  The Inkscape SVG however displayed perfectly.

What is going on.

Base Unit: I5 (10th gen.), 6 cores, 12 threads, 24GB Ram, 256GB SSD (Boot), 1TB HDD, Intel 630 (Graphics), Colour Calibrated Monitor and Printer (Courtesy of X-Rite Hardware) - Running MacOS Monterey

Laptop: I5 (6th Gen), 8GB Ram, 128GB nvme, Intel 520 Graphics, Colour calibrated screen(Courtesy of X-Rite Hardware) - Running MacOS Monterey.

Server: i5 (4th Gen). 16GB Ram, nVidia GT 730 (Graphics), 500GB SSD (Boot), 2TB & 1TB HDD (General storage), Running MacOS Catalina
 

Link to comment
Share on other sites

12 hours ago, ashf said:

Please elaborate. otherwise we don't understand what's the problem.
Screenshot? example?

As can be seen, both vectors are created in designer and inkscape.  both exported as SVGs.  However when I import them into LaserGRBL the Designer one is all messed up.  This is consistent as I have tried it using the same workflow with multiple vectors.  My gut feeling is that Designer is trying to force the SVG to be saved using pixels rather than the document setting of millimetres.  Given files created using Inkscape always work flawlessly, I can only presume it is a problem with the way Designer is saving them and not a problem with LaserGRBL (even if its SVG import is still experimental).

designer-inkscape images.jpg

lasergrbl images.jpg

Base Unit: I5 (10th gen.), 6 cores, 12 threads, 24GB Ram, 256GB SSD (Boot), 1TB HDD, Intel 630 (Graphics), Colour Calibrated Monitor and Printer (Courtesy of X-Rite Hardware) - Running MacOS Monterey

Laptop: I5 (6th Gen), 8GB Ram, 128GB nvme, Intel 520 Graphics, Colour calibrated screen(Courtesy of X-Rite Hardware) - Running MacOS Monterey.

Server: i5 (4th Gen). 16GB Ram, nVidia GT 730 (Graphics), 500GB SSD (Boot), 2TB & 1TB HDD (General storage), Running MacOS Catalina
 

Link to comment
Share on other sites

I've cracked it - turning off the 'set viewbox' setting in the export options did the trick.

Base Unit: I5 (10th gen.), 6 cores, 12 threads, 24GB Ram, 256GB SSD (Boot), 1TB HDD, Intel 630 (Graphics), Colour Calibrated Monitor and Printer (Courtesy of X-Rite Hardware) - Running MacOS Monterey

Laptop: I5 (6th Gen), 8GB Ram, 128GB nvme, Intel 520 Graphics, Colour calibrated screen(Courtesy of X-Rite Hardware) - Running MacOS Monterey.

Server: i5 (4th Gen). 16GB Ram, nVidia GT 730 (Graphics), 500GB SSD (Boot), 2TB & 1TB HDD (General storage), Running MacOS Catalina
 

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

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.