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

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 spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
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 comment
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 comment
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 comment
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 comment
Share on other sites

  • 1 year later...
On 5/7/2020 at 4:15 PM, msageryd said:

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.

Having to do this to every circle and rectangle in a complex design is... unpleasant :(

Saving as Optimised SVG from Inkscape works, but I don't think/know if there is a way to quickly script that to handle a batch folder of 100's of images.

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.