← Back to team overview

kicad-developers team mailing list archive

Remove holes and bottleneck in 3d-viewer

 

Hi Jean-Pierre,

As we know, one of the bottleneck in 3d-viewer is while exporting the pcbboard to polygons and then remove the holes from the fill zones.
I was trying to understand the process of that and in the sources and see if we have room for improvement.

"        // Draw copper zones. Note:
        // * if the holes are removed from copper zones
        // the polygons are stored in bufferPolys (which contains all other polygons)
        // * if the holes are NOT removed from copper zones
        // the polygons are stored in bufferZonesPolys"

So, the only different while extracting the holes is to have the information form the filling zones? Why in that case it is causing so much more CPU effort?

Then,

"  // bufferPolys contains polygons to merge. Many overlaps ."
" // Calculate merged polygons"

"// Merge polygons, and remove holes
        currLayerPolyset -= polysetHoles;""

I was wondering if the polygons are really merged?
I mean, if we add a fill zone in the copper, it should overlap tracks (ex GND / Power tracks of the zone) so, that track polygon information are not needed and can be merged .. some how?
Can we gain any speed if we combine this overlap polygons?

Also, what about if we perform the remove holes by split it somehow? ex: remove holes per zone, per track? ..

I dont know how that (boost) algorithm works, I was thinking if it have less data to process it could be faster, so a hole will only remove polygons that we know (somehow) in advance that are hit by a hole?

Do you have any other ideas and how this can be improved?

Thanks!
Regards,
Mario Luzeiro

Follow ups