Fill many small gaps in Inkscape

I traced a bitmap and after some tweaks I have what you can see in the image below (it’s a detail of the whole canvas). As you can see some small gaps exist in the middle of the PCB traces. All the image is a single path.

Is there a way I can fill/delete all these small gaps automatically, while not affecting the middle of those big circles?

A sample in SVG format can be found here.

enter image description here

Answer

Your file contains a sigle path, where the tiny holes and spurious white scratches are path borders just like all others.

If you select your huge path and call Path -> Break Apart, you will end up with many simpler closed paths, where the holes and scratches will also appear as paths.

At this point, if you call Path -> Combine you will get back to the beginning, where one path inside another will appear as a hole. Don’t to this.

Instead, with all the subpaths still selected, call Path -> Union. Voilá!

All overlapping holes and scratches will be merged with the bigger traces.

So the recipe is Break Apart and then Union.

Good luck cloning that PCB.

Attribution
Source : Link , Question Author : Gonçalo Ribeiro , Answer Author : Juancho

Leave a Comment