kicad-developers team mailing list archive
Mailing list archive
Re: [PATCH] Expose netclassptr constructor to python interface
Wayne Stambaugh <stambaughw@xxxxxxxxx>
Fri, 14 Apr 2017 08:51:13 -0400
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0
I merged your patch into the master branch. There were a few coding
policy violations and commit message formatting which I fixed.
Even though you modified a swig file, this was still C++ code which
should follow the coding policy. There was trailing white space and
missing spaces between the function parenthesis and the arguments (line
61 of your patch). Thank you for your contribution to KiCad.
On 4/13/2017 6:30 AM, miles mccoo wrote:
> This is my second contribution. It's a simple one line addition to
> netclass.i to expose the netclassptr constructor, enabling python
> scripts to add new netclasses.
> In my first contribution, I made a couple errors in the contribution
> process which Wayne graciously fixed for me. I did look at those
> differences and I believe I'm adhering better now.
> If I missed something this time, please be specific. I plan on
> contributing again and want to make things as easy as possible.
> In case anyone would like to exercise the code, this will do it. The new
> api is in red:
> import pcbnew
> board = pcbnew.GetBoard()
> ds = board.GetDesignSettings()
> # ugly. exposes a public member not via an accessor method
> nc = ds.m_NetClasses
> foo = pcbnew.NETCLASSPTR("foo")
> PS this is only a one-liner and I feel a little goofy for it. I wanted
> to get it out there before it got lost in the pile other stuff I'm doing.
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp