Jump to content

Is there a way to force curves to become paths when exporting to svg?


Recommended Posts

If you really, really want a <path> rather than a <rect>, you can set one or more corners to a small non-zero value. If you type 0.001 into the numeric control on the Context toolbar it will be displayed as 0% but the exported SVG file will include the desired 'path' element.

Alfred online2long.gif
Affinity Designer/Photo/Publisher for Windows 1.9.2 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.9.2 • Designer for iPad 1.9.2 • iPadOS 14.4.2 (iPad Air 2)

Link to post
Share on other sites

What’s the problem with rectangles instead of paths if they are essentially just rectangles anyway?

I'm saving the path strings to a database and it would save me time not having to manually convert rects to paths.

... and I know Illustrator has that ability and I like Designer more so I thought I'd ask.  :)

Link to post
Share on other sites

If you really, really want a <path> rather than a <rect>, you can set one or more corners to a small non-zero value. If you type 0.001 into the numeric control on the Context toolbar it will be displayed as 0% but the exported SVG file will include the desired 'path' element.

Interesting approach. I'll go with that until there is a 'convert to curve' option somewhere.

Thanks for the help.  :)

Link to post
Share on other sites
  • 2 years later...

Chiming in..

I need this for the exact same reason. I'm saving polygon points to a database. I don't know what was available in 2017, but nowadays there is a "Convert to curve" function. If I convert a rect to a curve it shows up as "(curve)" in the layer browser. But AD still exports those as rect in the SVG if they are rectangular. I suppose this is a great optimization for the created SVG, but I would rather decide this myself.

Is there any way to do this in 2020 without using Alfred's hack?

Link to post
Share on other sites

I just discovered another hack.

1. draw a rect

2. convert to curves

3. add another node on one of the lines (without altering the line)

When this is exported to SVG, the curve will be exported as a path and the extra node will be removed. I suppose the removal of the node is a reasonable optimization.

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 there is currently a delay in replying to some post. See pinned thread in the Questions forum. 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.