Re: [Kicad-developers] [PATCH] Add python apis: GetLogicalLibs, FootprintsInLib and FootprintInfo

2018-05-23 Thread miles mccoo
bump. ;-) To my knowledge this patch hasn't been merged or rejected. Miles On Wed, May 9, 2018 at 3:47 PM, Nick Østergaard wrote: > See the unittests in the qa folder. Thay are executed by the build job > also. > > > ons. 9. maj 2018 15.25 skrev miles mccoo : > >>

Re: [Kicad-developers] [PATCH] Add python apis: GetLogicalLibs, FootprintsInLib and FootprintInfo

2018-05-09 Thread miles mccoo
ipting to > build on my Mac so there’s no way for me to do a quick sanity test. > > Cheers, > Jeff. > > > On 4 May 2018, at 09:17, miles mccoo wrote: > > > > I submitted this patch before, but it fell through the cracks. > > This patch makes it possible to query

[Kicad-developers] [PATCH] Add python apis: GetLogicalLibs, FootprintsInLib and FootprintInfo

2018-05-04 Thread miles mccoo
;t seem to make it to the launchpad site, I've also made the patch file available here: http://mmccoo.com/random/0001-Add-the-python-apis-GetLogicalLibs-FootprintsInLib-a.patch Miles From 3b5bc236d6b1c075e9cb49d6432f1ea2b8e876a6 Mon Sep 17 00:00:00 2001 From: Miles McCoo Date: Fri, 4 May

Re: [Kicad-developers] [PATCH] Add/modify python APIs for querying available pcbnew footprints

2018-03-30 Thread miles mccoo
bump I've updated my patch to be much better/cleaner. Attached patch is the same as in my previous, confusing perhaps, mail. :-) Miles On Thu, Mar 22, 2018 at 10:33 PM, miles mccoo wrote: > resend, this time to the list and not just to Wayne. Keep forgetting that > the replyto is

Re: [Kicad-developers] [PATCH] Add/modify python APIs for querying available pcbnew footprints

2018-03-22 Thread miles mccoo
resend, this time to the list and not just to Wayne. Keep forgetting that the replyto is the person I'm directly replying to and not the group. note that this is actually two mails I sent today. Miles On Thu, Mar 22, 2018 at 10:05 PM, miles mccoo wrote: > Attached is an updated/

[Kicad-developers] [PATCH] Add/modify python APIs for querying available pcbnew footprints

2018-03-16 Thread miles mccoo
lso many that should be excluded. Thank you to Orson (Maciej Sumiński) and Jeff Young for their hints in this thread: https://lists.launchpad.net/kicad-developers/msg34925.html Miles for personal reference: patch 7/8 From 3c898d25be636c9a8556c03de3158f4ac02d88b7 Mon Sep 17 00:00:00 2001 Fro

Re: [Kicad-developers] Need guidance/hints on accessing list of available pcbnew footprints from python

2018-03-14 Thread miles mccoo
not nullptr. The string argument tells the > routine to enumerate only the one .pretty file; if you pass the empty > string then it will enumerate all of the .pretty files in the fp-lib-table. > > > > On 14 Mar 2018, at 21:17, miles mccoo wrote: > > from Jeff: > *wxArraySt

Re: [Kicad-developers] Need guidance/hints on accessing list of available pcbnew footprints from python

2018-03-14 Thread miles mccoo
the footprints. > > So in GDB you need to be looking at the size of aFootprintNames, not > fp_table. > > Cheers, > Jeff. > > > On 14 Mar 2018, at 20:01, miles mccoo wrote: > > Wayne said: > > > > > > *The footprint library table internally handles

Re: [Kicad-developers] Need guidance/hints on accessing list of available pcbnew footprints from python

2018-03-14 Thread miles mccoo
../src/common/init.cpp:490 #13 0x0044f9ed in main (argc=1, argv=0x7fffd7c8) at /home/mmccoo/kicad/kicad/common/single_top.cpp:239 On Wed, Mar 14, 2018 at 6:05 PM, Wayne Stambaugh wrote: > On 3/14/2018 11:04 AM, miles mccoo wrote: > > Thanks for the tips, Orson. That gave me what

Re: [Kicad-developers] Need guidance/hints on accessing list of available pcbnew footprints from python

2018-03-14 Thread miles mccoo
tval, fpobj); } } On Tue, Mar 13, 2018 at 12:15 PM, Maciej Sumiński wrote: > Hi Miles, > > Have you seen FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList() > (pcbnew/footprint_viewer_frame.cpp)? It might be the easiest way to go. > Perhaps it could be wrapped in a function prov

[Kicad-developers] Need guidance/hints on accessing list of available pcbnew footprints from python

