yaqwsx / KiKit

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

Allow V-Cuts to only horizontal or vertical #622

Open bradanlane opened 10 months ago

bradanlane commented 10 months ago

Prerequisites

Description

For completely odd shaped PCBs, mousebites are the easy solution.

There are cases where odd shaped PCBs may have opposing sides which are either horizontal or vertical. (see image below).

Suggestion: allow V-Cuts to be applied to vertical xor horizontal.

I tried a few different methods. The closest I was able to get was to use framing = tightframe and tabs with hcount = 1 and vcount = 0. Then I manually add the v-cut information. I was not able to find any solution to only have vertical v-cuts v-cuts on the ends.

I use the JSON interface.

Here is what I hoped to achieve... kicad_panel_vertical vcuts

Here is the JSON I have thus far ...

{
    "layout": {
        "type": "grid",
        "rows": 1,
        "cols": 1,
        "hspace": "2mm",
        "vspace": "2mm"
    },
    "source": {
        "type": "auto",
        "tolerance": "2mm"
    },
    "tabs": {
        "type": "fixed",
        "hwidth": "61mm",
        "hcount": "1",
        "vcount": "0"
    },
    "framing": {
        "type": "tightframe",
        "hspace": "5mm",
        "vspace": "5mm",
        "slotwidth": "2.5mm",
        "width": "2.5mm"
    },
    "tooling": {
        "type": "4hole",
        "hoffset": "3.5mm",
        "voffset": "3.5mm",
        "size": "1.8mm"
    },
    "fiducials": {
        "type": "4fid",
        "paste": true,
        "hoffset": "13.5mm",
        "voffset": "3.5mm",
        "coppersize": "1mm",
        "opening": "1.5mm"
    },
    "post": {
        "type": "auto",
        "millradius": "1mm",
        "origin": "bl",
        "copperFill": false
    }
}
greenscreenflicker commented 8 months ago

I like your idea. +1

yaqwsx commented 8 months ago

The intended workflow for KiKit is:

Therefore, what we miss to fulfull your request is to have an automatic annotation placement of the full-width tabs that only uses left/right or top/bottom sides.

At the moment a possible work-around is to use fixed-width tabs (with width of the wider side).

bradanlane commented 8 months ago

In my OP I did mention trying fixed width tabs. It creates the tabs but I still must manually add the v-cuts.

I am also still suffering the 'SwigPyObject' object has no attribute 'FootprintLoad' error (issue #571)

I tested using kikit 1.4.0+23.gdb18615 and 1.4.0+44.gba5a426