yaqwsx / KiKit

Automation tools for KiCAD
https://yaqwsx.github.io/KiKit
MIT License
1.49k stars 200 forks source link

Copperfill setting crashes kicad if no areas are left to fill #657

Closed jpeterse closed 5 months ago

jpeterse commented 5 months ago

Prerequisites

KiKit version

1.5.0+3.g18b590e

KiCAD version

8.0.1-rc1

Operating system

Linux

Description

Specifying a copperfill, with a clearance parameter that effectively means no area will be filled, will crash kicad with error:

terminate called after throwing an instance of 'std::out_of_range' what(): aGlobalIndex-th vertex does not exist Aborted

Steps to Reproduce

following config will crash kicad:

"layout": {
        "type": "grid",
        "hspace": "2mm",
        "vspace": "2mm",
        "rows": "6",
        "cols": "4"
},
"tabs": {
        "type": "fixed",
        "hwidth": "10mm",
        "vwidth": "16mm"
},
"copperfill": {
        "type": "solid",
        "clearance": "1mm"
}

changing "clearance" in copperfill setting to 0.5 for example will resolve the issue.

yaqwsx commented 5 months ago

Fixed in 28689df