← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] No more boost::polygon in Kicad

 

On 14.07.2015 11:44, jp charras wrote:
> Le 13/07/2015 23:46, Tomasz Wlostowski a écrit :
>> Hi,
>>
>> We've pushed a branch [1] to Launchpad, which removes remaining
>> Boost::polygon-based code from Kicad. The patch affects several features
>> of pcbnew - we need your help to test it as extensively as possible:
>> - zone filling calculations (both with segments and as solid polygons)
>> - dead copper removal in zones (also touches ratsnest, in both views)
>> - 3D viewer
>> - DXF board outline export
>> - plotting zones, solder mask layers and board outline
>> - VRML export.
>> The only program that still uses BPL is bitmap2component.
>>
>> Going into technical details, the patch extends SHAPE_POLY_SET with
>> remaining features of CPOLYGONS_LIST (+ point inside polygon check) and
>> replaces all CPOLYGONS_LIST instances except the m_CornersList member of
>> CPolyLine class. We didn't touch the CPolyLine class yet, although the
>> next item on the list would be porting CPolyLine::Chamfer/Fillet/Hatch
>> methods to SHAPE_POLY_SET and come up with a single, universal polygon
>> set class.
>>
>> We've also removed a number of lines of code that became obsolete - for
>> instance the functions for converting between boost::polygon, Clipper
>> and CPOLYGONS_LIST or implicit polygon slitting done with Boost (now a
>> single call of SHAPE_POLY_SET::Fracture), so in the end Kicad lost a bit
>> of weight ;)
>>
>> Many thanks to Orson for testing & helping myself with Bazaar.
>>
>> Cheers,
>> Tom
>>
>> [1] https://code.launchpad.net/~orsonmmz/kicad/depolygonized
> 
> Thanks to Orson and you.
> 
> I tested this version with a few boards (basic and very complex)
> 
> Time to fill zones and rebuild the 3D scene is roughly the same as the
> current version (sometimes faster, sometimes longer, but comparable).
> 
> However, I have 2 boards where the copper zones filling does not work.
> (zones not filled)
> 
> There is also issues when combining a cutout area with the existing
> outlines of a given zone:
> When the cutout outline intersect the main outline, the cutout area
> outside the main outline is filled.
> The cutout area outside the main outline should be removed:
> the cutout area is not a keepout, just the area which should be removed
> (subtracted) from an existing zone, and any area outside the initial
> zone should be removed.
> When a cutout zone is added to an other cutout zone and overlaps it
> (inside a main zone outline), the merging of these 2 zones is incorrect
> and gives strange result.
> 
> This is easy to test using non copper zones.
> 
Thanks, I'll check this later (I'm also seeing the slow 3D viewer issue
observe first by Blair)

Tom



Follow ups

References