Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Split horizontal silk lines in gullwing generator #354

Open
evanshultz opened this issue May 13, 2019 · 1 comment
Open

Split horizontal silk lines in gullwing generator #354

evanshultz opened this issue May 13, 2019 · 1 comment

Comments

@evanshultz
Copy link
Collaborator

KiCad/kicad-footprints#1595 is an example where the latest checks by Travis are causing an error because the silk is mirrored around the X axis so the horizontal silk lines are split into a left and right part in all footprints.

There is a clear reason to split the lines if it will encounter copper, like this:
image

But there's no reason to split the lines on most of the footprints, for example this one:
image

This is happening because the points for the silk line are a polygon built up for the right side and then mirrored to the left side.

It should be possible to only do this when required (if the EP size sticks outside the silk line area) and otherwise use a single set of points for both sides. The real advantage is making the footprint files just a bit smaller. And possibly if there's a footprint not worth scripting because of complexity, the silk is a bit easier to manipulate if it's not split. (Making CI not whine is a side benefit and not a real advantage to me.)

I don't have time to look into this more right now but it shouldn't be too tough to implement.

I believe this applies to other generator scripts but I didn't look at them yet.

@poeschlr
Copy link
Collaborator

poeschlr commented May 14, 2019

In some cases there simply is a tradeoff between easy to understand code and small annoyances for the footprint. The current solution takes about 150 lines of code just to handle the cases that are possible right now. Without mirroring i suspect this to double and if we want to still handle non overlap of the EP it might even triple (and that would assume that my new cut functionalists are used). In fact i think it was about 4 times as much code before i simplified it by using mirroring.

I also don't get why travis should complain here. There is no illegal overlap so that test must not work correct.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants