[Kicad-developers] Request in s-expression format: general user data or comment

2013-06-23 Thread Thiadmer Riemersma
Hello everyone,

I have a request for the s-expression format for footprints: a field for
data that is not used by pcbnew or the module editor, but that is preserved
(by the module editor). Something like (fp_userdata general text string).

In the alternative, I would like to request to be able to put comments in
an s-expression. Those comments need not be preserved (by the module
editor).

Rationale:

I am developing a footprint wizard, based on templates. But a wizard
won't be of much use if you cannot modify the footprints later. So, this
wizard reads back footprints and allows you to adjust them. However,
detecting which template was used (and with what settings) may not be
deterministically feasible, given the number of options.

So, the best option is to store that information in the generated
footprint. Even if the user changes the footprint in the module editor, the
wizard would still be able to get the correct template.

In the alternative (store the information in a comment), the user would be
able to adjust the footprint with the wizard, as long as no changes have
been made to it in the module editor. This is good enough for me.

Question:

I do not appear to be able to select an s-expression library in pcbnew. Is
this correct? Or do I need to build KiCad with a special option?

Regards,
Thiadmer Riemersma
___
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] Request in s-expression format: general user data or comment

2013-06-23 Thread Dick Hollenbeck
On Jun 23, 2013 4:45 AM, Thiadmer Riemersma thiadmer.riemer...@gmail.com
wrote:

 Hello everyone,

 I have a request for the s-expression format for footprints: a field for
data that is not used by pcbnew or the module editor, but that is preserved
(by the module editor). Something like (fp_userdata general text string).

 In the alternative, I would like to request to be able to put comments in
an s-expression. Those comments need not be preserved (by the module
editor).

Any line whose first character is a # is a comment now.  Should be no limit
to th numbrr of such lines.  So your alternative is being fulfilled
already, courtesy of yours truly.


 Rationale:

 I am developing a footprint wizard, based on templates. But a wizard
won't be of much use if you cannot modify the footprints later. So, this
wizard reads back footprints and allows you to adjust them. However,
detecting which template was used (and with what settings) may not be
deterministically feasible, given the number of options.

 So, the best option is to store that information in the generated
footprint. Even if the user changes the footprint in the module editor, the
wizard would still be able to get the correct template.

 In the alternative (store the information in a comment), the user would
be able to adjust the footprint with the wizard, as long as no changes have
been made to it in the module editor. This is good enough for me.

 Question:

 I do not appear to be able to select an s-expression library in pcbnew.
Is this correct? Or do I need to build KiCad with a special option?

Look at how the test program is built down in /tools.  I wrote a document
model parsing function that gives you a boost propert tree as a document.

A second path is to try and lind to libcommon, but this will flop due to
unredolved ecternals if you stray too far from richio and dsnlexer.

A final and third option is to link with _pcbnew.so which basically all of
pcbnew in DSO form.  Currently this is only built is SCRIPTING is bulit,
but I will be changing this in the next handful of weeks so it always gets
built.

Are you using wx as your ui?

Dick


 Regards,
 Thiadmer Riemersma

 ___
 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] Request in s-expression format: general user data or comment

2013-06-23 Thread Dick Hollenbeck
On Jun 23, 2013 5:16 AM, Dick Hollenbeck d...@softplc.com wrote:


 On Jun 23, 2013 4:45 AM, Thiadmer Riemersma 
thiadmer.riemer...@gmail.com wrote:
 
  Hello everyone,
 
  I have a request for the s-expression format for footprints: a field
for data that is not used by pcbnew or the module editor, but that is
preserved (by the module editor). Something like (fp_userdata general text
string).
 
  In the alternative, I would like to request to be able to put comments
in an s-expression. Those comments need not be preserved (by the module
editor).

 Any line whose first character is a # is a comment now.  Should be no
limit to th numbrr of such lines.  So your alternative is being fulfilled
already, courtesy of yours truly.

 
  Rationale:
 
  I am developing a footprint wizard, based on templates. But a wizard
won't be of much use if you cannot modify the footprints later. So, this
wizard reads back footprints and allows you to adjust them. However,
detecting which template was used (and with what settings) may not be
deterministically feasible, given the number of options.
 
  So, the best option is to store that information in the generated
footprint. Even if the user changes the footprint in the module editor, the
wizard would still be able to get the correct template.
 
  In the alternative (store the information in a comment), the user would
be able to adjust the footprint with the wizard, as long as no changes have
been made to it in the module editor. This is good enough for me.
 
  Question:
 
  I do not appear to be able to select an s-expression library in pcbnew.
Is this correct? Or do I need to build KiCad with a special option?

 Look at how the test program is built down in /tools.  I wrote a document
model parsing function that gives you a boost propert tree as a document.

 A second path is to try and lind to libcommon, but this will flop due to
unredolved ecternals if you stray too far from richio and dsnlexer.

 A final and third option is to link with _pcbnew.so which basically all
of pcbnew in DSO form.

