Re: [Kicad-developers] Who controls gitlab.com/kicad?

2019-11-25 Thread Michael Geselbracht
That's me. Someone from Gitlab just contacted me. I totally missed this
mailing.
I have replied that I was not aware that my private group names may affect
other users and that I am willing to rename the group.

Is it sufficient to just rename the group name? Or will this only change
the displayed group name and leave the internal name as it is?

 - Michael


On Sun, Nov 24, 2019 at 7:58 PM Nick Østergaard  wrote:

> I don't know, but I have https://gitlab.com/kicad_eda that I have been
> using as a playground.
>
> søn. 24. nov. 2019 15.42 skrev Seth Hillbrand :
>
>> Hi All-
>>
>> As you have heard, we are moving from Launchpad to GitLab.  However, we
>> have been unable to secure the https://www.gitlab.com/kicad group name
>> for the project.  The name appears to already be taken.  However, this is
>> not a public group or user, so we don't know who controls the name.
>>
>> Does anyone on the list control the "kicad" name at GitLab?  In the
>> interim, we've registered https://www.gitlab.com/kicad_pcb but it would
>> be much better if we could use the shorter name.
>>
>>
>> Thanks-
>> Seth
>>
>>
>> KiCad Services Corporation [image: KiCad Services Corporation Logo]
>> Seth Hillbrand
>> *Lead Developer*
>> +1-530-302-5483‬ <+12126039372>
>> Davis, CA
>> www.kipro-pcb.comi...@kipro-pcb.com
>> https://twitter.com/KiProEDA 
>> https://www.linkedin.com/company/kicad
>> 
>> ___
>> 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
>
___
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


Re: [Kicad-developers] bug in numeric_evaluator?

2018-03-13 Thread Michael Geselbracht
It is a bug/typo that just happens to work. There is no need to check for
\0. There used to be a comparison like "ch == clDecSep". Ugly but it should
be safe for now.

if( isDecSep( ch ) && sepCount )
   break;

should do the trick.

 - Michael


On Tue, Mar 13, 2018 at 11:10 AM, Jeff Young  wrote:

