gEDA-user: [pcb/lesstif] allow zoom out and pan more than board size

2010-12-30 Thread DJ Delorie

Attention pcb-lesstif users: here's a patch that lets you zoom out
more than the pcb size!  Also lets you pan the board anywhere, not
just to the edge of the window (i.e. you can position the edge of the
board in the middle of the window now).  The 'v' key still zooms to
"view all" and ctrl-middle-button is a bit more sane
(i.e. ctrl-middle-click on the lower right corner of the window,
centers the lower right corner of the PCB in the window).  No core
changes, so you still can't move stuff (or even the crosshair) off the
board.

If this seems to work, I'll push it out.

diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index 5f497a8..b7066c2 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -44,6 +44,9 @@ RCSID ("$Id$");
 #define XtRDouble "Double"
 #endif
 
+/* How big the viewport can be relative to the pcb size.  */
+#define MAX_ZOOM   2
+
 typedef struct hid_gc_struct
 {
   HID *me_pointer;
@@ -190,6 +193,7 @@ HID_Attribute lesstif_attribute_list[] = {
 REGISTER_ATTRIBUTES (lesstif_attribute_list)
 
 static void lesstif_use_mask (int use_it);
+static void zoom_max ();
 static void zoom_to (double factor, int x, int y);
 static void zoom_by (double factor, int x, int y);
 static void zoom_toggle (int x, int y);
@@ -337,7 +341,7 @@ PCBChanged (int argc, char **argv, int x, int y)
   stdarg (XmNsliderSize, PCB->MaxHeight ? PCB->MaxHeight : 1);
   stdarg (XmNmaximum, PCB->MaxHeight ? PCB->MaxHeight : 1);
   XtSetValues (vscroll, args, n);
-  zoom_by (100, 0, 0);
+  zoom_max ();
 
   hid_action ("NetlistChanged");
   hid_action ("LayersChanged");
@@ -452,7 +456,7 @@ ZoomAction (int argc, char **argv, int x, int y)
 }
   if (argc < 1)
 {
-  zoom_to (100, 0, 0);
+  zoom_max ();
   return 0;
 }
   vp = argv[0];
@@ -1131,6 +1135,7 @@ set_scroll (Widget s, int pos, int view, int pcb)
 void
 lesstif_pan_fixup ()
 {
+#if 0
   if (view_left_x > PCB->MaxWidth - (view_width * view_zoom))
 view_left_x = PCB->MaxWidth - (view_width * view_zoom);
   if (view_top_y > PCB->MaxHeight - (view_height * view_zoom))
@@ -1145,6 +1150,7 @@ lesstif_pan_fixup ()
   zoom_by (1, 0, 0);
   return;
 }
+#endif
 
   set_scroll (hscroll, view_left_x, view_width, PCB->MaxWidth);
   set_scroll (vscroll, view_top_y, view_height, PCB->MaxHeight);
@@ -1153,6 +1159,20 @@ lesstif_pan_fixup ()
 }
 
 static void
+zoom_max ()
+{
+  double new_zoom = PCB->MaxWidth / view_width;
+  if (new_zoom < PCB->MaxHeight / view_height)
+new_zoom = PCB->MaxHeight / view_height;
+
+  view_left_x = 0;
+  view_top_y = 0;
+  view_zoom = new_zoom;
+  pixel_slop = view_zoom;
+  lesstif_pan_fixup ();
+}
+
+static void
 zoom_to (double new_zoom, int x, int y)
 {
   double max_zoom, xfrac, yfrac;
@@ -1170,6 +1190,8 @@ zoom_to (double new_zoom, int x, int y)
   if (max_zoom < PCB->MaxHeight / view_height)
 max_zoom = PCB->MaxHeight / view_height;
 
+  max_zoom *= MAX_ZOOM;
+
   if (new_zoom < 1)
 new_zoom = 1;
   if (new_zoom > max_zoom)
@@ -2429,29 +2451,60 @@ idle_proc (XtPointer dummy)
}
   XSetForeground (display, bg_gc, bgcolor);
   XFillRectangle (display, main_pixmap, bg_gc, 0, 0, mx, my);