2018-03-13 Thread miles mccoo
In one of my python plugins, I want to know the list of available footprints (mounting holes, in this case) Digging through the code, I can't make heads or tails of how to get this information. There are a bunch of abstract class involved. impls There are a couple possibilities, none of which

Re: [Kicad-developers] Deletion in plugins causing trouble

2018-03-10 Thread miles mccoo
e any extra changes in > > the existing scripts and it fixes the problem until we come up with a > > better scripting interface. If nobody has objections, I am going to > > commit the patch. > > > > Regards, > > Orson > > > > On 03/06/2018 10:02 AM, miles m

Re: [Kicad-developers] Deletion in plugins causing trouble

2018-03-06 Thread miles mccoo
it > > is quite possible you are the most competent person to give us an advice > > on how to proceed. See some comments below, but I am neither a Python > > script developer nor a scripting interface maintainer, so I might be > > lacking some basic knowledge here. > > &g

[Kicad-developers] Deletion in plugins causing trouble

2018-02-28 Thread miles mccoo
So I'm plugin-ifying my python scripts (the mechanism is awesome). One of the plugins deletes some stuff and that is causing trouble. I'm not sure how to fix the root cause. Hence this mail. The plugin just deletes Edge.Cuts[1]: for d in board.GetDrawings(): if (d.GetLayerName() =

Re: [Kicad-developers] [PATCH] expose BOARD_COMMIT to python

2018-02-27 Thread miles mccoo
; I would prefer to not merge it. > > Wayne > > On 2/26/2018 5:29 AM, miles mccoo wrote: > > So I think I may have discovered something that renders this patch > > irrelevant. > > > > I was trying to debug the behavior I mentioned in the first mail of this > >

Re: [Kicad-developers] [PATCH] expose BOARD_COMMIT to python

2018-02-26 Thread miles mccoo
code handles undo, redraw,... for me. Trying to handle undo twice is what caused my issue. The funny thing is that I worked on exposing the BOARD_COMMIT stuff as a prep step to plugin'ifying a bunch of my utilities. Miles On Mon, Feb 26, 2018 at 10:23 AM, miles mccoo wrote: > >

Re: [Kicad-developers] [PATCH] expose BOARD_COMMIT to python

2018-02-26 Thread miles mccoo
code > formating, please take a look at the kicad coding policy[1]. > > Thanks, > > Wayne > > [1]: http://docs.kicad-pcb.org/doxygen/md_Documentation_developme > nt_coding-style-policy.html > > On 02/24/2018 05:04 AM, miles mccoo wrote: > >> Back in November I was in

[Kicad-developers] [PATCH] expose BOARD_COMMIT to python

2018-02-24 Thread miles mccoo
mod.SetOrientation(locs[ref][2]*10) print("placing {} at {},{}".format(ref, newx, newy)) - -pcbnew.Refresh(); +bc.Push("place_by_sch") +#pcbnew.Refresh(); for my personal reference: this is my sixth patch From 86c1f376c4bcfaa489a383535f1bceacea83fd6e

Re: [Kicad-developers] Getting kicad to work with wxPython Phoenix

2018-02-22 Thread miles mccoo
So I'd like to help out and take a look, but getting wxphoenix with gtk2 is proving a bit challenging. I did manage to install something (albeit the wrong one) in the past. Nick, what command did you use to install? Miles I have a fresh virtual ubuntu 16.04 install. I think I ran my normal pk

[Kicad-developers] Fwd: [PATCH] BuildConnectivity and re-DisplayBoard in python Refresh

2017-12-21 Thread miles mccoo
resend as requested :-) Miles -- Forwarded message -- From: miles mccoo Date: Sun, Dec 3, 2017 at 11:54 AM Subject: [PATCH] BuildConnectivity and re-DisplayBoard in python Refresh To: KiCad Developers Refresh is used in the python domain to refresh the display with the

[Kicad-developers] Fwd: Questions on BOARD_COMMIT

2017-12-04 Thread miles mccoo
> Is there a document the explains Board commit? An email thread about it > > perhaps? > > There are some comments in include/commit.h. Perhaps it should be extended. > > Yes, I think so. A small description of how this class is intended to be used. First do this as setup, then make some changes,

[Kicad-developers] [PATCH] BuildConnectivity and re-DisplayBoard in python Refresh

2017-12-03 Thread miles mccoo
doing something before changes begin and then calling something else. This patch enables the catch all of "just rebuild whatever needs to be rebuilt" Miles for my personal reference: this is my fifth patch. From 383c7f5b3dff417125992fbbdd8a14ae00c82d93 Mon Sep 17 00:00:00 2001 From: Miles

