kicad-developers team mailing list archive
Mailing list archive
Re: Zone corner chamfers/fillets and CPolyLine
Le 14/02/2011 16:42, Marco Mattila a écrit :
I've been thinking about adding a zone option to chamfer/fillet zone
corners. The easy way seems to be copying the user-drawn m_Poly in
BuildFilledPolysListData, chamfering/rounding the new polygon as
needed, and using that polygon in the rest of the
BuildFilledPolysListData function. DRC should work ok if the same
polygon is used in the drc functions related to zones. Do you see this
as a useful feature?
What do you mean by "fillet zone corners" ?
While thinking about this I ran into CPolyLine which includes the
side_style property, which sounds like it could also be used for
corner rounding. However, it seems that it's not currently used and
that its implementation is broken (at least in MakeKboolPoly). So,
what's the status and purpose of the side_style? Is it just some old
code that's still just sitting there or are there plans to use it in
I think you are talking about using arcs in polygons outlines.
This code comes from FreePCB. I used FreePCB code to start zone by polygons feature.
Currently arcs are not handled in Pcbnew.
But I did not removed the code relative to arcs, just in case we want to use it in the future (but I am not working on).
Because this feature was never used, the corresponding code can be broken, of course.
For info, Currently KBool and Boost::polygon are both used in Pcbnew.
KBool was first used, but in rare cases KBool fails when generating filled zones areas.
So when Boost::polygon was mature (i.e. with no bugs) I used it to generate filled zones areas.
Until now I did not see bugs, and it is twice faster.
Boost::polygon has lot of advantages,
but cannot handle some calculations (for instance keep holes as separate polygons for complex zones outlines).
I am thinking both KBool and Boost::polygon have functions to chamfer polygons outlines. But I am not sure.