WebSVG / voronoi

Parametric Voronoi generator with real time editing and SVG export
https://voronoi-editor.web.app
173 stars 26 forks source link

SVG path shaped area import error #31

Open wassfila opened 1 year ago

wassfila commented 1 year ago

Discussed in https://github.com/WebSVG/voronoi/discussions/30

Originally posted by **Josseflos** February 7, 2023 Hi there, I am trying to import a SVG file in the Voronoi web editor (Chrome), but keep receiving the same error: "only supported import of SVG with a single path on the top level". I am using Inkscape to create a SVG and am making sure that the file is a single path on the top layer, but even when plucking simples shapes from the internet, the error comes up. Does anyone know what could go wrong, or could anyone share a file that works, so I can compare it with other files? Thanks in advance! Jos
wassfila commented 1 year ago

Hi, on the menu Shape "select" dropdown, there are some examples, those files are in the data folder https://github.com/WebSVG/voronoi/tree/master/data I was thinking of enhancing to get rid of that limitation, that would require svg rework and simplification.

If you post the examples you tried with and did not work here, I can try to check why they did not work.

Josseflos commented 1 year ago

Hi Wassim,

Thanks for your quick response! I was aware of the examples in the dropdown menu, but I overlooked the data folder... I have compared the files in there with mine, and the issue I had was that my path was part of a layer, instead of being a standalone object. This was confusing to me since I thought an object would always be part of a (top) layer. It works perfectly now, even with a slighty more complicated figure (see below).

Thanks for the tool anyway! I love the features and freedom you have.

Lizard

wassfila commented 1 year ago

Thanks for the tool anyway! I love the features and freedom you have.

Glad you liked it. I'll keep this open as an improvement as I think searching for the first path and using it should not be difficult.

wassfila commented 1 year ago

funny, modern art by mistake

image