← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Reduction of Polygon Complexity

 

Hi Andreas,

I tested the patch with many boards and I confirm it reduces the polygon
complexity, without introducing any DRC violations. I would love to
merge it, but it is difficult for me to assess the risk of adding new
bugs, which are particularly not wanted during the feature freeze. If
Wayne says it is not the right time for such changes, then I am going to
merge your patch in v6-dev branch.

Cheers,
Orson

On 12/11/2017 11:16 AM, Andreas Buhr wrote:
> Dear Kicad developers,
> 
> when looking at the polygons generated by converting all copper layers
> to polygons, I found some very small segments. I further investigated
> these segments and the reason was that zones are inflated by adding
> segments with rounded ends to their boundary. The rounded ends are
> segmented into a specified number of segments. This was not aligned.
> Often, two of these half-circles lye on each other and are bool-added
> afterwards. This creates these small segments.
> 
> Find attached some code which aligns the segmentation. With the change,
> circles are always segmented the same way and two circles with same
> center and same radius have the same vertices in the generated polygon.
> 
> Generating all polygons for all copper layers of the Olimex A64 board
> resulted in 415312 vertices before. With this patch applied, this number
> goes down to 280378 vertices.
> 
> I hope you like it. Source code is clang-format-ed :-).
> 
> Cheers,
> Andreas
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References