Re: [Kicad-developers] Scripting on Windows Fix

2013-03-11 Thread Miguel Angel Ajo Pelayo
Pushed to revision 3996, Brian, can you re-test Dick's class-lock now with those fixes in place? --- PS: There is something broken yet with datatypes flying to python when you change parameters for a wizard [Pads][*steps]<= 3.0 [Pads][length]<= 5000,00 [Pads][clearance]<= 10

Re: [Kicad-developers] Scripting on Windows Fix

2013-03-11 Thread Miguel Angel Ajo Pelayo
Don't worry Wayne, I will commit it in a few seconds, I'm trying, but my bzr just not logged in in a new dev machine I'm using :) I sometimes yet need to look at my notes to re-discover what did each python related define… Miguel Angel Ajo http://www.nbee.es +34911407752 skype: ajoajoajo On

Re: [Kicad-developers] Scripting on Windows Fix

2013-03-11 Thread Wayne Stambaugh
On 3/11/2013 7:48 PM, Miguel Angel Ajo Pelayo wrote: Hmm, I recompiled several times (without the WXPYTHON option) , not getting the footprint wizard, and then I realized that somebody changed this ifdef: #ifdef KICAD_SCRIPTING_WXPYTHON m_mainToolBar->AddTool( ID_MODEDIT_NEW_MODULE_FROM_WIZ

Re: [Kicad-developers] [PATCH] If a footprint appears in multiple module libraries, load only the first

