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

  • Please provide SVG file or some context: Are the traces and the holes a single path or 2 overlapping paths?
    – Juancho
    Dec 12 '16 at 13:13
  • @Juancho I edited my question and now provide a SVG file. Thank you. Dec 12 '16 at 21:46
  • Have you tried to use the node editor (F2), select the nodes which are delimiting these gaps and deleting them? Dec 12 '16 at 22:49
  • @PaoloGibellini Yes, deleting the delimiting nodes instead of filling does indeed work. Yet, a somewhat automated way to delete them is desirable, because there are so many of them. Dec 13 '16 at 0:02
  • There are not so many nodes... but you can also increase border size and convert the border to path. Or follow @Juancho answer, which is perhaps the fastest way. Dec 13 '16 at 7:41

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.

  • Your solution closes the scratches. But unfortunately it also closes the holes, which I wish to keep in this case. This time I'm not cloning a PCB, btw. This is to use as part of some promotional material. If it was for cloning, losing the holes would be perfectly fine :) Dec 13 '16 at 1:22
  • You can add by hand the holes, using circles and performing a difference. Dec 13 '16 at 7:43
  • @PaoloGibellini Yeah, that would work. Selecting the holes is much easier than selecting the scratches, so I think this is a good enough option. Thank you. Dec 13 '16 at 15:35

A rough way to elliminate only the scratches but not the holes is to superimpose 2 slightly offset versions of the whole path:

Select the path, duplicate it (Ctrl-D), offset the duplicate a couple of pixels down (or down and to the right if you have vertical scratches). Offseting the duplicate can be done with Alt + arrows.

Now select both the original and the duplicate, and do Path -> Union.

Your holes will shrink a bit, your traces will grow a couple of pixels, and maybe some part of a scratch remains, but most should be gone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.