← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] No more boost::polygon in Kicad

 

Hi Tom,

> We've pushed a branch [1] to Launchpad, which removes remaining
> Boost::polygon-based code from Kicad. The patch affects several features
> of pcbnew - we need your help to test it as extensively as possible:
> - zone filling calculations (both with segments and as solid polygons)
> - dead copper removal in zones (also touches ratsnest, in both views)
> - 3D viewer
> - DXF board outline export
> - plotting zones, solder mask layers and board outline
> - VRML export.
> The only program that still uses BPL is bitmap2component.

Nice work!

I've tested everything bar the DXF and VRML export on Arch Linux. The
results are fine, but the 3D viewer is very slow to load. With a board made
in a product-branch Pcbnew, I do the following steps:

1. Open in 3D viewer: ~170ms for buildBoard3DView.
2. Open again (in case its first time lucky): same time to display.
3. Unfill zones.
4. Open in 3D viewer: ~73ms for buildBoard3DView.
5. Refill zones.
6. Open in 3D viewer: ~65s for buildBoard3DView.
7. Save the board and quit.
8. Reopen; 3D viewer still takes ~65s in buildBoard3DView.

In all cases the 3D view is smooth and responsive once displayed.

I cannot reproduce this on r5908 from the product branch. I am building the
latest revision from there now to check with.

Doing a diff on the .kicad_pcb file after this shows a definite increase in
the number of vertices in the filled_polygon structures (from 1488 to 3286
by my crude count), but I wouldn't have thought this enough for a ~400
times slowdown in generating the 3D view.

I've attached the PCB (its only partially routed) if anybody wants to try
and reproduce this. Its in the 'original' state, i.e., the existing polygon
fills were generated by r5743. My build details are below.

Cheers
Blair


Application: pcbnew
Version: (2015-07-13 BZR 5934)-Depolygonized debug build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1008,GCC
5.1.0,wx containers,compatible with 2.8)
Platform: Linux 4.0.7-2-ARCH x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.58.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Attachment: testboard.kicad_pcb
Description: Binary data


Follow ups

References