Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread Miguel Ángel Ajo
A little experiment, with the suggested * mm / * inch notation. https://github.com/KiCad/kicad-python/pull/6/files [1] Look specially at the tests (last files). Feel free to comment over the code. If we could default to mm (my preferred) or inches, we could save a lot of code (specially to pr

Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread Tomasz Wlostowski
On 25.01.2015 02:50, Miguel Ángel Ajo wrote: > > I was just testing that. > > Python floats (in all architectures) are double, so the 52 bit fraction (11 > bit exp) is always > going to hold more information that the 32bits wxPoint /wxSize can hold. Hi Miguel, Sorry, I'm a C/C++ guy, so floa

Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread Miguel Ángel Ajo
I was just testing that. Python floats (in all architectures) are double, so the 52 bit fraction (11 bit exp) is always going to hold more information that the 32bits wxPoint /wxSize can hold. So that’s not a point. I’m experimenting with both options, to see what’s more readable. M

Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread Tomasz Wlostowski
On 25.01.2015 02:04, Piers Titus van der Torren wrote: > While I understand that for internal units it's good to use integers and > hence small units, for this high level python api I don't see much benefits > for not using floats and sensible default Dear Peter, 32-bit float is bad simply becau

Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread Piers Titus van der Torren
While I understand that for internal units it's good to use integers and hence small units, for this high level python api I don't see much benefits for not using floats and sensible default units like degrees and mm. Keeping the internal api intact still allows for low level scripting and using in

Re: [Kicad-developers] FOSDEM plans

2015-01-24 Thread Kaspar Emanuel
I'll also check email and #kicad IRC (user: kasbah) from my phone when I have Wifi. On 24 January 2015 at 23:20, Kaspar Emanuel wrote: > I'll be arriving on Friday at around 5 pm and staying near the University > in a small apartment found through AirBnB. Should be up for a beer Friday > night.

Re: [Kicad-developers] FOSDEM plans

2015-01-24 Thread Kaspar Emanuel
I'll be arriving on Friday at around 5 pm and staying near the University in a small apartment found through AirBnB. Should be up for a beer Friday night. I've installed Whatsapp and added Wayne and Miguel. My number is +44 7543 520224. Maybe send me a message when you add me to see if it works ok.

Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread Miguel Ángel Ajo
Hmm, I’m actually liking Tom’s suggestion, sounds quite natural to me. pcb.create_module(ref=‘A1’, position=(10 * mm, 10 * mm)) but also accepting pcb.create_module(ref=‘B1’, position=Point(10 * mm, 10 * mm)) I’d do the function parameter translation into Point automatically, even if I belie

Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread tiger12506
I have no weight in the discussion, but I really like Tom's suggestion here. It allows you to use them as if they were units. 10 * mm is almost syntactically identical to 10mm. And they don't get in the way with a bunch of boilerplate, like some of the other suggestions do. ~JS On 1/24/2015

Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread Miguel Ángel Ajo
On Saturday, 24 de January de 2015 at 20:02, LordBlick wrote: > In response to a message written on 24.01.2015, 11:58, from Miguel Ángel Ajo: > I hope that the current possibility to use the original „import pcbnew” will > remain intact. Internal units under KiCAD as integers are the most pre

Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread Tomasz Wlostowski
On 16.01.2015 18:43, Miguel Ángel Ajo wrote: > > The user shouldn’t need to know what an IU is unless he really wants, for some > reason. > Hi Miguel, Why make things complicated here? Given that the choice of IUs in pcbnew is very reasonable and easy to understand, I see no reason for hiding tha

Re: [Kicad-developers] Bug: Pads on silkscreen

2015-01-24 Thread LordBlick
In response to a message written on 20.01.2015, 13:10, from jp charras: Le 20/01/2015 12:29, LordBlick a écrit : Hello, I have got a problem with recent build with plotting on Gerber with option „Plot pads on silkscreen”. Received file always include pads regardless of checkbox state. This opt

Re: [Kicad-developers] Mirrored printing broken on wxWidgets 3.0.2

2015-01-24 Thread Wayne Stambaugh
On 1/17/2015 2:36 AM, jp charras wrote: > Le 16/01/2015 22:03, Wayne Stambaugh a écrit : >> I recently discovered that the mirrored printing in Pcbnew is broken on >> windows. At first I thought it was a 32 bit versus 64 bit issue but I >> discovered that it is due to the wxWidgets version. When

Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread LordBlick
In response to a message written on 24.01.2015, 11:58, from Miguel Ángel Ajo: I hope that the current possibility to use the original „import pcbnew” will remain intact. Internal units under KiCAD as integers are the most precise form. As python script writer I don't need nothing else. I also d

Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread Miguel Ángel Ajo
On Saturday, 24 de January de 2015 at 14:25, Piers Titus van der Torren wrote: > On Sat, Jan 24, 2015 at 11:58 AM, Miguel Ángel Ajo (mailto:majop...@redhat.com)> wrote: > > Hi, I’ve been playing a bit around, being able to locally define the > > default units [1] > > but I’m not satisfied with

Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread Miguel Ángel Ajo
Interesting update, about CI, I’ve been able to integrate jenkins back to github pull requests: https://github.com/KiCad/kicad-python/pull/5 Now when there is a pull request on kicad-python, the CI passes to make sure it’s ok. If we ever move things to github, we could do such thing for the

Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread Piers Titus van der Torren
On Sat, Jan 24, 2015 at 11:58 AM, Miguel Ángel Ajo wrote: > Hi, I’ve been playing a bit around, being able to locally define the > default units [1] > but I’m not satisfied with it, because the implementation is not thread > safe (big > sad-face “:-(“ ) > > Another option would be to use the def

Re: [Kicad-developers] more pythonic scripting API for pcbnew

2015-01-24 Thread Miguel Ángel Ajo
Hi, I’ve been playing a bit around, being able to locally define the default units [1] but I’m not satisfied with it, because the implementation is not thread safe (big sad-face “:-(“ ) (ignore the Point(x,y) Size(x,y) passing, Piers, you really convinced me it’s more reasonable to just use (