Skip to content

Big set of pull requests #4

@atait

Description

@atait

Hi @pointhi,

I couldn't find anything else like kicad-python out there. One of the great things about wrapping the official SWIG library is that it updates with KiCAD. Now is a good time to get updates together before the KiCAD v6 release (which will not escape the clunky SWIG interface).

I developed it a bit myself over the past few months. The changes have been extremely useful to me in bringing new functionality, rounding out some of the in-progress ideas, and putting more of the quirky drudgery under the hood.
https://github.com/atait/kicad-python

Environment management

  • disambiguating kicad.pcbnew and SWIG pcbnew
  • platform-independent auto-linkers to make pip and kicad environments work together
  • one command to do all that link_kicad_python_to_pcbnew, see README

Python 3 and python 2 compatibility

Fixed up docs to work with new Sphinx versions

Layer handling

  • through strings. KiCAD 6 will allow custom layers, and this will be critical
  • still works with Enums

More API wraps

  • TEXTE_PCB
  • GUI properties (selected, highlighted, visible, etc.)
  • zones
  • net names and codes
  • polygons
  • segments
  • via nets

Ctrl-Z compatible

  • using transactions and garbage collection prevention

I was wondering if you would consider merging some of them into your repo and then PyPI. I would love to be able to share this functionality with my colleagues through PyPI. And for newbies who search for an official-ish pcbnew python wrapper (like I did), it would be fantastic if my code would be able to help them. Newbies like PyPI and they like single commands that set everything up for them.

pip install kicad
link_kicad_python_to_pcbnew ...

It is a nontrivial merge, in part, because I forked off of KiCad's repo instead of yours. I wanted to reach out beforehand to see what you thought because there hasn't been much activity in this repo lately. If you like these changes and are up for some reviewing and merging, then I will fork and start making pull requests.

Best,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions