示例#1
0
We extract our board into a new file. This command is usefull when you designed
multiple boards in a single file (e.g., to have shared schematic for board
sandwiches). The `sourcearea` is given as a rectangle. You should specify X, Y
coordinates of upper left corner width and height in millimeters. Also note,
that only board items which fully fit inside this rectangle are extracted.
""")

print("""
# Panelize

Let's start with our first panel.
""")

runBoardExample("panel1", [
    "panelize", "grid", "--gridsize", "2", "2", "--vcuts",
    "doc/resources/conn.kicad_pcb"
])

print("""
We specified that we want 2x2 panel, no space between board and separate them by
V-cuts. Note, that due to the rounded corners, this panel cannot be
manufactured. We will fix it later.

One side note - if you try it with your own board some components might be gone.
KiKit respects the KiCAD component selection criteria. When you specify an input
rectangle, only the components that **fully fit** inside the input rectangle are
selected. This however take in account **both name and value labels** (even when
they are hidden).

When you do not specify the source are explicitly, KiKit takes the board outline
bounding box as the source area. Therefore, by default, components outside the
示例#2
0
文件: exampleDoc.py 项目: zod6/KiKit
We will show everything on a single board located in
`doc/resources/conn.kicad_pcb`. The board looks like this when rendered via
PcbDraw:

![conn](resources/conn.png)
""")

print("""
# Basic panels & layout

Let's start with our first panel.
""")

runBoardExample(autoName(),
                [["panelize"], ["--layout", "grid; rows: 2; cols: 2;"],
                 ["--tabs", "full"], ["--cuts", "vcuts"], [SRC]])

print("""
We specified that we want 2x2 panel, no space between board and separate them by
V-cuts. We also specified that we want to build full tabs (although no tabs are
visible in this example). This is ,however, essential – if we omitted tabs, no
cuts between the boards would be performed. Note, that due to the rounded
corners, this panel cannot be manufactured. We will fix it later.

Note that the `\` in the input is there to make shell happy, so we can break our
command into multiple lines. Also note that there are single quotes around the
key-value pair – again, to make shell happy and to interpret a string with
spaces as a single option.

Also note that KiKit accepts all options in categories (e.g., `layout`, `tabs`,
示例#3
0
We extract our board into a new file. This command is usefull when you designed
multiple boards in a single file (e.g., to have shared schematic for board
sandwiches). The `sourcearea` is given as a rectangle. You should specify X, Y
coordinates of upper left corner width and height in millimeters. Also note,
that only board items which fully fit inside this rectangle are extracted.
""")

print(
"""
# Panelize

Let's start with our first panel.
""")

runBoardExample("panel1",
    ["panelize", "grid", "--gridsize", "2", "2", "--vcuts", "doc/resources/conn.kicad_pcb"])

print(
"""
We specified that we want 2x2 panel, no space between board and separate them by
V-cuts. Note, that due to the rounded corners, this panel cannot be
manufactured. We will fix it later. Not let's see how the same panel will look
like with mouse bites instead:
""")

runBoardExample("panel2",
    ["panelize", "grid", "--gridsize", "2", "2", "--mousebites", "0.5", "1", "0",  "doc/resources/conn.kicad_pcb"])

print(
"""
You specify mouse bites by three numbers - hole diameter, hole spacing and