Look at KICAD_PLUGIN::Footprint*() functions.  I would accept a patch which
preserves a multiline comment block thru a Load / Save () cycle if that
muliline comment is first in kicad_mod file.  Telling DSNLEXER to announce
comments is already there, just have to turn it on after construction, then
concatonate initial single line comments for subsequent Save (). Do not
change DSNLEXER.

This form of DSNLEXER usage is not document model.

Currently this is only built is SCRIPTING is bulit, but I will be changing
this in the next handful of weeks so it always gets built.

 Are you using wx as your ui?

 Dick

 
  Regards,
  Thiadmer Riemersma
 
  ___
  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] Request in s-expression format: general user data or comment

2013-06-23 Thread Adam Wolf
Hi Dick,

Could you let me know your schedule on setting _pcbnew.so to be built
all the time, instead of only with scripting, once it gets closer?
That might be a good time for me to push out some of my Linux build
changes.

Thanks!

Adam Wolf
Wayne and Layne, LLC

On Sun, Jun 23, 2013 at 5:16 AM, Dick Hollenbeck d...@softplc.com wrote:

 On Jun 23, 2013 4:45 AM, Thiadmer Riemersma thiadmer.riemer...@gmail.com
 wrote:

 Hello everyone,

 I have a request for the s-expression format for footprints: a field for
 data that is not used by pcbnew or the module editor, but that is preserved
 (by the module editor). Something like (fp_userdata general text string).

 In the alternative, I would like to request to be able to put comments in
 an s-expression. Those comments need not be preserved (by the module
 editor).

 Any line whose first character is a # is a comment now.  Should be no limit
 to th numbrr of such lines.  So your alternative is being fulfilled already,
 courtesy of yours truly.


 Rationale:

 I am developing a footprint wizard, based on templates. But a wizard
 won't be of much use if you cannot modify the footprints later. So, this
 wizard reads back footprints and allows you to adjust them. However,
 detecting which template was used (and with what settings) may not be
 deterministically feasible, given the number of options.

 So, the best option is to store that information in the generated
 footprint. Even if the user changes the footprint in the module editor, the
 wizard would still be able to get the correct template.

 In the alternative (store the information in a comment), the user would be
 able to adjust the footprint with the wizard, as long as no changes have
 been made to it in the module editor. This is good enough for me.

 Question:

 I do not appear to be able to select an s-expression library in pcbnew. Is
 this correct? Or do I need to build KiCad with a special option?

 Look at how the test program is built down in /tools.  I wrote a document
 model parsing function that gives you a boost propert tree as a document.

 A second path is to try and lind to libcommon, but this will flop due to
 unredolved ecternals if you stray too far from richio and dsnlexer.

 A final and third option is to link with _pcbnew.so which basically all of
 pcbnew in DSO form.  Currently this is only built is SCRIPTING is bulit, but
 I will be changing this in the next handful of weeks so it always gets
 built.

 Are you using wx as your ui?

 Dick


 Regards,
 Thiadmer Riemersma

 ___
 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] Request in s-expression format: general user data or comment

2013-06-23 Thread Dick Hollenbeck
On 06/23/2013 10:25 AM, Thiadmer Riemersma wrote:
 Hello Dick,
 
 Are you using wx as your ui?
 
 Yes, but I am not linking to the KiCad code.
 
 I would accept a patch which preserves a multiline comment block thru a Load 
 / Save ()
 cycle if that muliline comment is first in kicad_mod file.
 
 OK. But I will focus on the footprint manager/wizard first. It is a long way 
 from
 finished. When that is done, I will see whether I can patch the module editor.
 
 Thanks for pointing me to DSNLEXER. It is a bit clearer now, how the 
 s-expressions are
 parsed and formed. One question about the quotation marks, though: apparently 
 these can be
 changed from a double quote to either a singe quote or a dollar sign.

No, not in non-specctrMode.  non-specctraMode equals KiCad mode within 
DSNLEXER.

See kicad_src/Documentation/s-expressions.txt

In KiCad mode (aka non-specctraMode), *only double quotes are to be used*.


Then when preparing a non-numeric string for output, we always call
OUTPUTFORMATTER::Quotes() or OUTPUTFORMATTER::Quotew(), unless it is a number, 
in which
case you can be certain it will not need to be quoted.  Quote{s,w} will not 
quote unless
quoting is needed, and will also escape any interior double quote.




 But how does that
 work? Must the new quote character indeed be prefixed by ASCII code -9? If 
 so, is that the
 same as ASCII 247?


1) Is your code GPLv2?

If yes, then you should be using PCBIO class (in kicad_plugin.{h,cpp} and 
DSNLEXER and
OUTPUTFORMATTER at this point.

Otherwise your code is based on sand.

PCBIO may not be truly the opposite of sand, but as it moves you will move if 
you are
based on it.

In fact I will not even answer any more questions which indicate that you are 
not using
the foundational classes or APIs and trying to roll your own in C++.


2) madparts is ahead of KiCad itself regarding the *use of* the new pretty 
format.  I do
not know about your code, but spent some time looking at madparts.  The guy 
understands
the pretty format, how to store parts in a pretty directory, and fully 
understands that
that is our future, not the legacy format.  The moment the fp lib table is 
done, anyone
can switch over immediately or continue to operating using a blend of legacy, 
eagle,
pretty, or geda footprints, each in their own fp libraries.