2013-03-11 Thread Wayne Stambaugh
On 3/9/2013 6:38 AM, Thiadmer Riemersma wrote: Hello everyone, This is a patch for a minor annoyance that we have with cvpcb. If multiple modules have a footprint called "SOT23", cvpcb will list both. However, if you click on the "view selected footprint" button for the both of them (to check t

Re: [Kicad-developers] Scripting on Windows Fix

2013-03-11 Thread Miguel Angel Ajo Pelayo
I get a crash too, sightly different, it's like if the GetParametersPageName was unable to build the passing parameters, hmmm…. Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 pcbnew.bin 0x0001062ef38c PYTHON_FOOTPRINT_WIZARD::GetParameterPageName(int) +

Re: [Kicad-developers] Scripting on Windows Fix

2013-03-11 Thread Miguel Angel Ajo Pelayo
Hmm, I recompiled several times (without the WXPYTHON option) , not getting the footprint wizard, and then I realized that somebody changed this ifdef: #ifdef KICAD_SCRIPTING_WXPYTHON m_mainToolBar->AddTool( ID_MODEDIT_NEW_MODULE_FROM_WIZARD, wxEmptyString, KiBitma

Re: [Kicad-developers] patch: pcbnew printing "Fit to page" scale fix

2013-03-11 Thread Sergey Borshch
Sorry, mistype again. Fixed. On 11.03.2013 23:36, Sergey Borshch wrote: On 11.03.2013 21:41, jp charras wrote: Le 11/03/2013 15:17, Sergey A. Borshch a écrit : This patch makes scale option "fit to page" do the same as in all other programs worldwide - produce biggest image that still fits to

Re: [Kicad-developers] patch: pcbnew printing "Fit to page" scale fix

2013-03-11 Thread Sergey Borshch
On 11.03.2013 21:41, jp charras wrote: Le 11/03/2013 15:17, Sergey A. Borshch a écrit : This patch makes scale option "fit to page" do the same as in all other programs worldwide - produce biggest image that still fits to page. Pcbnew generates 1:1-scaled centered image instead. Sorry, your

Re: [Kicad-developers] Scripting on Windows Fix

2013-03-11 Thread Brian Sidebotham
On 11 March 2013 08:12, Dick Hollenbeck wrote: > > I will commit something in a few minutes. > > > > Brian if you can test that please, then you are da man. > > Its very late here, it was rushed, but I checked in something that might > help. > > in rev 3994. > Hi Dick, rev 3994 still crashes at

Re: [Kicad-developers] patch: pcbnew printing "Fit to page" scale fix

2013-03-11 Thread jp charras
Le 11/03/2013 15:17, Sergey A. Borshch a écrit : This patch makes scale option "fit to page" do the same as in all other programs worldwide - produce biggest image that still fits to page. Pcbnew generates 1:1-scaled centered image instead. Sorry, your patch does not work: - scale is evaluat

Re: [Kicad-developers] pcbnew fix: project file location

2013-03-11 Thread jp charras
Le 11/03/2013 14:42, Sergey A. Borshch a écrit : Hello everybody. If pcbnew launched with .brd as cmd-line argument (just filename, without absolute path), attempting to load file from current directory, pcbnew loads settings from kicad.pro in the templates directory instead of .pro in the c

Re: [Kicad-developers] patch: pcbnew, hide text anchors while printing

2013-03-11 Thread jp charras
Le 11/03/2013 15:05, Sergey A. Borshch a écrit : This patch hides text anchors while printing board in pcbnew. Every time I print board silkscreen in pcbnew first page always goes to trashcan because of points in the center of reference designators and other texts. Who needs text anchors on pr

Re: [Kicad-developers] pcbnew patch: store user selection "single page" in print dialog

2013-03-11 Thread jp charras
Le 11/03/2013 15:10, Sergey A. Borshch a écrit : This path saves "single page" user choice in pcbnew printing dialog in the same way as all other controls in this dialog stored. Thanks. patch added in rev 3995. -- Jean-Pierre CHARRAS ___ Maili

Re: [Kicad-developers] patch: pcbnew. fix memory leak in printing dialog

2013-03-11 Thread jp charras
Le 11/03/2013 15:21, Sergey A. Borshch a écrit : If user tries to generate print preview with no layer selected, *preview object not destroyed and memory leaks. Thanks. Fixed in rev 3995, but not using the patch. -- Jean-Pierre CHARRAS ___ Maili

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Adam Wolf
Thanks for your work getting Python scripting on Windows. What's the next step here, to make it match what you need for development? Make a cmake directive to direct where the python modules go? Adam Wolf W&L On Mar 11, 2013 11:37 AM, "Dick Hollenbeck" wrote: > On 03/11/2013 10:32 AM, Adam Wolf

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Dick Hollenbeck
On 03/11/2013 10:32 AM, Adam Wolf wrote: > > Would it be bad for us to put the swiggy autogenerated stuff in a > readonly, central location, because it's not going to be modified > without doing a new cmake? Then we put all the scripts that will be > modified in a homedir? > It gets bad when you

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Dick Hollenbeck
On 03/11/2013 10:20 AM, Adam Wolf wrote: > > If we store all the python modules in a user's home directory, how > do they get there? Does kicad put them there, or does the installer? > > While we should provide the python modules like footprint_wizard.py > for download, we cannot easily provide th

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Adam Wolf
Would it be bad for us to put the swiggy autogenerated stuff in a readonly, central location, because it's not going to be modified without doing a new cmake? Then we put all the scripts that will be modified in a homedir? On Mar 11, 2013 10:25 AM, "Miguel Angel Ajo Pelayo" wrote: > For me, the

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Miguel Angel Ajo Pelayo
For me, the most reasonable solution sounds like providing both options, being able to enforce a user-local destination for python modules/libraries, or a system wide standard one. In development, or single user installations, first is better, for apt-get install or equivalent system-wide instal

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Adam Wolf
If we store all the python modules in a user's home directory, how do they get there? Does kicad put them there, or does the installer? While we should provide the python modules like footprint_wizard.py for download, we cannot easily provide the swiggy modules like pcbnew.py for download, becaus

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Miguel Angel Ajo Pelayo
That looks quite much to the wrapping I had to do in MacOX to avoid static linking, where it's uncommon for normal users to put new libraries in the system paths: I rename pcbnew to pcbnew.bin and put the loader as "pcbnew", same for all the other apps, it just builds a pointer to the librarie

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Dick Hollenbeck
On 03/11/2013 09:23 AM, Adam Wolf wrote: > Hi Dick, > > The modules just have to be in a place on the PYTHONPATH (afaik). > We can either put them in a location that is already on the > PYTHONPATH, or put them in a location that isn't on the PYTHONPATH > and provide instructions on how to modify y

Re: [Kicad-developers] Scripting on Windows Fix

2013-03-11 Thread Miguel Angel Ajo Pelayo
Ok, more than 5 minutes, removing WXPYTHON scripting needs a full pcbnew rebuild, probably around 15 min… :) Miguel Angel Ajo http://www.nbee.es +34911407752 skype: ajoajoajo On 11/03/2013, at 15:26, Miguel Angel Ajo Pelayo wrote: > I'm going to test it right now, give me 5 minutes :) > > Mig

