yaqwsx / KiKit

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

Spurious V-cut lines generated #670

Closed DaveW76 closed 4 months ago

DaveW76 commented 4 months ago

Prerequisites

KiKit version

1.5.1

KiCAD version

7.0.9

Operating system

Windows 11 Pro 64-bit 23H2

Description

My 2x2 panel has four horizontal V-cut lines. But the top and bottom ones have duplicate lines, offset by 0.28mm from the correct ones. The spurious ones are centered right on the board edge, the correct ones are 0.28mm into the tabs, as desired.

My batch file is:

:: FILE:    panel_jlcpcb.bat
:: PURPOSE: Run KiKit to create a panel for the USB-XR21B1411-RS232 board
::          for JLCPCB, then run KiCad to display the panel.
@echo panellizing the USB-RS232 board for JLCPCB...
@kikit panelize -p panel_jlcpcb-V.json "..\USB-XR21B1411-RS232.kicad_pcb" USB-XR-RS232-C_jlcpcb.kicad_pcb
@echo displaying the JLCPCB USB-RS232 panel...
@"C:\Program Files\KiCad\7.0\bin\pcbnew.exe" USB-XR-RS232-C_jlcpcb.kicad_pcb

My panel_json-V.json file is:

{
    // FILE:    panel_jlcpcb-V.json
    // PURPOSE: Configuration parameters for KiKit to generate a panel
    //          with V-cuts for JLCPCB for the USB-XR21B1411-RS232 board.
    //
    "page": {
        "type": "USLetter",
        "anchor": "tl",
        "posx": "1000mil",
        "posy": "1000mil"
    },
    "layout": {
        "type": "grid",
        "rows": 2,
        "cols": 2,
        "space": "100mil",
        "rotation": "0deg",
        "alternation": "none",
        "renamenet": "C_{n}-{orig}",
        "renameref": "{orig}"
    },
    "source": {
        "type": "auto",
        "tolerance": "15mm"
    },
    "tabs": {
        "tabfootprints": "0_DCW_Library:KiKit_Tab",
        "type": "annotation"
    },
    "cuts": {
        "type": "vcuts",
        "clearance": "0.56mm",
        "cutcurves": "false",
        "offset": "-0.28mm"
    },
    "framing": {
        "type": "frame",
        "width": "270mil",
        "mintotalwidth": "72mm",
        "mintotalheight": "72mm",
        "fillet": "0.5mm",
        "cuts": "h",
        "space": "100mil"
    },
    "tooling": {
        "type": "3hole",
        "voffset": "60mil",
        "hoffset": "60mil",
        "size": "1.152mm",
        "paste": false
    },
    "fiducials": {
        "type": "3fid",
        "voffset": "14mm",
        "hoffset": "9mm",
        "coppersize": "1mm",
        "opening": "2mm"
    },
    "copperfill": {
        "type": "none"
    },
    "post": {
        "type": "auto",
        "millradius": "0mm",
        "copperfill": false
    }
}

I have selected the top spurious V-cut in the PCB editor to highlight it: image

USB-XR-RS232-C_jlcpcb.kicad_pcb.txt

Steps to Reproduce

I just run the batch file shown above, which creates the panel, then uses the KiCad PCB Editor to display it.

yaqwsx commented 4 months ago

There are no spurious lines. You instructed KiKit to:

So, one cut comes from the board tabs, and one comes from the frame tabs (they should be 0.28 mm apart). The solution is not to use frame cuts when you use V-cuts, as they are simply redundant. The reason cuts on the frame are not offset the same way as cuts board is that there is no clear offset direction for cutting, e.g., when you have backbones. Mismatched offsets are also not a problem for mouse bites, for which the option to make cuts into the frame exists.

I understand this might be confusing. If you have a proposal for improving, I will happily hear it!