I don't see myself using it in eeschema, but having this in the footprint
editor or pcbnew would be awesome. Calculating the (x,y) of a pad often
requires some simple math. Freecad has this kind of math parser, very
useful.

Marcos

On Sun, Aug 27, 2017 at 12:03 PM, Russell Oliver <roliver8...@gmail.com>
wrote:

> Hi all,
>
> Attached is a patch that allows for the use of a mathematical expression
> when editing the value field of components in Eeschema.
>
> If editing the value field and the entered string begins with an equals
> sign "=" as you would when entering a formula into an Excel spreadsheet
> cell, it is compiled and parsed when the Enter button is pressed while the
> text entry is in focus.
>
> A valid expression is returned as a double value which is then printed
> with a format to remove trailing zeroes. An invalid expression will not
> change the text value.
>
> The expression parser is simple wrap of the C++ Mathematical Expression
> Toolkit Library (ExprTk)  written Arash Partow and is under the MIT licence
> [1].
>
> I think this provides a template for other numerical input fields within
> Kicad.
>
> [1] http://www.partow.net/programming/exprtk/index.html
>
> Kind Regards
> Russell
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to