[Kicad-developers] Questions on BOARD_COMMIT

2017-11-29 Thread miles mccoo
Since BOARD_COMMIT was a requested item to be added to the Python interface, since it's related to be previous questions about getting a redraw on the GAL canvas, and since it could make a good entry to my kicad python tutorials, I have some questions. My questions will be mostly in the form of s

Re: [Kicad-developers] Getting kicad to work with wxPython Phoenix

2017-11-24 Thread miles mccoo
in reply to Wayne's request to run the footprint wizard I run the footprint wizard; it seems to run fine. when I press the 3D view button, I get a popup complaining about not finding the wx gtk2 library "10:14:11: libwx_gtk2u_core-3.0.so.0: cannot open shared object file: No such file or directo

Re: [Kicad-developers] Getting kicad to work with wxPython Phoenix

2017-11-23 Thread miles mccoo
pports UDPs. If they could be saved in the netlist and then read/stored in pcbnew, that could be handy. On Thu, Nov 23, 2017 at 6:04 PM, Maciej Sumiński wrote: > Hi Miles, > > On 11/23/2017 04:17 PM, miles mccoo wrote: > > In a recent thread > > <https://lists.launchpad.

[Kicad-developers] Getting kicad to work with wxPython Phoenix

2017-11-23 Thread miles mccoo
In a recent thread on this list, it was mentioned that kicad may need to drop support for SWIG/Python due to wx and wxPython limitations. Perhaps I misinterpreted what was said. It's my perception that the kicad team doesn't see the valu

Re: [Kicad-developers] [PATCH] Changes to python interface enabling net->pads access.

2017-11-16 Thread miles mccoo
interface is that I protect python users from the mistake of forgetting the EOT on the GetNetItems. Otherwise, it's simply the addition of some more %includes in the .i files. Not sure what happens next. My other patches were merged pretty quickly Miles On Thu, Nov 16, 2017 at 11:02

Re: [Kicad-developers] [PATCH] Changes to python interface enabling net->pads access.

2017-11-16 Thread miles mccoo
matter. That's what the collector > > object is for. Let's not reinvent the wheel. > > Hi Wayne, > > I'm fine with swigging the COLLECTORS, but they aren't in my opinion the > simplest way to execute complex queries on a board. I would use > iterat

[Kicad-developers] [PATCH] Changes to python interface enabling net->pads access.

2017-11-15 Thread miles mccoo
xt to each other. The two new files (typeinfo.i and connectivity.i) were added to pcbnew's CMakeLists.txt as dependencies. From 2e291a7e7e8d3b8b34a7487725b245e2b56c10e4 Mon Sep 17 00:00:00 2001 From: Miles McCoo Date: Wed, 15 Nov 2017 14:16:21 +0100 Subject: [PATCH] Changes to python interface ena

Re: [Kicad-developers] [RFC] new connectivity algorithm - testers needed

2017-11-14 Thread miles mccoo
old thread, but I think it's relevant to my issue. My interest is mostly in the python interface to pcbnew.[0] With the new connectivity stuff, what's the proper way to ask a net what pads belong to it? In python, I used to be able to do net.Pads() [1] I tried adding connectivity.h[2] to boards

[Kicad-developers] [PATCH] export SHAPE_POLY_SET to pcbnew python

2017-04-14 Thread miles mccoo
was in the header file. link error ensues. I've removed it from the header. easy enough to put it back once it's implemented. Miles From 60bbd3ebc0fc688e70bab3736b5cba61f6dca69f Mon Sep 17 00:00:00 2001 From: Miles McCoo Date: Fri, 14 Apr 2017 14:11:24 +0200 Subject: [PATCH 2/2] Mi

[Kicad-developers] [PATCH] Expose netclassptr constructor to python interface

2017-04-13 Thread miles mccoo
efore it got lost in the pile other stuff I'm doing. From 2812192e5928a8d72abceeef33291f4ac3a3dfa7 Mon Sep 17 00:00:00 2001 From: Miles McCoo Date: Thu, 13 Apr 2017 11:13:21 +0200 Subject: [PATCH] Minor Pcbnew Python scripting improvement. MIME-Version: 1.0 Content-Type: multipart/mixed; bo

[Kicad-developers] [PATCH] additions/fix to python interface

2017-03-17 Thread miles mccoo
included many, many features written in TCL. In the PCB realm, I'd like to help enable something similar in Kicad. Miles From 818407cb30ea1fe141cf466ec8310a9184b9f6f2 Mon Sep 17 00:00:00 2001 From: Miles McCoo Date: Fri, 17 Mar 2017 08:38:21 +0100 Subject: [PATCH] add typedef for wxCoord to