← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

 

On 10.04.2017 09:18, jp charras wrote:
> Le 10/04/2017 à 08:39, Nick Østergaard a écrit :
>> Hi JP,
>>
>> Yes I can confirm that it seems to work now, but since you mentioned
>> that it was not fixed properly yet, I thought it was worth
>> highlighting in this thread. Are unittests missing here for the
>> geometry library or is this on a higher level?
> 
> About SEG class, unittests works.
> 
> It is more the fact when using a SEG class, you can now modify an other entity without clearly
> notice in your code the other entity will be modified, by side effect, because now the SEG class
> stores a reference to the other entity, not a copy of values.
> 
> It is this side effect I do not like.

Hi JP & Alessandro,

I agree that keeping references to the points in the SEG class is not
the very best idea. I would roll back to the original SEG class.

> 
> 
> 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.


> 
> 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!

Cheers,
Tom


Follow ups

References