svgo icon indicating copy to clipboard operation
svgo copied to clipboard

create svg middle path

Open cyber-ai-dep opened this issue 9 months ago • 1 comments

I have two SVG files, one of which contains an outline-like path, where each closed shape is represented as a single continuous path. I want to generate a new path that accurately follows the centerline of each shape and fills it accordingly. The desired result should match the red path shown in the reference image. Do you have any suggestions for achieving this automatically using software applications or by writing a custom program?

Image

cyber-ai-dep avatar Mar 20 '25 07:03 cyber-ai-dep

It's actually a hard enough math problem. I'm not sure whether it solved anywhere. Perhaps something like shrink path by value (somehow found) in some editor may help, but that can lead to unexpected result. Basically, one need to redraw the image, maybe with the help of some tools.

GreLI avatar Mar 25 '25 00:03 GreLI

Sorry @cyber-ai-dep, but I don't have the solution for you either!

This question seems more fitting for Stack Overflow or graphicdesign.stackexchange.com, though. Perhaps posting your question in one of those?

Especially graphicdesign.stackexchange.com would be good, which isn't as big as Stack Overflow, but is active enough, and still has a dedicated [svg] tag. 👍

SethFalco avatar Jul 09 '25 21:07 SethFalco