kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #31917
Re: [PATCH] Math expression support for pad editor.
-
To:
<kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Maciej Sumiński <maciej.suminski@xxxxxxx>
-
Date:
Fri, 24 Nov 2017 10:35:01 +0100
-
Authentication-results:
spf=pass (sender IP is 188.184.36.46) smtp.mailfrom=cern.ch;
-
In-reply-to:
<CADhJ=34W57juK8_yntYHwQqmJmKXGP=QP3HkC=Li4nKurUXjng@mail.gmail.com>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:99
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
Thank you Michael, I have just updated the files and pushed to my
branch. I am about to test the code on Windows and check for decimal
separator character issues.
Cheers,
Orson
On 11/24/2017 09:04 AM, Michael Geselbracht wrote:
> Hi,
> I have added some comments and examples to the code. The archive also
> contains a simple main() function (in main.cpp) and a Makefile in order to
> test the parser.
> The lemon parser generator is required to be installed and the macro
> "TEST_MODE" in numeric_evaluator.cpp needs to be set to 1.
>
> There is also a bugfix in "newString()". Without it an empty input string
> results in an invalid output string.
>
> - Michael
>
> On Thu, Nov 23, 2017 at 11:01 PM, Michael Geselbracht <
> mgeselbracht3@xxxxxxxxx> wrote:
>
>> Hi Russell,
>>
>> the class can handle variables in two ways:
>> NumericEvaluator eval;
>> 1. Assignment within expressions: eval.process("x=1; y=5");
>> 2. Assignment from c++ code: eval.setVar("posx", -3.4);
>>
>> So it would be up to the dialog to add a variable to an eval object
>> within a "focus lost" or "value changed" event.
>> In case of (2) the variable "posx" could be used in following expressions.
>> But this would require a shared eval object for all text boxes. Like one
>> object for each dialog.
>>
>> - Michael
>>
>>
>> On Thu, Nov 23, 2017 at 9:02 PM, Russell Oliver <roliver8143@xxxxxxxxx>
>> wrote:
>>
>>> Hi All,
>>>
>>> Just a query for Michael: can your parser be modified to include
>>> references to dialog variables, ie while writing an expression for y axis
>>> position, using the label posx or something would refer to the value
>>> currently within that text box?
>>>
>>> Kind Regards
>>> Russell
>>>
>>>
>>> On 24 Nov 2017 06:54, "jp charras" <jp.charras@xxxxxxxxxx> wrote:
>>>
>>> Le 23/11/2017 à 20:45, Michael Geselbracht a écrit :
>>>> Hi,
>>>> I have replaced the useless file info comments by a GPLv3 header in
>>> order to make my "libeval" code
>>>> license-wise compatible to the Kicad project.
>>>>
>>>> - Michael
>>>>
>>>>
>>>
>>> Thanks Michael,
>>>
>>> Could you add a bit of comments?
>>> Currently God and you know the meaning of the code.
>>> One day, only God will know the meaning of this code.
>>>
>>> Thanks.
>>>
>>>
>>> --
>>> Jean-Pierre CHARRAS
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help : https://help.launchpad.net/ListHelp
>>>
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
Attachment:
signature.asc
Description: OpenPGP digital signature
Follow ups
References
-
[PATCH] Math expression support for pad editor.
From: Russell Oliver, 2017-08-31
-
Re: [PATCH] Math expression support for pad editor.
From: Tomasz Wlostowski, 2017-08-31
-
Re: [PATCH] Math expression support for pad editor.
From: Michael Geselbracht, 2017-08-31
-
Re: [PATCH] Math expression support for pad editor.
From: Russell Oliver, 2017-09-01
-
Re: [PATCH] Math expression support for pad editor.
From: Michael Geselbracht, 2017-09-02
-
Re: [PATCH] Math expression support for pad editor.
From: Maciej Sumiński, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: Michael Geselbracht, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: Maciej Sumiński, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: Maciej Sumiński, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: Michael Geselbracht, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: jp charras, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: Russell Oliver, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: Michael Geselbracht, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: Michael Geselbracht, 2017-11-24