ID: | 4752 |
From: | rn...@igor2.repo.hu |
Date: | Sat, 27 Feb 2021 04:43:07 +0100 (CET) |
Subject: | [pcb-rnd] new: drc: invalid polygon detection |
Hi all, ever since PCB had polygon support, self intersecting polygons were invalid. It's a question of algorithm design and it is the nature of the algorithm used in the polygon lib in PCB and pcb-rnd. When configured with --debug, the code throws an assert whenever it detects an invalid polygon and in debug mode it makes a lot of checks (that's why the debug build is so slow with complex polygons). This is another thing that's always been like this. And the third thing that's always been like this is that most users are not aware of the self intersecting polygon limitation and even most 3rd party developers are unaware, so they write software that produce invalid polygons in file formats intended for pcb or pcb-rnd. Since most users use a production build, they don't get the assert and they think their polygons are fine - until something breaks randomly. They report the bug and when they send me the board file I immediately see it's the usual invalid polygon problem. That's literally what's happening 9 out of 10 times when I get polygon related bugreports. Since r34212, the stock drc config includes a new rule that checks every polygon object on the board and lists invalid polygons. Like any other DRC rule it will make running the DRC a bit slower, but at least it will help users of production builds (i.e. users not compiling from source) to catch the error in their data. The implementation added a poly_is_valid() function in the query() language, so independently of the DRC you can also search for invalid polygons using the query() action. And of course you can combine it into some more complex search expression. Best regards, Igor2
Reply subtree:
4752 [pcb-rnd] new: drc: invalid polygon detection from rn...@igor2.repo.hu