Re: [Kicad-developers] patch: pcbnew printing "Fit to page" scale fix

2013-03-11 Thread Sergey A. Borshch
Oos, sorry, mistype in patch. Correct patch attached. On 11.03.2013 16:17, Sergey A. Borshch wrote: This patch makes scale option "fit to page" do the same as in all other programs worldwide - produce biggest image that still fits to page. Pcbnew generates 1:1-scaled centered image instead.

Re: [Kicad-developers] Scripting on Windows Fix

2013-03-11 Thread Miguel Angel Ajo Pelayo
I'm going to test it right now, give me 5 minutes :) Miguel Angel Ajo http://www.nbee.es +34911407752 skype: ajoajoajo On 11/03/2013, at 15:25, Dick Hollenbeck wrote: > class PyLOCK > { >PyGILState gil_state; > > public: >PyLOCK() { gil_state = PyGILState_Ensure(); } >~PyLOCK(

Re: [Kicad-developers] Scripting on Windows Fix

2013-03-11 Thread Dick Hollenbeck
On 03/11/2013 03:50 AM, Miguel Angel Ajo Pelayo wrote: > Thanks dick, > I think the class constructor it's a very clean/smart solution (set > and forget at block level). > > I wonder if the wx/python , takes care of double-locks from the same > thread. Good question, can you find out please? If

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Adam Wolf
Hi Dick, The modules just have to be in a place on the PYTHONPATH (afaik). We can either put them in a location that is already on the PYTHONPATH, or put them in a location that isn't on the PYTHONPATH and provide instructions on how to modify your PYTHONPATH or modify it for the user. I have se

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Miguel Angel Ajo Pelayo
I think I understand what you mean Dick, we need to provide a default way to compile and install python modules to a prefix, and also the set of default scripts & module libraries, & wizards, it's that what you mean? But anyway, when somebody installs a package system wide, we must prov

[Kicad-developers] patch: pcbnew. fix memory leak in printing dialog

2013-03-11 Thread Sergey A. Borshch
If user tries to generate print preview with no layer selected, *preview object not destroyed and memory leaks. -- Regards, Sergey A. Borshchmailto: sb...@sourceforge.net SB ELDI ltd. Riga, Latvia === modified file 'pcbnew/dialogs/dialog_print_using_printer.cpp' --- pcbnew/dia

[Kicad-developers] patch: pcbnew printing "Fit to page" scale fix

2013-03-11 Thread Sergey A. Borshch
This patch makes scale option "fit to page" do the same as in all other programs worldwide - produce biggest image that still fits to page. Pcbnew generates 1:1-scaled centered image instead. -- Regards, Sergey A. Borshchmailto: sb...@sourceforge.net SB ELDI ltd. Riga, Latvia

[Kicad-developers] pcbnew patch: store user selection "single page" in print dialog

2013-03-11 Thread Sergey A. Borshch
This path saves "single page" user choice in pcbnew printing dialog in the same way as all other controls in this dialog stored. -- Regards, Sergey A. Borshchmailto: sb...@sourceforge.net SB ELDI ltd. Riga, Latvia === modified file 'pcbnew/pcbplot.h' --- pcbnew/pcbplot.h

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Dick Hollenbeck
On 03/11/2013 08:25 AM, Adam Wolf wrote: > Miguel, > > I only know about Blender/Python on Windows. > > I think site-packages (dist-packages on Debian/Ubuntu) might be the > right way to do it. Put the python modules in a place that's > already on the PYTHONPATH that package managers already expec

[Kicad-developers] patch: pcbnew, hide text anchors while printing

2013-03-11 Thread Sergey A. Borshch
This patch hides text anchors while printing board in pcbnew. Every time I print board silkscreen in pcbnew first page always goes to trashcan because of points in the center of reference designators and other texts. Who needs text anchors on printed paper? -- Regards, Sergey A. Borshch

