kicad-library-utils icon indicating copy to clipboard operation
kicad-library-utils copied to clipboard

New EC for duplicate graphic elements

Open diggit opened this issue 9 years ago • 3 comments
trafficstars

It can easily happen when you are copying same parts of symbol.

  • SIMPLE - check for g. elements with same points

or

  • COMPLEX - find all overlapping lines no matter of what are they part of (polyline, rectangle), no matter of their length

What do you think?

diggit avatar Jul 10 '16 15:07 diggit

I think that the SIMPLE options is a good start, and would be worlds easier to implement.

If you have the time and inclination to implement the COMPLEX option, then go for it, although I can see that raising a lot more false-positives than the SIMPLE one.

SchrodingersGat avatar Jul 10 '16 22:07 SchrodingersGat

This looks like a similar challenge than https://github.com/KiCad/kicad-library-utils/pull/286 I think that the code in there can be easily adopted to work for symbols as well. Is anyone aware of a (real) symbol with this problem that I can use for testing?

cpresser avatar May 05 '19 20:05 cpresser

I recall seeing a few PRs I merged recently with overlapping or duplicate stuff. I don't recall all the details but I searched a few keywords and they may help:

  • https://github.com/KiCad/kicad-symbols/pull/1683
  • https://github.com/KiCad/kicad-symbols/pull/668

I could make up a test case if you're looking for one. What did you have in mind to cover?

Note that a polyline and rectangle could overlap. Or the points in a polyline could be in reverse order. Perhaps other geometries can cause duplication of elements with no visual change as well. So doing this thoroughly won't be the same as checking for duplicate lines.

evanshultz avatar May 06 '19 16:05 evanshultz