> Yuck.  It’s clever code all right.  The “correct” version would be:
>
> if( !ch || ( isDecSep( ch ) && sepCount ) )
>break;
>
> but it’s a whole 3 characters longer. ;)
>
> I’ll fix this in my 6.0 tree (which already has libeval re-formatted to
> Kicad standards), but I suggest we leave it sleeping for 5.0.
>
> Cheers,
> Jeff.
>
>
> On 13 Mar 2018, at 02:20, Jon Evans  wrote:
>
> +Michael
>
> This looks like "clever" code so I can't tell if this is a bug or not
> without running through a bunch of test cases which I'm not going to do
> right now.
> Do you see any issues with the operation of the code, Mark, or just the
> warning?
>
> -Jon
>
> On Mon, Mar 12, 2018 at 9:28 PM, Mark Roszko 
> wrote:
>
>> Not sure where to even begin looking at libeval since it looks scary but
>> MSVC complains:
>>
>> D:\kicad-source-mirror\common\libeval\numeric_evaluator.cpp(216):
>> warning C4805: '==': unsafe mix of type 'char' and type 'bool' in operation
>>
>> which is:
>>
>>   auto ch = clToken.input[clToken.pos];
>>   do {
>>  if (ch == isDecSep(ch) && sepCount) break;
>>
>>
>> ch is a char
>>
>> isDecSep returns bool
>>
>> char == bool?
>>
>>
>>
>> --
>> Mark
>>
>> ___
>> 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
>
>
>
___
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


Re: [Kicad-developers] A fix for our TEXT_CTRL_EVAL class.

2018-02-25 Thread Michael Geselbracht
The original idea was to have one evaluator object per dialog so that 
several text entries could access a common set of variables.
Now that there is one evaluator object per entry field I think there is 
no reason to retain the (single) input text in clear().
If there is ever to be support for variables the class could be extended 
to support a shared object with a map of variables. This could be useful 
in the footprint editor.




On 25.02.2018 12:37, Jeff Young wrote:
Hmmm, pObj isn’t stored.  Since we use an instance of NumericEvaluator 
for each control, we don’t actually need the storage to be a map 
(there’s only ever one key in it).  For now, probably easiest to just do:


   NumericEvaluator::clear(constvoid*pObj)
   {
free(clToken.token);
clToken.token=nullptr;
clToken.input=nullptr;
bClError=true;
+
+if(bClTextInputStorage)
+clObjMap.clear();
   }


On 25 Feb 2018, at 11:26, Jeff Young > wrote:


Hi JP,

Rather than calling evaluate() in the new TEXT_CTRL_EVAL::SetValue(), 
I’d call clear(), and add these two lines to NumericEvaluator::clear():


void
   NumericEvaluator::clear()
   {
free(clToken.token);
clToken.token=nullptr;
clToken.input=nullptr;
bClError=true;
+
+if(bClTextInputStorage)
+clObjMap[pObj]=nullptr;
   }
That will zero out the stored text.

Cheers,
Jeff.



On 25 Feb 2018, at 10:17, jp charras > wrote:


Hi Orson,

Could you have a look into this small patch.
I am not sure I used the better way to fix an issue.

It fixes an issue when using SetValue() to change the value shown by 
this widget.


The issue was due to the fact TEXT_CTRL_EVAL stores internally the 
last entered value in a buffer.
So when calling SetValue() after a value was already entered, and if 
we try to modify
the displayed value by calling SetValue(), as soon as the widget has 
the focus, the previous value

replaces the new value.

This is easy to see in Move Exactly dialog:
- enter a value
- reset the value by the Reset button
- move the cursor to the corresponding text control widgets and 
click on it to give it the focus.


--
Jean-Pierre CHARRAS
___
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




___
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


Re: [Kicad-developers] [PATCH] Math expression support for pad editor.

2017-11-25 Thread Michael Geselbracht
That was quick. Thank you Orson for taking care of this feature.
I often use math expressions in entry fields not only in Kicad
and I am glad that this is an official feature now.

 - Michael


On Fri, Nov 24, 2017 at 10:12 PM, Maciej Suminski <maciej.sumin...@cern.ch>
wrote:

> Great, I have just pushed the patches to the master branch. Michael,
> thank you very much. Footprint creation will be a pleasure now.
>
> Cheers,
> Orson
>
> On 11/24/2017 05:27 PM, Wayne Stambaugh wrote:
> > I'm fine with merging it if it meets with your approval.  I plan
> > announcing the freeze on Sunday so use your best judgment.
> >
> > Cheers,
> >
> > Wayne
> >
> > On 11/24/2017 11:18 AM, Maciej Sumiński wrote:
> >> I patched NumericEvaluator to use the system locale to pick the right
> >> decimal separator character. I have tested it on Windows and Linux, no
> >> issues found. In my opinion it is ready to be merged and could be a nice
> >> bonus for v5. Sincerely, I love this feature, so I might be a bit
> biased.
> >>
> >> Cheers,
> >> Orson
> >>
> >> On 11/24/2017 10:35 AM, Maciej Sumiński wrote:
> >>> 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 <
> >>>> mgeselbrac...@gmail.com> 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 <
> roliver8...@gmail.com>
> >>>>> 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.char...@wanadoo.fr> 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,
> &

Re: [Kicad-developers] [PATCH] Math expression support for pad editor.

2017-11-23 Thread Michael Geselbracht
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 <roliver8...@gmail.com>
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.char...@wanadoo.fr> 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@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
>
>
___
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


Re: [Kicad-developers] [PATCH] Math expression support for pad editor.

2017-11-23 Thread Michael Geselbracht
Hello Jean-Pierre,

I need to remember that one.  But you are right of course. I will add some
comments and examples.

 - Michael


On Thu, Nov 23, 2017 at 8:54 PM, jp charras <jp.char...@wanadoo.fr> 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@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


Re: [Kicad-developers] [PATCH] Math expression support for pad editor.

2017-11-23 Thread Michael Geselbracht
Hi,
these files were written by me. The comment blocks at the top are generated
by Eclipse ("let" is my login name).
I am afraid that the coding style is about the opposite of the rules for
Kicad. But if you can use the code feel free to do so.

The current implementation has some issues:
1. The "%g" format in sprintf() does some rounding  which is probably
undesired (15.12356 -> 15.1236).
2. The decimal separator is set to '.' the input language settings by the
user are not taken into account.
3. I did not check for memory leaks or buffer overflows.

 - Michael


On Thu, Nov 23, 2017 at 2:36 PM, Maciej Sumiński <maciej.sumin...@cern.ch>
wrote:

> We still do not have the feature freeze, so there is still a chance to
> shove it to the master branch. I feel a bit uneasy about exprtk (over 1
> MB header file), but Michael's parser approach seems like a good
> solution to me. We can extend it later as the lemon format is not very
> complex.
>
> I took Michael's parser, but modified the way the expression evaluation
> is done in dialog windows. Instead of adding the evaluator and focus
> event handlers to each dialog, I wrote a wrapper around wxTextCtrl that
> handles the process. I also converted most of pcbnew text input controls
> to use the wrapper, so with the patch merged one should be able to
> evaluate math in almost every text control that expects a numeric value.
> If you are interested, the patches are in my branch [1].
>
> My only concern is about two files (libeval/numeric.[h,cpp], [2]) that
> have an author, but no license. Michael, where did you get these files?
> We should contact the author to get permission to use the code.
> Otherwise we will need to replace these files.
>
> Regards,
> Orson
>
> 1. https://code.launchpad.net/~orsonmmz/kicad/+git/kicad/+ref/expr_eval
> 2.
> https://git.launchpad.net/~orsonmmz/kicad/tree/common/
> libeval/numeric_evaluator.cpp?h=expr_eval
>
> On 09/02/2017 05:49 PM, Michael Geselbracht wrote:
> > Creating a variable looks a bit complicated to me. And if I see it
> > correctly it is not possible with exprtk to use constants with units
> > (0.16").
> > Maybe it would be possible to provide functions that do the math like
> > fromInch(0.16).
> >
> > That is the beauty of a parser generator. You can define the desired
> syntax
> > yourself.
> >
> > I have added support for variables to my parser approach. Now I can write
> > things like this:
> >
> > [Scratch Pad, global unit set to inch]
> > e=0.4mm; L=0.8mm; E=2.5mm
> >
> > PosX: -3.5*e
> > PosY: E/2-L/2+0.1mm
> >
> > I have attached a patch of my implementation. It adds the evaluator
> (object
> > size ~120kB) and includes it to the pad- and footprint dialogs.
> > The pad dialog contains a (misaligned and too small) scratch pad.
> >
> > The code is a mess and wouldn't make it into Kicad. But it works for me
> and
> > maybe you'll end up with your own parser solution.
> > The interface is not too different from exprtk so you wouldn't have to
> > throw away your work. If you want to play with the grammar
> > file you'll need the lemon parser generator ($ lemon grammar.lemon).
> >
> >  - Michael
> >
> >
> > On Fri, Sep 1, 2017 at 3:23 AM, Russell Oliver <roliver8...@gmail.com>
> > wrote:
> >
> >> Scratch Pad:
> >> I think this will be easily doable as an additional text box in the
> >> dialog, which is then added to the beginning of the expression for each
> >> text box. The format for the math library is as follows
> >>
> >>(a) Initialise x to zero
> >>var x;
> >>
> >>(b) Initialise y to three
> >>var y := 3;
> >>
> >>(c) Initialise z to the expression
> >>var z := if (max(1,x + y) > 2,w,v);
> >>
> >> Global variable support:
> >> I think this is possible but a simpler path might be to use a global
> >> scratch pad, which would be added first to the beginning of the
> expression
> >> used for the text box.
> >>
> >> Currently the expression text ie something like "posx + 1" isn't saved
> >> within the dialog or for the component.
> >>
> >> Regards
> >> Russell
> >>
> >>
> >>
> >>
> >>
> >> On Fri, Sep 1, 2017 at 7:46 AM Michael Geselbracht <
> >> mgeselbrac...@gmail.com> wrote:
> >>
> >>> Hi,
> >>>
> >>> I have tested the patch and I really like this feature. This automatic
> >>> variabl

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-10-29 Thread Michael Geselbracht

Hi,

just tested your patches. I think it is an improvement over the current 
master.
But with this patch eeschema crashes on opening some (hierarchical) 
sheets either by double-clicking or using the navigator.


I have changed eeschema/schematic_undo_redo.cpp:182
from

if( commandToUndo->m_Status == UR_WIRE_IMAGE )

to

if( commandToUndo && commandToUndo->m_Status == UR_WIRE_IMAGE )

and now it seems to work.

 - Michael


Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
0x7fffe6faf7e4 in SCH_EDIT_FRAME::SaveCopyInUndoList 
(this=0x1eca430, aItemsList=..., aTypeCommand=UR_CHANGED, aAppend=true, 
aTransformPoint=...)

    at /data/src/kicad-source-mirror/eeschema/schematic_undo_redo.cpp:182
182 if( commandToUndo->m_Status == UR_WIRE_IMAGE )
(gdb) bt
#0  0x7fffe6faf7e4 in SCH_EDIT_FRAME::SaveCopyInUndoList 
(this=0x1eca430, aItemsList=..., aTypeCommand=UR_CHANGED, aAppend=true, 
aTransformPoint=...)

    at /data/src/kicad-source-mirror/eeschema/schematic_undo_redo.cpp:182
#1  0x7fffe6d987a2 in SCH_EDIT_FRAME::SchematicCleanUp 
(this=0x1eca430, aAppend=true) at 
/data/src/kicad-source-mirror/eeschema/bus-wire-junction.cpp:536
#2  0x7fffe6eb0c0e in SCH_EDIT_FRAME::DisplayCurrentSheet 
(this=0x1eca430) at /data/src/kicad-source-mirror/eeschema/hierarch.cpp:302
#3  0x7fffe6f053fc in SCH_EDIT_FRAME::OnLeftDClick (this=0x1eca430, 
aDC=0x7fffcfe0, aPosition=...)

    at /data/src/kicad-source-mirror/eeschema/onleftclick.cpp:410
#4  0x7fffe70c8e6f in EDA_DRAW_PANEL::OnMouseEvent (this=0x1edf140, 
event=...) at /data/src/kicad-source-mirror/common/draw_panel.cpp:1134
#5  0x767d11fe in 
wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, 
wxEvent&) const ()

   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#6  0x769576e7 in 
wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, 
wxEvtHandler*, wxEvent&) ()

   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#7  0x769577db in wxEventHashTable::HandleEvent(wxEvent&, 
wxEvtHandler*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#8  0x76957b8b in wxEvtHandler::TryHereOnly(wxEvent&) () from 
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#9  0x76957c13 in wxEvtHandler::ProcessEventLocally(wxEvent&) () 
from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#10 0x76957c75 in wxEvtHandler::ProcessEvent(wxEvent&) () from 
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#11 0x770ec77b in 
wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) () from 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#12 0x769579e7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () 
from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#13 0x76e984c6 in ?? () from 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#14 0x74d1daec in ?? () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#15 0x746f2fa5 in g_closure_invoke () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x74704fc1 in ?? () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x7470d7f9 in g_signal_emit_valist () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x7470e08f in g_signal_emit () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x74e3593c in ?? () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#20 0x74d1c284 in gtk_propagate_event () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#21 0x74d1c63b in gtk_main_do_event () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#22 0x74990c8c in ?? () from 
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#23 0x73fae197 in g_main_context_dispatch () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0

---Type  to continue, or q  to quit---q
Quit
(gdb) p *commandToUndo
Cannot access memory at address 0x0



Application: kicad
Version: (2017-10-28 revision b416c3b4b)-seth, debug build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.10.0-37-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.58.0
    Curl: 7.47.0
    Compiler: GCC 5.4.0 with C++ ABI 1009

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_ACTION_MENU=OFF
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_SPICE=ON



