kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #16567
Re: more pythonic scripting API for pcbnew
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 process by human brains
reading python) while retaining all the precision.
Best,
Miguel Ángel Ajo
[1] Note: 2 builds failed because I didn’t make the C++ “pcbnew” module for the tests.
On Sunday, 25 de January de 2015 at 02:56, Tomasz Wlostowski wrote:
> 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 float defaults for me to 32 bits ;) Doubles
> look ok, although the decimal part will be anyway truncated on the way
> from Python to C++ (if we decide to keep the nm as default unit)
>
> Cheers,
> T.
>
>
Follow ups
References
-
more pythonic scripting API for pcbnew
From: PTT, 2015-01-07
-
Re: more pythonic scripting API for pcbnew
From: LordBlick, 2015-01-07
-
Re: more pythonic scripting API for pcbnew
From: Adam Wolf, 2015-01-07
-
Re: more pythonic scripting API for pcbnew
From: LordBlick, 2015-01-15
-
Re: more pythonic scripting API for pcbnew
From: Miguel Ángel Ajo, 2015-01-15
-
Re: more pythonic scripting API for pcbnew
From: Brian Sidebotham, 2015-01-16
-
Re: more pythonic scripting API for pcbnew
From: Miguel Ángel Ajo, 2015-01-16
-
Re: more pythonic scripting API for pcbnew
From: LordBlick, 2015-01-16
-
Re: more pythonic scripting API for pcbnew
From: Miguel Ángel Ajo, 2015-01-16
-
Re: more pythonic scripting API for pcbnew
From: LordBlick, 2015-01-16
-
Re: more pythonic scripting API for pcbnew
From: Tomasz Wlostowski, 2015-01-16
-
Re: more pythonic scripting API for pcbnew
From: LordBlick, 2015-01-16
-
Re: more pythonic scripting API for pcbnew
From: Miguel Ángel Ajo, 2015-01-16
-
Re: more pythonic scripting API for pcbnew
From: Piers Titus van der Torren, 2015-01-16
-
Re: more pythonic scripting API for pcbnew
From: LordBlick, 2015-01-16
-
Re: more pythonic scripting API for pcbnew
From: Miguel Ángel Ajo, 2015-01-16
-
Re: more pythonic scripting API for pcbnew
From: Tomasz Wlostowski, 2015-01-24
-
Re: more pythonic scripting API for pcbnew
From: tiger12506, 2015-01-24
-
Re: more pythonic scripting API for pcbnew
From: Miguel Ángel Ajo, 2015-01-24
-
Re: more pythonic scripting API for pcbnew
From: Piers Titus van der Torren, 2015-01-25
-
Re: more pythonic scripting API for pcbnew
From: Tomasz Wlostowski, 2015-01-25
-
Re: more pythonic scripting API for pcbnew
From: Miguel Ángel Ajo, 2015-01-25
-
Re: more pythonic scripting API for pcbnew
From: Tomasz Wlostowski, 2015-01-25