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

Preserve document units in SVG export


Recommended Posts

When drawing elements to be cut on a laser cutter, setting up a document in mm is very helpful. Unfortunately, the common interchange file format for this kind of device is SVG. While the file format supports measurements in defined units, Designer converts to pixels during the export, which means that after import, the dimensions have to be recalculated.

Therefore, it would be great to have the option to preserve the units from the document during export, such that a 50x150mm rectangle is exported just as such.

 

Link to comment
Share on other sites

  • 1 month later...

Yes please!

 

I've run into this exact problem. Right now Affinity Designer can export with pixel dimensions (when "set viewBox" is unchecked) or with height="100%" width="100%" (when "set viewBox" is enabled). I'd like to have a third option, to set the height and width using the actual dimensions of the artboard, in either mm or inches. (Ideally one could choose the unit in the SVG export options, but just using the document units would also be acceptable.)

 

Otherwise one has to play the "guess what dpi setting the software on the other end uses" game, which is never fun. (And even worse is when you need to open your SVG in multiple programs, which all assume different default dpi settings.)

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 weeks later...

Can we please get this in 1.7? When using AD to generate designs for a laser cutter (or any other CNC machine) it saves a ton of time and frustration if the SVG has real units. There's nothing worse than wasting a $20 piece of wood (and who knows how much time) because I didn't notice that the SVG was scaled wrong.

Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...

I have found a workaround, of sorts: 

1. Set up the document units to pixels, and use pixel measurements in place of millimetres, e.g. if desired size is 100mm, make object 100px. 

2. Export the document using the export option in the file menu, select 'SVG (for web)'. Click 'More' for extra options. 

3.  Deselect 'Set viewBox'  and select 'Add line breaks'.  Export the file. 

4. Open the SVG file in a text/code editor and locate this line: 

<svg width="100px" height="100px" version="1.1"

5. Change the 'px' units to 'mm'. Save the document. 

6. Open the modified document in your desired software. 

This works with the software I have tested it with. 

Link to comment
Share on other sites

  • 8 months later...
  • 1 year later...

I'm in the same boat, and have been experimenting. What I've found is that if you set the resolution to 96 dpi and turn all additional options to OFF (deselected), the SVG will output at 100% size. I haven't tested that thoroughly, but I managed to get it to work on one of my projects. Please let me know if that works for you too.

Link to comment
Share on other sites

  • 4 months later...
  • 2 months later...
  • 3 weeks later...
  • 1 year later...

Same situation as the original poster; I bought Designer for the sole purpose of creating designs for laser cutting.

Some tips from my experience:

- I own a Glowforge, which expects 96 DPI (and some other settings in the SVG, like text converted to curves).  You can create an export template In AD to easily. See attachment for the required settings

- Most (all?) SVG files come with pixels as base unit. To change the units quickly, press "Z" for zoom, you can change the units in the settings there.

- When I save an SVG and reopen it later in AD, dimensions are mixed up. This is because AD imports the SVG as 72dpi, while it had saved it as 96dpi. To reinstate the correct measurements: File > Document Setup > Dimensions: DPI from 72 -> 96.

Hope this helps!

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.