-  if (region.X2 > PCB->MaxWidth || region.Y2 > PCB->MaxHeight)
+
+  if (region.X1 < 0 || region.Y1 < 0
+ || region.X2 > PCB->MaxWidth || region.Y2 > PCB->MaxHeight)
{
+ int leftmost, rightmost, topmost, bottommost;
+
+ leftmost = Vx (0);
+ rightmost = Vx (PCB->MaxWidth);
+ topmost = Vy (0);
+ bottommost = Vy (PCB->MaxHeight);
+ if (leftmost > rightmost) {
+   int t = leftmost;
+   leftmost = rightmost;
+   rightmost = t;
+ }
+ if (topmost > bottommost) {
+   int t = topmost;
+   topmost = bottommost;
+   bottommost = t;
+ }
+ if (leftmost < 0)
+   leftmost = 0;
+ if (topmost < 0)
+   topmost = 0;
+ if (rightmost > view_width)
+   rightmost = view_width;
+ if (bottommost > view_height)
+   bottommost = view_height;
+
  XSetForeground (display, bg_gc, offlimit_color);
- if (region.X2 > PCB->MaxWidth)
-   {
- mx = Vx (PCB->MaxWidth);
- if (flip_x)
-   XFillRectangle (display, main_pixmap, bg_gc, 0, 0,
-   mx-1, my);
- else
-   XFillRectangle (display, main_pixmap, bg_gc, mx+1, 0,
-   view_width - mx + 1, my);
 
+ /* L T R
+ L x R
+ L B R */
+
+ if (leftmost > 0)
+   {
+ XFillRectangle (display, main_pixmap, bg_gc, 0, 0,
+ leftmost, view_height);
+   }
+ if (rightmost < view_width)
+   {
+ XFillRectangle (display, main_pixmap, bg_gc, rightmost+1, 0,
+ view_width-rightmost+1, view_h

Re: gEDA-user: European symbols?

2010-12-30 Thread Stephan Boettcher
kai-martin knaak  writes:

> Johnny Rosenberg wrote:
>
>>   __
>>  |  |
>>  |  &   |o–––
>>  |__|
>> 
>
> Ah, those box shaped symbols. 
> Well, I don't like them. So none of them in my lib...

Those were invented by bureaucrats at a time when pen plotters had
difficulties plotting circles.

-- 
Stephan



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: European symbols?

2010-12-30 Thread kai-martin knaak
Johnny Rosenberg wrote:

>   __
>  |  |
>  |  &   |o–––
>  |__|
> 

Ah, those box shaped symbols. 
Well, I don't like them. So none of them in my lib...


---<)kaimartin(>---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gEDA Wikibook ?

2010-12-30 Thread kai-martin knaak
Karl Hammar wrote:

>> Contribution is allowed to literally everyone. Click on the
>> edit button and go ahead. ...
> 
> You have to be online for that.

Install mediawiki from your preferred distro and you can edit and
render your contribution locally without. In addition, mediawiki
allows external text editors.

---<)kaimartin(>---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gEDA Wikibook ?

2010-12-30 Thread kai-martin knaak
Karl Hammar wrote:

>> there's no hope in hell
>> in making sense of the incoherent ramblings of all the existing
>> Tex documentation. ...
> 
> I think that this is all wery true.

True, or not, it is irrelevant. There is no need for fancy formatting
with geda docs. Even MS-Word would do (cough!). Any structured format 
would do. The missing component is authors.

---<)kaimartin(>---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: European symbols?

2010-12-30 Thread Johnny Rosenberg

Den 2010-12-31 01:37:50 skrev Stefan Salewski :


On Fri, 2010-12-31 at 01:06 +0100, kai-martin knaak wrote:

Johnny Rosenberg wrote:

> I looked at the gEDA symbols site, but it was very hard to find
> anything useful in this matter, since there was no ”preview” thing
> involved as far as I can see.

You may point your browser to
http://gedasymbols.org
This is a website dedicated to symbols, footprints and other geda
related stuff contributed by users. It presents previews of symbols and
footprints on mouse click.


> Is there a complete set of symbols like the default one, but with IEC
> symbols instead or do I need to make them all by myself?

I tend to draw my symbols the way they were taught in German university
courses. So they are likely IEC compliant, but no guarantee.


> I can't be the only European user of this program, can I…?

Surely, you are not! :-)

---<)kaimartin(>---


I think he was asking about these rectangular boxes, as used in german
textbooks, Tietze/Schenk or Reichardt/Schwarz. Indeed I have not seen
these on your page or gedasymbols at all, so you may give the full
link...



I don't know about those ”german textbooks”, but they are rectangular  
indeed. I'll try to draw an NAND gate below, but you need a font like Free  
Mono, Liberation Mono, Courier or similar to view it right:


 __
|  |
|  &   |o–––
|__|

And a NOR gate would look like this:
 __
|  |
|  ≥1  |o–––
|__|



--
Kind regards

Johnny Rosenberg


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: European symbols?

2010-12-30 Thread Stefan Salewski
On Fri, 2010-12-31 at 01:06 +0100, kai-martin knaak wrote:
> Johnny Rosenberg wrote:
> 
> > I looked at the gEDA symbols site, but it was very hard to find
> > anything useful in this matter, since there was no ”preview” thing
> > involved as far as I can see.
> 
> You may point your browser to 
>   http://gedasymbols.org
> This is a website dedicated to symbols, footprints and other geda 
> related stuff contributed by users. It presents previews of symbols and 
> footprints on mouse click.
> 
> 
> > Is there a complete set of symbols like the default one, but with IEC
> > symbols instead or do I need to make them all by myself? 
> 
> I tend to draw my symbols the way they were taught in German university 
> courses. So they are likely IEC compliant, but no guarantee. 
> 
> 
> > I can't be the only European user of this program, can I…?
> 
> Surely, you are not! :-) 
> 
> ---<)kaimartin(>---

I think he was asking about these rectangular boxes, as used in german
textbooks, Tietze/Schenk or Reichardt/Schwarz. Indeed I have not seen
these on your page or gedasymbols at all, so you may give the full
link...






___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: geda-user Digest, Vol 55, Issue 76

2010-12-30 Thread kai-martin knaak
blueeag...@gmail.com wrote:

>> Copy selection to buffer ([ctrl-c]). The position of the crosshair
>> willdetermine the origin of the resulting footprint.
> 
> Well, that does not make much sense as the crosshair moves.
 
The position of the crosshair at the moment of [ctrl-c].

---<)kaimartin(>---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Creating new symbols

2010-12-30 Thread kai-martin knaak
Stefan Salewski wrote:

> Following the documentation we always have to do the translation
> to 0/0, when we save a symbol.

Yes, the documentation is a bit too rigorous at this point. The 
only consequence of a symbol not translated to 0/0 is a potential
inconvenience on placement. The symbol may be offset from the 
mouse cursor.

---<)kaimartin(>---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: European symbols?

2010-12-30 Thread kai-martin knaak
Johnny Rosenberg wrote:

> I looked at the gEDA symbols site, but it was very hard to find
> anything useful in this matter, since there was no ”preview” thing
> involved as far as I can see.

You may point your browser to 
http://gedasymbols.org
This is a website dedicated to symbols, footprints and other geda 
related stuff contributed by users. It presents previews of symbols and 
footprints on mouse click.


> Is there a complete set of symbols like the default one, but with IEC
> symbols instead or do I need to make them all by myself? 

I tend to draw my symbols the way they were taught in German university 
courses. So they are likely IEC compliant, but no guarantee. 


> I can't be the only European user of this program, can I…?

Surely, you are not! :-) 

---<)kaimartin(>---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Christmas wishlist

2010-12-30 Thread kai-martin knaak
Levente Kovacs wrote:

> The thing made post my previous message, is that it is very
> annoying when unconnected line stays on PCB, and there is no
> chance to connect anything to it.

This is a DRC issue. The rules should allow any net to connect 
to no-net copper. No need to restructure the way pcb handles 
connectivity.

---<)kaimartin(>---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Spice output with slotted symbols

2010-12-30 Thread John Doty

On Dec 30, 2010, at 2:13 PM, Oliver King-Smith wrote:

>   My spice output is looking a little iffy on the symbols I have created
>   which are slotted.  In particular I have a Power part and an op amp
>   part to one of my symbols.  The Op amp can occur in 1 of 2 slots.  Each
>   instance of the symbol appears to be creating a distinct line in the
>   spice output.
>   XU1.1 BACKUP_OUT BACKUP_OUT BACKUP/S unknown
>   XU1 0 1 unknown
>   For example in the above line, I see two entries for the op amp XU1.
>   Neither entry is correct as the op amp subcircuit model expects 5
>   parameters.
>   Is there a way of getting gnetlist to interpret these symbols
>   correctly?

No. The slotting semantics are hard-wired into the gEDA core code. I doubt that 
most of the current core developers even realize that these semantics need to 
depend on the kind of netlist to be generated. One now inactive developer 
(Stuart Brorson) tried to create common semantics for printed circuits and 
simulation, but his attempt just broke slotting for all purposes.

For now, in most cases it is impractical in gEDA to try to directly simulate a 
schematic that's intended for printed circuit layout. This is not a unique 
problem to gEDA: I've had the same difficulty with a big $$ commercial EDA 
toolkit. I have some plans in this area, but don't hold your breath.

John Doty  Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: Spice output with slotted symbols

2010-12-30 Thread Oliver King-Smith
   My spice output is looking a little iffy on the symbols I have created
   which are slotted.  In particular I have a Power part and an op amp
   part to one of my symbols.  The Op amp can occur in 1 of 2 slots.  Each
   instance of the symbol appears to be creating a distinct line in the
   spice output.
   XU1.1 BACKUP_OUT BACKUP_OUT BACKUP/S unknown
   XU1 0 1 unknown
   For example in the above line, I see two entries for the op amp XU1.
   Neither entry is correct as the op amp subcircuit model expects 5
   parameters.
   Is there a way of getting gnetlist to interpret these symbols
   correctly?
   Oliver


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: garfc spice files directory

2010-12-30 Thread Oliver King-Smith
   John,
   When gnetlist runs, does it assume relative paths from the directory it
   is run in, or the schematic directory?  Can I say
   file=./spice-dir/opa333.lib
   in my symbol attributes and have gnetlist navigate to the file?
   Oliver
 __

   From: John Doty 
   To: gEDA user mailing list 
   Sent: Thu, December 30, 2010 9:08:48 AM
   Subject: Re: gEDA-user: garfc spice files directory
   On Dec 30, 2010, at 10:03 AM, Oliver King-Smith wrote:
   >  Is there a way of specifying where your local spice files are in the
   >  gafrc file, so gnetlist can pick them up, without giving the full
   path
   >  for the spice file in your symbol definition?
   Not as far as I know.
   >  Or do I do this somewhere else?
   I make links to the library directories in the project's main
   directory, then use paths like "model-dir/lib-file".
   John Doty  Noqsi Aerospace, Ltd.
   [1]http://www.noqsi.com/
   [2]...@noqsi.com
   ___
   geda-user mailing list
   [3]geda-u...@moria.seul.org
   [4]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

References

   1. http://www.noqsi.com/
   2. mailto:j...@noqsi.com
   3. mailto:geda-user@moria.seul.org
   4. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: garfc spice files directory

2010-12-30 Thread John Doty

On Dec 30, 2010, at 10:03 AM, Oliver King-Smith wrote:

>   Is there a way of specifying where your local spice files are in the
>   gafrc file, so gnetlist can pick them up, without giving the full path
>   for the spice file in your symbol definition?

Not as far as I know.

>   Or do I do this somewhere else?

I make links to the library directories in the project's main directory, then 
use paths like "model-dir/lib-file".

John Doty  Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: garfc spice files directory

2010-12-30 Thread Oliver King-Smith
   Is there a way of specifying where your local spice files are in the
   gafrc file, so gnetlist can pick them up, without giving the full path
   for the spice file in your symbol definition?
   Or do I do this somewhere else?
   Oliver


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Seeing pin numbers in PCB

2010-12-30 Thread Stephan Boettcher
Oliver King-Smith  writes:

> Thank you for the info.  Both the Ctrl-M idea from Levente and you suggestion 
> for pin labels worked well for me.

A lot of features in PCB are not easily discoverable.  Discoverability
is a major quality factor with UI software.  

 Info->Key Bindings

is a valuable resource to discover functionality.  Ctrl-M is in there
but the D key is not in my list.

-- 
Stephan


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Seeing pin numbers in PCB

2010-12-30 Thread Oliver King-Smith
   Thank you for the info.  Both the Ctrl-M idea from Levente and you
   suggestion for pin labels worked well for me.
   Oliver
 __

   From: "ge...@igor2.repo.hu" 
   To: gEDA user mailing list 
   Sent: Thu, December 30, 2010 12:27:28 AM
   Subject: Re: gEDA-user: Seeing pin numbers in PCB
   On Wed, Dec 29, 2010 at 11:48:00PM -0800, Oliver King-Smith wrote:
   >Being lazy I am importing footprints other folks kindly made for
   pcb.
   >Unfortunately, I am not very trusting, so I want to check they are
   >correct.
   >I can measure the size of stuff using gerbv (there may be a better
   way
   >to do this in pcb), but I can't tell if the right pin numbers have
   been
   >assigned very easily.  Is there a way to see this in PCB?
   >Oliver
   Place footprint, then:
   - hover mouse cursor over the component (not over pin), press d: all
   pin numebrs will appear
   - hover over a pin, press d: pin number of the given pin appears
   - hover over a pin or component and press shift+d: pin number dialog
   opens
   The above work with the gtk hid, I don't know if bindings are the same
   for the lesstif hid. Recent versions of PCB with gtk hid also displays
   pin numbers in the preview window while selecting footprints.
   hope this helps,
   Tibor Palinkas
   ___
   geda-user mailing list
   [1]geda-u...@moria.seul.org
   [2]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

References

   1. mailto:geda-user@moria.seul.org
   2. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: European symbols?

2010-12-30 Thread Johnny Rosenberg
There are many usable symbols installed by default, but a lot of them,
like all the 74-series symbols seems to follow some american (I guess)
standard rather than IEC or whatever I'm used to. You know those boxes
with characters in them, for example a square box with an & sign in it
for an AND gate.

I looked at the gEDA symbols site, but it was very hard to find
anything useful in this matter, since there was no ”preview” thing
involved as far as I can see. Sorry for bad English…

Is there a complete set of symbols like the default one, but with IEC
symbols instead or do I need to make them all by myself? I can't be
the only European user of this program, can I…?


Regards

Johnny Rosenberg


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: scripting for pcb

2010-12-30 Thread gedau
Hi Karl,

On Thu, Dec 30, 2010 at 12:29:21PM +0100, Karl Hammar wrote:
> Tibor:
> > On Wed, Dec 29, 2010 at 08:51:19PM +0100, Stephan Boettcher wrote:
> ...
> > > And when that's the case, a clean C-API that can be exported to Guile,
> > > Python, Ruby, C++, Fortran, ... just dreaming.
> [the above is about gschem, now switching to pcb]
> > I once started to do that to PCB usign libgpmi, and got a plugin that 
> > exports a small portion of PCB internals through some sort of higher 
> > level APIs to any scripting language libgpmi supports (10 at the 
> > moment).
> 
> I took a quick look at libgpmi and it seems to be scarce on 
> documentation [1]. [2] have a note on gpmi. [2] also talks about a 
> function library and a perl-callable parser. [3] does not mention any
> scripting language. There is some scripting possible through
> src/action.c.

Libgpmi doesn't have much documentation, true. I've just found I even 
broke the website. Will fix it soon. Meanwhile, list of languages 
supported:

- awk (using libmawk)
- lua
- scheme (guile)
- stutter (a lisp dialect)
- pascal (ghli - may be broken at the moment)
- perl
- php
- python
- ruby
- tcl
- of course you can write your module in C and load it as a shared 
object

You can find a more detailed list at 
http://repo.hu/projects/pcb-gpmi/languages.txt 
 
> Is there any plans or needs for a scripting language (like guile/perl/
> ...) for pcb?

On the above list you can find both of those languages. 

Anyway you won't find references of this in pcb sources. The whole thing 
is a plugin and a set of gpmi packages. The design is like this:

[PCB] -> [pcb-gpmi plugin] -> [scripts] -> [interface packages]
 ^  |
 |  |
 +--+
 

Or in text: PCB loads a plugin called pcb-gpmi, which will load a config 
file and according to that, will load a set of scripts. Scripts will in 
turn load interface packages. Interface packages are tiny shared object 
files which provide an interface between PCB internals and scripting 
languages. The idea is to have some sort of higher level API which does 
not change much and is more convenient.

How powerful the whole thing can get depends on how many languages it 
supports and how much of the PCB internals are exposed. I believe the 
list of languages is impressive. Unfortunately interface packages are 
only a few, and thin, only as much as I needed for proof-of-concept or 
to fulfill my daily needs on missing PCB features. Here is a short list 
of already working packages:
- actions: scripts can create actions usign this package.
- dialogs: create dialog boxes using the current hid; your script can 
pop up data entry windows, give warnings, etc.
- hid: allows the script to regiester an exporter hid with dynamic 
attributes
- layout: query or draw objects on the current layout


There are a set of example scripts written in different languages to 
demonstrate ease of use of PCB internals with pcb-gpmi:
- carc: custom angle arc support written in lua; registers an action 
that pops up a dialog where user can set angles and other properties of 
an arc that will be then placed on the layout using the current 
layer/style.
- SVG exporter written in tcl; proof-of-concept but already can export a 
somewhat good looking SVG. 
- HPGL exporter written in awk; cares only about lines but can repeat 
lines by layer. I own an old pen plotter I drive with this hid.

You can find the scripts at http://repo.hu/projects/pcb-gpmi/plugins/

pcb-gpmi is documented; you can read the on-line documentation at 
http://repo.hu/projects/pcb-gpmi/doc/ ; gpmi, as you mentioned, is 
largely undocumented. However, if you are interested in using pcb-gpmi 
for scripting your plugins, you don't need to know anything about gpmi, 
the same way as using PCB GTK hid for drawing your layouts doesn't imply 
you need to know how GTK works. Of course this is no good excuse for 
missing doc, I just wanted to point out that missing documentation of 
gpmi is not a show stopper.

On the other hand, since user count of the project is exaclty 1 (that is 
me) for the past ~4 years, don't expect it to be user-friendly. For 
example current svn HEAD of gpmi probably won't work out-of-the-box with 
pcb-gpmi, and you will need to use the last release instead. If I had 
users I would have made a branch for the big cleanup I am doing on gpmi 
lately, but as I didn't have users I just started it on trunk.

If you are still interested in the project, I can support compiling and 
installing.

Regards,

Tibor Palinkas


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Seeing pin numbers in PCB

2010-12-30 Thread Levente Kovacs
On Wed, 29 Dec 2010 23:48:00 -0800 (PST)
Oliver King-Smith  wrote:

> I can measure the size of stuff using gerbv (there may be a better
> way to do this in pcb)

Use Ctrl+M to set an origin. You have relative coordinates printed next to the
cursor position.

Levente

-- 
Levente Kovacs
http://levente.logonex.eu




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: scripting for pcb

2010-12-30 Thread Karl Hammar
Tibor:
> On Wed, Dec 29, 2010 at 08:51:19PM +0100, Stephan Boettcher wrote:
...
> > And when that's the case, a clean C-API that can be exported to Guile,
> > Python, Ruby, C++, Fortran, ... just dreaming.
[the above is about gschem, now switching to pcb]
> I once started to do that to PCB usign libgpmi, and got a plugin that 
> exports a small portion of PCB internals through some sort of higher 
> level APIs to any scripting language libgpmi supports (10 at the 
> moment).

I took a quick look at libgpmi and it seems to be scarce on 
documentation [1]. [2] have a note on gpmi. [2] also talks about a 
function library and a perl-callable parser. [3] does not mention any
scripting language. There is some scripting possible through
src/action.c.

Is there any plans or needs for a scripting language (like guile/perl/
...) for pcb?

Regards,
/Karl Hammar

[1] http://www.libgpmi.org/
[2] http://www.geda.seul.org/wiki/geda:design_flow_and_hierarchy_roadmap
[3] http://www.geda.seul.org/wiki/pcb:roadmap

-
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Seeing pin numbers in PCB

2010-12-30 Thread gedau
On Wed, Dec 29, 2010 at 11:48:00PM -0800, Oliver King-Smith wrote:
>Being lazy I am importing footprints other folks kindly made for pcb.
>Unfortunately, I am not very trusting, so I want to check they are
>correct.
>I can measure the size of stuff using gerbv (there may be a better way
>to do this in pcb), but I can't tell if the right pin numbers have been
>assigned very easily.  Is there a way to see this in PCB?
>Oliver

Place footprint, then:
 - hover mouse cursor over the component (not over pin), press d: all 
pin numebrs will appear 
 - hover over a pin, press d: pin number of the given pin appears
 - hover over a pin or component and press shift+d: pin number dialog 
opens

The above work with the gtk hid, I don't know if bindings are the same 
for the lesstif hid. Recent versions of PCB with gtk hid also displays 
pin numbers in the preview window while selecting footprints.

hope this helps,

Tibor Palinkas


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user