kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #18467
Re: on incorrect polygon behavior
On 02.06.2015 20:32, Wayne Stambaugh wrote:
>> > I'm almost done with SHAPE_POLY_SET class for the geometry library, a
>> > Clipper wrapper adding some missing Clipper features needed in Kicad
>> > (e.g. polygon fracturing). I'll send a patch soon (affecting only
>> > AddClearanceAreasPolygonsToPolysList), so that we can compare how well
>> > it performs wrs to Boost.Polygon.
>> >
>> > Cheers,
>> > Tom
> Great work Tom. Thanks.
>
> Wayne
>
Hi,
It took me a bit longer than initially anticipated to write the
fracturing (polygon with holes -> single outline conversion) algorithm
that was missing in Clipper. I managed to generate correct zones and the
algorithm does not crash on the test cases that were crashing
Boost.Polygon. My plan is now to:
- clean SHAPE_POLY_SET code and send the patch asap (perhaps Monday, I'm
out for the weekend),
- optimize fracturing, which is taking most of the calculation time. To
my surprise, Clipper performs calculations faster than BPL,
- look into possibility of having a single polygon set class, merging
the functionality of CPolyLine, CPOLYGONS_LIST and all BPL-derived classes,
- keep "fallback" BPL zone code which could be switched on in the
preferences.
- add an option to dump zone geometry (outline, holes, thermals, full
poly) to a text file while refilling zones.
The last two options are temporary - to gather confidence in Clipper,
compare the performance of BPL/Clipper and, in case of trouble, obtain
test cases for both backends.
Cheers,
Tom
Follow ups
References