On 28.10.2017 02:09, Seth Hillbrand wrote:

Hi All-

Quick ping on this.  Master has moved on, so I've re-based the patch 
set to the current master, in case anyone is up for looking at it.  I 
also split out the largest patch into a couple of logical blocks, in 
hopes of making it easier to review.


Lastly, I found and fixed a corner case where removing two segments on 
the same junction broke the undo/redo stack.


Thanks!
Seth

On 

Re: [Kicad-developers] GerbView GAL

2017-09-11 Thread Michael Geselbracht
Hi,
the drills are rendered correctly now, thank you. If i recall correctly
this (the GAL Gerbview) is another milestone towards v5.

A (very) minor issue remains though: Exiting Gerbview takes a few seconds
if several layers are loaded.
The time seems to related to the complexity of the layers. A simple
silkscreen (B.Silk) or a big ground plane
does not take long to exist from. But if F.Cu, B.Cu + F.Silk layers are
loaded there is a noticeable delay.


 - Michael


On Tue, Sep 12, 2017 at 12:25 AM, Michael Geselbracht <
mgeselbrac...@gmail.com> wrote:

> Ok, first zip then gmail; I don't know if my last post has reached anyone.
> I tried to send a proper file...
>
> The context menu is working now as expected.
>
>  - Michael
>
>
> On Mon, Sep 11, 2017 at 11:56 PM, Michael Geselbracht <
> mgeselbrac...@gmail.com> wrote:
>
>> Hi,
>> the build process is working right now.
>> In the meantime I recreated the zip file. Apparently I forgot the -r
>> option... (beginner's error).
>>
>>  - Michael
>>
>>
>> On Mon, Sep 11, 2017 at 11:48 PM, Jon Evans <j...@craftyjon.com> wrote:
>>
>>> Hi Michael,
>>>
>>> The first issue you raised with the layer manager context menu has now
>>> been fixed I think; please check it if you have a chance.  Could you send
>>> me a drill file (maybe off the list) that does not render for you?  I
>>> checked a few of my drill files and they do render.
>>>
>>> Thanks,
>>> Jon
>>>
>>> On Mon, Sep 11, 2017 at 5:16 PM, Jon Evans <j...@craftyjon.com> wrote:
>>>
>>>> HI Michael,
>>>> Thanks for the report, I will look in to this -- I suspect I broke the
>>>> drill display in a recent commit.
>>>> But, your attachment did not come through for me, it just shows an
>>>> empty zip file for me.
>>>>
>>>> Thanks,
>>>> Jon
>>>>
>>>> On Mon, Sep 11, 2017 at 5:07 PM, Michael Geselbracht <
>>>> mgeselbrac...@gmail.com> wrote:
>>>>
>>>>> Hi.
>>>>> although I am not a maintainer I took the liberty to test the code.
>>>>> I am not sure if this is appropriate but since I am using kicad-master
>>>>> on a daily basis a merge into master would directly affect me.
>>>>>
>>>>> Just in case you do not already know there seem to be some issues with
>>>>> the gerbview_gal branch:
>>>>>
>>>>> 1. Layer context menu entries "Hide all layers but active" and "Always
>>>>> hide all layers but active" do not seem to work. All layers are initially
>>>>> hidden and "always" is a NOP.
>>>>> 2. NPTH drills are not displayed correctly or no drills are displayed
>>>>> at all.
>>>>>
>>>>> I have attached a zip file with two examples. Test1 is a NPTH drill
>>>>> file that is not displayed correctly. Test2 files are not displayed at all
>>>>> (black screen).
>>>>> There a two screenshots for test1.
>>>>>
>>>>> Tested under Linux with NVidia drivers.
>>>>>
>>>>>  - Michael
>>>>>
>>>>>
>>>>> Application: gerbview
>>>>> Version: (2017-09-09 revision 61b588353)-gerbview_gal, release build
>>>>> Libraries:
>>>>> wxWidgets 3.0.2
>>>>> libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
>>>>> Platform: Linux 4.10.0-33-generic x86_64, 64 bit, Little endian, wxGTK
>>>>> Build Info:
>>>>> wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+
>>>>> 2.24
>>>>> Boost: 1.58.0
>>>>> Curl: 7.47.0
>>>>> Compiler: GCC 5.4.0 with C++ ABI 1009
>>>>>
>>>>> Build settings:
>>>>> USE_WX_GRAPHICS_CONTEXT=OFF
>>>>> USE_WX_OVERLAY=OFF
>>>>> KICAD_SCRIPTING=ON
>>>>> KICAD_SCRIPTING_MODULES=ON
>>>>> KICAD_SCRIPTING_WXPYTHON=ON
>>>>> KICAD_SCRIPTING_ACTION_MENU=OFF
>>>>> BUILD_GITHUB_PLUGIN=ON
>>>>> KICAD_USE_OCE=ON
>>>>> KICAD_SPICE=ON
>>>>>
>>>>>
>>>>> On Mon, Sep 11, 2017 at 9:26 PM, Jon Evans <j...@craftyjon.com> wrote:
>>>>>
>>>>>> Thanks JP.
>>>>>> For #2, it is a m

Re: [Kicad-developers] GerbView GAL

2017-09-11 Thread Michael Geselbracht
Ok, first zip then gmail; I don't know if my last post has reached anyone.
I tried to send a proper file...

The context menu is working now as expected.

 - Michael


On Mon, Sep 11, 2017 at 11:56 PM, Michael Geselbracht <
mgeselbrac...@gmail.com> wrote:

> Hi,
> the build process is working right now.
> In the meantime I recreated the zip file. Apparently I forgot the -r
> option... (beginner's error).
>
>  - Michael
>
>
> On Mon, Sep 11, 2017 at 11:48 PM, Jon Evans <j...@craftyjon.com> wrote:
>
>> Hi Michael,
>>
>> The first issue you raised with the layer manager context menu has now
>> been fixed I think; please check it if you have a chance.  Could you send
>> me a drill file (maybe off the list) that does not render for you?  I
>> checked a few of my drill files and they do render.
>>
>> Thanks,
>> Jon
>>
>> On Mon, Sep 11, 2017 at 5:16 PM, Jon Evans <j...@craftyjon.com> wrote:
>>
>>> HI Michael,
>>> Thanks for the report, I will look in to this -- I suspect I broke the
>>> drill display in a recent commit.
>>> But, your attachment did not come through for me, it just shows an empty
>>> zip file for me.
>>>
>>> Thanks,
>>> Jon
>>>
>>> On Mon, Sep 11, 2017 at 5:07 PM, Michael Geselbracht <
>>> mgeselbrac...@gmail.com> wrote:
>>>
>>>> Hi.
>>>> although I am not a maintainer I took the liberty to test the code.
>>>> I am not sure if this is appropriate but since I am using kicad-master
>>>> on a daily basis a merge into master would directly affect me.
>>>>
>>>> Just in case you do not already know there seem to be some issues with
>>>> the gerbview_gal branch:
>>>>
>>>> 1. Layer context menu entries "Hide all layers but active" and "Always
>>>> hide all layers but active" do not seem to work. All layers are initially
>>>> hidden and "always" is a NOP.
>>>> 2. NPTH drills are not displayed correctly or no drills are displayed
>>>> at all.
>>>>
>>>> I have attached a zip file with two examples. Test1 is a NPTH drill
>>>> file that is not displayed correctly. Test2 files are not displayed at all
>>>> (black screen).
>>>> There a two screenshots for test1.
>>>>
>>>> Tested under Linux with NVidia drivers.
>>>>
>>>>  - Michael
>>>>
>>>>
>>>> Application: gerbview
>>>> Version: (2017-09-09 revision 61b588353)-gerbview_gal, release build
>>>> Libraries:
>>>> wxWidgets 3.0.2
>>>> libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
>>>> Platform: Linux 4.10.0-33-generic x86_64, 64 bit, Little endian, wxGTK
>>>> Build Info:
>>>> wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+
>>>> 2.24
>>>> Boost: 1.58.0
>>>> Curl: 7.47.0
>>>> Compiler: GCC 5.4.0 with C++ ABI 1009
>>>>
>>>> Build settings:
>>>> USE_WX_GRAPHICS_CONTEXT=OFF
>>>> USE_WX_OVERLAY=OFF
>>>> KICAD_SCRIPTING=ON
>>>> KICAD_SCRIPTING_MODULES=ON
>>>> KICAD_SCRIPTING_WXPYTHON=ON
>>>> KICAD_SCRIPTING_ACTION_MENU=OFF
>>>> BUILD_GITHUB_PLUGIN=ON
>>>> KICAD_USE_OCE=ON
>>>> KICAD_SPICE=ON
>>>>
>>>>
>>>> On Mon, Sep 11, 2017 at 9:26 PM, Jon Evans <j...@craftyjon.com> wrote:
>>>>
>>>>> Thanks JP.
>>>>> For #2, it is a matter of the difference between OpenGL and Cairo
>>>>> implementation of transparency and occlusion in our GAL.  Cairo also has
>>>>> the issue that each draw item is composited with transparency, even on a
>>>>> single layer. (maybe that is what is wanted with transparent items
>>>>> sometimes, but it is an inconsistency between OpenGL and Cairo that needs
>>>>> to be resolved).
>>>>>
>>>>> I think one solution could be to interpret negative items at the
>>>>> geometry creation stage rather than at the rendering stage.  That is, if
>>>>> you have a negative item on a layer, do a boolean subtraction from the
>>>>> existing positive geometry.  Then just pass the resulting geometry to the
>>>>> GAL to draw, rather than trying to add support to GAL for drawing
>>>>> "subtractively&quo

Re: [Kicad-developers] [PATCH] Math expression support for pad editor.

2017-08-31 Thread Michael Geselbracht
Hi,

I have tested the patch and I really like this feature. This automatic
variable assignment will sure come in handy.
How about adding a kind of scratch pad (a single line should do) to the
footprint editor so that one can add variables (measurements) given in
datasheets?
Like "c1=2.9; e=0.635" in the scratch pad and then in PosX field: "-c1/2 "
and PosY: "-1.5*e" in order to place the first pad.

  - Michael


On Thu, Aug 31, 2017 at 3:58 PM, Tomasz Wlostowski <
tomasz.wlostow...@cern.ch> wrote:

> On 31.08.2017 15:27, Russell Oliver wrote:
> > Hi All.
> >
> > As a follow up to my earlier post, attached is a patch that implement
> > math expressions in the pad editor as well.
> >
> > A nifty feature is that the fields can be referenced from each other.
> > currently the fields are referenced by the following names.
> > - posx, posy, sizex, sizey, offsetx, offsetx, drillx, drillx.
>
> Hi Russell,
>
> Didn't have the time to check your patch yet, but I came up with an
> idea: add global variable support to the math parser, so that if you
> place a text anywhere in the design assigning to a variable (e.g.
> var=10), it will be updated in any of the expressions that reference it.
>
> Cheers,
> Tom
>
> ___
> 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


Re: [Kicad-developers] [RFC] Proof of concept of mathematical expression input for text fields.

2017-08-28 Thread Michael Geselbracht
Incidentally I have written a similar calculator last week and included it
in Pcbnew. I used the lemon parser generator
but exprtk might be a better choice. That way it should be easy to extend
the calculator with support for
variables without re-inventing the wheel.

I wanted to mimick the behaviour of Solidworks or CorelDraw; they do not
use '=' to introduce a formula.
The text is always interpreted as expression and constants may have units.

So if I want to move a FP from x:80.442 50mil to the right I write (or
append) "80.442+50mil".
A difference is that I use the OnTextFocusLost event to start the
evaluation and OnTextFocusGet to restore
the previous text just before the evaluation (ups, should have been 25mils).

The next step would be to integrate the evaluator in the footprint editor
as well. But it does not seem to be wise
right now ;).

 - Michael



On Mon, Aug 28, 2017 at 2:45 PM, hauptmech  wrote:

> or perhaps the python parser is already used in enough kicad builds that
> it should be used?
>
> On 28/08/17 19:56, Tomasz Wlostowski wrote:
>
>> On 27.08.2017 22:28, Marco Ciampa wrote:
>>
>>> +1 muparser is already present in many distros:
>>>
>>> apt-cache search muparser
>>> libmuparser-dev - fast mathematical expressions parse library
>>> (development)
>>> libmuparser-doc - fast mathematical expressions parser library
>>> (documentation)
>>> libmuparser2v5 - fast mathematical expressions parser library (runtime)
>>>
>> ...And exprtk is a single header file, which compiles on any OS. There
>> is life outside Linux, too.
>>
>> - my 5 cents,
>> Tom
>>
>>
>> ___
>> 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
>
___
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