yaqwsx / KiKit

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

Separate produces zero-length segments which fails DRC in Kicad 8 #645

Closed Arxi closed 8 months ago

Arxi commented 8 months ago

Prerequisites

KiKit version

1.4.0+46.g5445c99

KiCAD version

8.0.0

Operating system

MacOS Sonoma 14.1.2

Description

As found and discussed in https://github.com/yaqwsx/KiKit/issues/644, the process of polygon reconstruction introduces zero-length segments into final separated boards, which seems to be a DRC error in Kicad 8.

Steps to Reproduce

  1. download edgecuts.kicad_pcb.zip

  2. kikit separate --looseArcs --source 'annotation; ref: A' edgecuts.kicad_pcb A.kicad_pcb

  3. kikit fab jlcpcb A.kicad_pcb . or just open it and run DRC

  4. Following error occurs:

    [invalid_outline]: Board has malformed outline (Segment has null or very small length: 0 nm) Local override; Severity: error @(144.5000 mm, 30.0000 mm): Segment on Edge.Cuts

  5. open the A.kicad_pcb as a text file and search for "144.5 30". You'll find a segment which has zero length:

    (gr_line
    (start 144.5 30)
    (end 144.5 30)
    (stroke
        (width 0.1)
        (type default)
    )
    (layer "Edge.Cuts")
    (uuid "b6888e17-c51b-441d-8bb1-ae013b964119")
    )
  6. Delete this whole (gr_line ...) segment from the A.kicad_pcb, open it and run DRC again - there's no error.

yaqwsx commented 8 months ago

Addressed by eafe49d.