Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions kigadgets/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
kipython refers to the python executable that ships with KiCad installation
"""

import glob
import os
import sys
import argparse
Expand Down Expand Up @@ -144,6 +145,8 @@ def get_default_paths():
default_locations["pcbnew"] = [
"/usr/lib/python3/dist-packages/pcbnew.py",
"/usr/lib/python3/site-packages/pcbnew.py",
# Arch-style: pcbnew installs into the active Python's site-packages
*sorted(glob.glob("/usr/lib/python3.*/site-packages/pcbnew.py"), reverse=True),
]
root = os.path.expanduser("~/.config/kicad")
default_locations["user"] = [
Expand Down
5 changes: 4 additions & 1 deletion kigadgets/via.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
class ViaType:
Through = pcbnew.VIATYPE_THROUGH
Micro = pcbnew.VIATYPE_MICROVIA
Blind = pcbnew.VIATYPE_BLIND_BURIED
# KiCad <10 had a combined BLIND_BURIED; KiCad 10+ split it into two.
Blind = getattr(pcbnew, "VIATYPE_BLIND_BURIED", getattr(pcbnew, "VIATYPE_BLIND", None))
Buried = getattr(pcbnew, "VIATYPE_BURIED", Blind)
else:
class ViaType:
Through = pcbnew.VIA_THROUGH
Micro = pcbnew.VIA_MICROVIA
Blind = pcbnew.VIA_BLIND_BURIED
Buried = Blind


class Via(HasPosition, HasConnection, Selectable, BoardItem):
Expand Down