SVGnest icon indicating copy to clipboard operation
SVGnest copied to clipboard

Avoid to fill the holes

Open alexzaganelli opened this issue 6 years ago • 3 comments

Hi all,

let me say, this repo is awesome!! Is there a way to maintain unfilled the holes? Let me show an example:

This is the source: test_svgnest_svg

This is the result: svgnest-output__6_

Thank you in advance

Ps. I can pay a pizza, for a fast work

Greetings from Italy 🇮🇹🍕

alexzaganelli avatar Apr 28 '18 20:04 alexzaganelli

ah this is actually not that trivial, I'll have a look when I have some time : ]

Jack000 avatar Apr 28 '18 21:04 Jack000

Any updates on this issue? It seems that any form of compound paths gets filled with black.

mxaGianluca avatar Oct 15 '18 10:10 mxaGianluca

I wanted to give an update on this issue, depending on your use-case this might (or might not) work for you.

If you look in svgparser.js on line 59 you see the method this.recurse(this.svgRoot, this.splitPath). This is a function designed to split up compound paths. If you comment this line out it should work.

I'm not sure if it has any implications for your implementation but for me this fixed it.

mxaGianluca avatar Oct 17 '18 15:10 mxaGianluca