← Back to team overview

kicad-developers team mailing list archive

Re: Live zone filling

 

On 19.09.2017 15:26, Jon Evans wrote:
> Yes, I used Xpedition in a past life and one of my missions is to bring
> some of its cool features to KiCad :-)
> 
> JP, I will do some tests on more complex boards and look in to possible
> solutions.
> I think this is quite a big challenge but want to take it on, because I
> think some of the underlying work needed will also be very useful for
> other things (like live DRC checking, autorouting, etc)
> 

Hi Jon,

Nice idea. I'm not sure the main bottleneck is the actual polygon
processing. Zone filling takes several steps:
- preparing the geometry (clearance areas of items within the zone) -
AddClearanceAreasPolygonsToPolysList_NG
- polygon clipping (SHAPE_POLY_SET::BooleanXXX)
- removing insulated copper islands
(CONNECTIVTY::FindInsulatedCopperIslands)

All of these are quite computationally expensive, but as you mentioned
the zones can be partitioned to refill only the affected parts. Even
without any partitioning, drawing a trace usually affects 1-2 zones on
the current layer. Maybe updating only the zones that collide with the
currently routed trace would be fast enough?

There are also some other things to take into account:
- there is a form of zone partitioning (see class POLY_GRID_PARTITION),
which splits a zone into a grid of rectangles for fast point-in-polygon
check. Maybe something similar could work for in your case.

- the BOARD model is not thread-safe - that's why the
ratsnest/connectivity is not updated in a separate thread yet, even
though we have new connectivity algorithm. I would advise first cleaning
up the BOARD storage and way it can be accessed before embarking on any
multithreading. This is something we'd like to do after releasing the
V5. For the moment, Orson's idea with the timer looks safest.

- PNS uses its own private data model for the moment, which is synced up
with the BOARD after drawing/editing a trace. I did it this way to have
fast spatial indexing, something that live zone filling could also
benefit from. How do you update the BOARD data (so that the zones could
be refilled) while the track is being routed in the patched version you
showed in the video?

- We need to discuss DRC (including on-line DRC) in detail before we
start implementing any serious changes. There has been a lot of requests
on the mailing list/forums and this is IMHO complex enough to deserve a
specification.

Cheers,
Tom


Follow ups

References