I just *now* completed the ability to round trip leading (initial) comments in 
the
standalone pretty modules/footprints.  This does not apply to modules found in 
boards,
only stand alone modules, such as *.kicad_mod files either as exports or in 
pretty libraries.


For the madparts dude, he can probably put the entire coffee script in a 
comment block at
the front end of the module if he wants.  You can also now put your templating 
information
there also.  This was a planned feature from day one, actually not driven by 
you, and this
is why I did it so fast.  I meant to do it way back when.


Regards,


Dick


___
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] libgnomeprint issues are back.

2013-06-23 Thread Wayne Stambaugh

On 6/22/2013 2:20 AM, jp charras wrote:

Le 21/06/2013 23:03, Lorenzo Marcantonio a écrit :

On Fri, Jun 21, 2013 at 12:23:46PM -0400, Wayne Stambaugh wrote:

This way you will at least be able to build KiCad even though you wont
have full printing capability.  Is the printing situation for Linux
using wxWidgets 2.9.4 any better?  Anybody else have any better ideas or
thoughts on this?


I just made some trials with 2.9.4 and 2.9.5 (and cups):
Nothing works either using the wxWidgets internal printing layer
(dcpsg.cpp) or using wxWidgets built with --with-gtkprint option
(--with-gnomeprint does not compile on my Linux install):

--with-gtkprint gives not usable results (missing lines, incorrect arcs
and much more...)

Internal printing layer prints graphic with  a strange offset: 70%
outside the paper area ( new bug which does not exists in 2.8.12) ...


This is less than desirable.  I wonder what the Gnome folks are doing 
because I haven't noticed any issues printing from some of the Gnome 
apps.  Someone want to derive an object from wxPrintout that fixes the 
GTK printing issues?






I stopped trying printing with wx based apps a lng time ago. That
my experience with it. OTOH I'm using a 'traditional' printing system
(no CUPS, only lprng and *real* postscript printers, so no rasterizers
in between...)



This is the best way.



If no one minds, I think I'll move the warning from common.h to 
common.cpp rather than dsiplaying the warning for every source file that 
includes common.h (which is most of them) which is rather annoying.




___
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


[Kicad-developers] Auto-fill for zones

2013-06-23 Thread Chris Morgan
Hello.

I was wondering if/why there isn't a auto-fill option for zones. I'm trying
to get the edges of zones to be smooth looking and with fillets its tough
to see how the zone might look after filling.

Chris
___
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] There's something wrong with dragging in eeschema...

2013-06-23 Thread Travis Ayres
Hi everyone,

There is a dragging issue that is replicable, but I'm not enough of a
wxWidgets expert to track it down. I'm willing to help anyone who is
attempting this effort though. Please post your progress and some
information on your steps if you could.

-Travis


On Fri, Jun 21, 2013 at 12:11 AM, Lorenzo Marcantonio 
l.marcanto...@logossrl.com wrote:

 On Wed, Jun 19, 2013 at 12:30:07PM +0200, Lorenzo Marcantonio wrote:
  OK, I'll try to do a vanilla build to see if something broke during
  merge (I didn't change anything about that, I have no idea...)

 Hrr... even vanilla sometimes give the issue; not always and not on
 faster boxes... could it be a timing condition or something about the
 order of the event arrival??? On the atom box it does it *always*
 (should be easier to debug at least :D)

 I'll need more intensive tracing to find the culprit; I suppose the
 auto-pan code is in the common frame, right?

 --
 Lorenzo Marcantonio
 Logos Srl

 ___
 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] There's something wrong with dragging in eeschema...

2013-06-23 Thread Dick Hollenbeck
On 06/21/2013 02:11 AM, Lorenzo Marcantonio wrote:
 On Wed, Jun 19, 2013 at 12:30:07PM +0200, Lorenzo Marcantonio wrote:
 OK, I'll try to do a vanilla build to see if something broke during
 merge (I didn't change anything about that, I have no idea...)
 
 Hrr... even vanilla sometimes give the issue; not always and not on
 faster boxes... could it be a timing condition or something about the
 order of the event arrival??? On the atom box it does it *always*
 (should be easier to debug at least :D)
 
 I'll need more intensive tracing to find the culprit; I suppose the
 auto-pan code is in the common frame, right?
 


$ bzr diff -r 4206..4207  common/draw_panel.cpp   reverse_me_out.patch



If you reverse out the patch generated from the above, this was the most recent 
change to
autopan.  But unless you are dragging off the screen, this may not be it.

I offer the above only as a test of course, since neither JP nor several others 
have
experienced any problem with this change.



___
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