← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

 

Le 10/04/2017 à 10:44, Tomasz Wlostowski a écrit :
> On 10.04.2017 09:18, jp charras wrote:
>>
>> Still remains serious issues in GAL mode about self intersecting and overlapping polygons after
>> creation or edition.
>> These issues exist since the beginning.
>> (They are not too hard to fix, because methods to fix them are written for the legacy mode, but need
>> a better knowledge I have to correctly manage undo/redo on GAL, due to the fact the number of
>> existing or new zones can change after cleaning or editing zones)
> 
> I don't think adding automatic zone splitting/merging in the GAL canvas
> (as in the legacy) will fix the problem in the long term, if we take
> into account that we need to import designs done with other tools. All
> of the software I've tried supports overlapping and self-intersecting
> zone outlines - therefore, the files saved by these programs may contain
> zones that Kicad will not handle correctly. Here's the solution I'd propose:
> - overlapping zones: the new connectivity algorithm does that ;-)
> - self-intersecting outlines: split to non-self-intersecting polygon
> when plotting. This way the gerber files exported by Kicad will be
> correct for all possible zone outlines.

Hi Tom,

- overlapping zones:
Should not create issues. This is more a usability problem:
Is it better to keep zones as separate entities, or better to merge them?
Each way has its advantages and drawbacks.

I do not have a strong opinion about overlapping zones (although you really can create strange things).

- self-intersecting outlines:
 * Usually create fill issue: just draw a butterfly in GAL and fill it: the result is not what one
can expect (only the half area of the zone is filled).
So *currently*, the filling algo need to be modified (a easy fix) but I am not sure it is the best way.
 * More strange shapes can be seen if a hole polygon intersects other holes or the main outline.
Just add a cutout to a zone, a cutout that breaks the parent zone into 2 zones!
(for instance a rectangular cutout that breaks into 2 separate areas its parent rectangular zone.)
The result is broken on GAL, ok on Legacy.
* And what is the meaning of a cutout area much bigger than its parent, and overlaps an other zone
bellowing the same net?

I still am of the opinion self intersecting outlines should be converted to non intersecting
outlines, and holes merged with main outline: it is much more easy to handle, both by code and by
the user.
Otherwise you can create really broken boards.

About plot files, I make a mistake:
only filled areas are plotted and they are strictly simple polygons.
And connectivity algo uses only filled areas.

Importing self intersecting polygons from other programs is a very minor problem, easy to fix.
We already fix many other incompatibilities.

> 
> 
>>
>> Note also usability issues in zones pop up menu (missing option to delete a cutout, and most
>> commands disabled when the zone tool is activated).
> We'll have a look, thanks!

Thanks.

> 
> Cheers,
> Tom
> 


-- 
Jean-Pierre CHARRAS


References