Re: [Kicad-developers] pcbnew fix: project file location

2013-03-11 Thread Dick Hollenbeck
Since there was some work done in this area recently, it would be interesting to know the version number. Even better would be for you to test the latest testing source code. On 03/11/2013 08:42 AM, Sergey A. Borshch wrote: > Hello everybody. > > If pcbnew launched with .brd as cmd-line argu

[Kicad-developers] pcbnew fix: project file location

2013-03-11 Thread Sergey A. Borshch
Hello everybody. If pcbnew launched with .brd as cmd-line argument (just filename, without absolute path), attempting to load file from current directory, pcbnew loads settings from kicad.pro in the templates directory instead of .pro in the current directory. It happens because pcbnew cre

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Adam Wolf
Yeah, virtualenv or something equivalent is a must for most Python development, but I don't think it necessarily applies here. If we had the python modules for Kicad completely separate, we could throw them into pypi (think perl's CPAN) and then folks who want to use virtualenv (or something equiv

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Edwin van den Oetelaar
Maybe worth to look at : http://virtualenvwrapper.readthedocs.org/en/latest/command_ref.html That is what I use for environments that have multiple configurations (and libraries). Keep going ! Edwin van den Oetelaar On Mon, Mar 11, 2013 at 2:19 PM, Miguel Angel Ajo Pelayo wrote: > I also think, t

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Adam Wolf
Miguel, I only know about Blender/Python on Windows. I think site-packages (dist-packages on Debian/Ubuntu) might be the right way to do it. Put the python modules in a place that's already on the PYTHONPATH that package managers already expect folks to put modules into. The idea of having an en

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Miguel Angel Ajo Pelayo
I also think, that it's important to provide a way for users to have access to our modules from outside kicad, that can be easily fixed letting them set (or appending to) PYTHONPATH, as I'm doing now for MacOSX, In linux are you sure they do like that?, in windows for sure. If you bundle your

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Adam Wolf
In general, system-wide python modules go into "site-packages". If this is the route we want to go, I think we can do something like this in our CMake to find the site-packages directory. execute_process ( COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"

Re: [Kicad-developers] Mac OSX build, with scripting, codename "wife"

2013-03-11 Thread Adam Wolf
I believe Blender has a Python environment of its own embedded inside of it, and doesn't reuse a system Python. Adam Wolf Wayne and Layne, LLC On Sun, Mar 10, 2013 at 10:21 PM, Dick Hollenbeck wrote: > > On Mar 10, 2013 8:32 PM, "Miguel Angel Ajo Pelayo" > wrote: > > > > > > On 11/03/2013, at

Re: [Kicad-developers] Scripting on Windows Fix

2013-03-11 Thread Miguel Angel Ajo Pelayo
Thanks dick, I think the class constructor it's a very clean/smart solution (set and forget at block level). I wonder if the wx/python , takes care of double-locks from the same thread. Totally right, was thinking the same, just that we don't have concurrency now without wxpython running on

Re: [Kicad-developers] Scripting on Windows Fix

2013-03-11 Thread Brian Sidebotham
On 11 March 2013 08:12, Dick Hollenbeck wrote: > > I will commit something in a few minutes. > > > > Brian if you can test that please, then you are da man. > > Its very late here, it was rushed, but I checked in something that might > help. > > in rev 3994. > Thanks Dick and Miguel! I will hav

Re: [Kicad-developers] Scripting on Windows Fix

2013-03-11 Thread Dick Hollenbeck
> I will commit something in a few minutes. > > Brian if you can test that please, then you are da man. Its very late here, it was rushed, but I checked in something that might help. in rev 3994. ___ Mailing list: https://launchpad.net/~kicad-developer

Re: [Kicad-developers] Scripting on Windows Fix

2013-03-11 Thread Dick Hollenbeck
On Sun, Mar 10, 2013 at 6:53 PM, Miguel Angel Ajo Pelayo wrote: > I'm starting to remember, yes, > > scripting/python_scripting.h:#define PY_BLOCK_THREADS(name)wxPyBlock_t > name = wxPyBeginBlockThreads() > scripting/python_scripting.h:#define PY_BLOCK_THREADS(name) > > > We needed that block