Re: gEDA-user: Pin-pin rubberbanding

2009-08-13 Thread Link
On 24/05/09 15:59, Peter Clifton wrote:
 Just though I'd post this.

 The implementation is a little kludgy, but it seems to yield the desired
 behaviour.


 I've been drawing various control block diagrams with gschem recently,
 using an arrow symbol with two pins to indicate signal flow. Having to
 add nets between everything manually can be a bit of a pain as you
 rework and move things in the diagram.

 This patch allows you to touch two pins together (placing the component
 so the pins connect), then pull them apart to produce nets. It also
 works when moving nets attached to pins, so new segments are produced.




 



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

Sorry for replying to a very old thread, but I was wondering what ever 
became of this. It hasn't been merged into the git tree, AFAIK, and it's 
something I /really/ miss in gschem.

So, is there any intention of merging this patch into the main tree?

Thanks in advance!


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


Re: gEDA-user: Pin-pin rubberbanding

2009-08-13 Thread Peter TB Brett
On Thursday 13 August 2009 09:04:23 Link wrote:

 Sorry for replying to a very old thread, but I was wondering what ever
 became of this. It hasn't been merged into the git tree, AFAIK, and it's
 something I /really/ miss in gschem.

 So, is there any intention of merging this patch into the main tree?

I don't know about pcjc2's plans for putting it in the main tree, but if you 
want to try it out, I think this is it:

http://tinyurl.com/purm2j

If it seems reasonably bug-free to you I might merge it regardless of pcjc2's 
plans. ;-)

Cheers,

  Peter

-- 
Peter Brett pe...@peter-b.co.uk
Remote Sensing Research Group
Surrey Space Centre



signature.asc
Description: This is a digitally signed message part.


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


Re: gEDA-user: Pin-pin rubberbanding

2009-08-13 Thread Kai-Martin Knaak
On Thu, 13 Aug 2009 09:09:05 +0100, Peter TB Brett wrote:

 If it seems reasonably bug-free to you I might merge it regardless of
 pcjc2's plans. ;-)

I used this feature during my last couple of projects. It works 
flawlessly with no artifacts. The only gripe I have is that it make you 
want more of the same ;-)  For example pin-net-rubberbanding. That is, 
add a new net when pulling a pin that touches the middle of a straight 
net.

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



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


Re: gEDA-user: Pin-pin rubberbanding

2009-06-10 Thread Kai-Martin Knaak
On Tue, 26 May 2009 02:14:58 +0100, Peter Clifton wrote:

 What version of gschem is it based on?
 
 My cairo branch, + some local stuff. It should apply to git HEAD though
 (untested).
 

I tried to apply the patch to your cairo branch (git checkout -b 
cairo_experiment origin/cairo_experiment). However, I get incompatible 
pointer type errors:

gcc -DLOCALEDIR=\/usr/local/share/locale\ -DHAVE_CONFIG_H -I. -I.. -I/
usr/local/include -I../intl -I../include   -I/usr/local/include -I/usr/
include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0   -I/
usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -D_REENTRANT -I/usr/
include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/
include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/
include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/
include/glib-2.0 -I/usr/lib/glib-2.0/include   -pthread -I/usr/include/
glib-2.0 -I/usr/lib/glib-2.0/include   -Wall -g -O2 -MT o_move.o -MD -
MP -MF .deps/o_move.Tpo -c -o o_move.o o_move.c
o_move.c: In function ‘o_move_check_endpoint’:
o_move.c:511: warning: passing argument 1 of ‘s_page_append’ from 
incompatible pointer type
o_move.c:511: warning: passing argument 2 of ‘s_page_append’ from 
incompatible pointer type
o_move.c:511: error: too few arguments to function ‘s_page_append’
make[2]: *** [o_move.o] Error 1
make[2]: Leaving directory `/usr/local/geda-src/pcjc2/gschem/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/usr/local/geda-src/pcjc2/gschem'
make: *** [gschem_install] Error 2

Anything I can do about this?

---(kaimartin)---
-- 
Kai-Martin Knaak  tel: +49-511-762-2895
Universität Hannover, Inst. für Quantenoptik  fax: +49-511-762-2211 
Welfengarten 1, 30167 Hannover   http://www.iqo.uni-hannover.de
GPG key:http://pgp.mit.edu:11371/pks/lookup?search=Knaak+kmkop=get



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


Re: gEDA-user: Pin-pin rubberbanding

2009-06-10 Thread Peter Clifton
On Wed, 2009-06-10 at 19:04 +, Kai-Martin Knaak wrote:
 On Tue, 26 May 2009 02:14:58 +0100, Peter Clifton wrote:
 
  What version of gschem is it based on?
  
  My cairo branch, + some local stuff. It should apply to git HEAD though
  (untested).
  
  
 I tried to apply the patch to your cairo branch (git checkout -b 
 cairo_experiment origin/cairo_experiment). However, I get incompatible 
 pointer type errors:
 
 gcc -DLOCALEDIR=\/usr/local/share/locale\ -DHAVE_CONFIG_H -I. -I.. -I/
 usr/local/include -I../intl -I../include   -I/usr/local/include -I/usr/
 include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0   -I/
 usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -D_REENTRANT -I/usr/
 include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/
 include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/
 include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/
 include/glib-2.0 -I/usr/lib/glib-2.0/include   -pthread -I/usr/include/
 glib-2.0 -I/usr/lib/glib-2.0/include   -Wall -g -O2 -MT o_move.o -MD -
 MP -MF .deps/o_move.Tpo -c -o o_move.o o_move.c
 o_move.c: In function ‘o_move_check_endpoint’:
 o_move.c:511: warning: passing argument 1 of ‘s_page_append’ from 
 incompatible pointer type
 o_move.c:511: warning: passing argument 2 of ‘s_page_append’ from 
 incompatible pointer type
 o_move.c:511: error: too few arguments to function ‘s_page_append’
 make[2]: *** [o_move.o] Error 1
 make[2]: Leaving directory `/usr/local/geda-src/pcjc2/gschem/src'
 make[1]: *** [install-recursive] Error 1
 make[1]: Leaving directory `/usr/local/geda-src/pcjc2/gschem'
 make: *** [gschem_install] Error 2
 
 Anything I can do about this?

New patch against latest code is attached.

Basically just add a toplevel as the first parameter to
s_page_append()


-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
From 9c542c0c3f64bf5de10db32043bda506f4657d67 Mon Sep 17 00:00:00 2001
From: Peter Clifton pc...@cam.ac.uk
Date: Sun, 24 May 2009 13:12:06 +0100
Subject: [PATCH] Rubberband pin to pin connections by adding nets

---
 gschem/src/o_move.c |   15 +++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/gschem/src/o_move.c b/gschem/src/o_move.c
index 76eca40..6e8fcd2 100644
--- a/gschem/src/o_move.c
+++ b/gschem/src/o_move.c
@@ -502,6 +502,21 @@ void o_move_check_endpoint(GSCHEM_TOPLEVEL *w_current, OBJECT * object)
  c_current-other_whichone == -1))
   continue;
 
+if (c_current-other_object-type == OBJ_PIN) {
+  OBJECT *new_net;
+  /* other object is a pin, insert a net */
+  new_net = o_net_new (toplevel, OBJ_NET, NET_COLOR,
+   c_current-x, c_current-y,
+   c_current-x, c_current-y);
+  s_page_append (toplevel-page_current, new_net);
+  s_tile_add_object (toplevel, new_net);
+  s_conn_update_object (toplevel, new_net);
+  /* This new net object is only picked up for stretching later,
+   * somewhat of a kludge. If the move operation is cancelled, these
+   * new 0 length nets are removed by the undo operation invoked.
+   */
+}
+
 /* Only attempt to stretch nets and buses */
 if (c_current-other_object-type != OBJ_NET 
 c_current-other_object-type != OBJ_BUS)
-- 
1.6.0.4



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


Re: gEDA-user: Pin-pin rubberbanding

2009-06-10 Thread Kai-Martin Knaak
On Wed, 10 Jun 2009 22:35:32 +0100, Peter Clifton wrote:

 New patch against latest code is attached.
 
 Basically just add a toplevel as the first parameter to
 s_page_append()

(snip) 
 ---
  gschem/src/o_move.c |   15 +++ 1 files changed, 15
  insertions(+), 0 deletions(-)
 
 diff --git a/gschem/src/o_move.c b/gschem/src/o_move.c index
(snip)
 +   c_current-x,c_current-y); 
 +  s_page_append (toplevel-page_current, new_net);
   ^^^

Luckily, you provided a human readable description of the diff. So I 
added toplevel as the first parameter and now gschem produces a new net 
where the pins separate. Very nice, indeed. This kind of little features 
significantly improve the GUI. Thanks for coding!

---(kaimartin)---
-- 
Kai-Martin Knaak
http://lilalaser.de/blog



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


Re: gEDA-user: Pin-pin rubberbanding

2009-05-25 Thread Kai-Martin Knaak
On Sun, 24 May 2009 14:59:55 +0100, Peter Clifton wrote:

 This patch allows you to touch two pins together (placing the component
 so the pins connect), then pull them apart to produce nets. It also
 works when moving nets attached to pins, so new segments are produced.

Very cool. 
I'll try the patch tomorrow. What version of gschem is it based on?

Next wish to improve routing in gschem: 
An option to restrict the nets to vertical/horizontal. I next to never 
want slanted nets in a schematic.

---(kaimartin)---



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


Re: gEDA-user: Pin-pin rubberbanding

2009-05-25 Thread Peter Clifton
On Mon, 2009-05-25 at 23:24 +, Kai-Martin Knaak wrote:
 On Sun, 24 May 2009 14:59:55 +0100, Peter Clifton wrote:
 
  This patch allows you to touch two pins together (placing the component
  so the pins connect), then pull them apart to produce nets. It also
  works when moving nets attached to pins, so new segments are produced.
 
 Very cool. 
 I'll try the patch tomorrow. What version of gschem is it based on?

My cairo branch, + some local stuff. It should apply to git HEAD though
(untested).

 Next wish to improve routing in gschem: 
 An option to restrict the nets to vertical/horizontal. I next to never 
 want slanted nets in a schematic.

Yes, I feel I want more of that heuristic sometimes, but it will need
some work before we get there.

The patch I posted to add nets when stretching a pin-* connection is
somewhat of a kludge (to achieve what I wanted quickly). If we are going
to start getting clever with net rubber-banding heuristics, I suspect we
need some more invasive work to the routines responsible.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



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


gEDA-user: Pin-pin rubberbanding

2009-05-24 Thread Peter Clifton
Just though I'd post this.

The implementation is a little kludgy, but it seems to yield the desired
behaviour.


I've been drawing various control block diagrams with gschem recently,
using an arrow symbol with two pins to indicate signal flow. Having to
add nets between everything manually can be a bit of a pain as you
rework and move things in the diagram.

This patch allows you to touch two pins together (placing the component
so the pins connect), then pull them apart to produce nets. It also
works when moving nets attached to pins, so new segments are produced.


-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
From 9c542c0c3f64bf5de10db32043bda506f4657d67 Mon Sep 17 00:00:00 2001
From: Peter Clifton pc...@cam.ac.uk
Date: Sun, 24 May 2009 13:12:06 +0100
Subject: [PATCH] Rubberband pin to pin connections by adding nets

---
 gschem/src/o_move.c |   15 +++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/gschem/src/o_move.c b/gschem/src/o_move.c
index 76eca40..6e8fcd2 100644
--- a/gschem/src/o_move.c
+++ b/gschem/src/o_move.c
@@ -502,6 +502,21 @@ void o_move_check_endpoint(GSCHEM_TOPLEVEL *w_current, OBJECT * object)
  c_current-other_whichone == -1))
   continue;
 
+if (c_current-other_object-type == OBJ_PIN) {
+  OBJECT *new_net;
+  /* other object is a pin, insert a net */
+  new_net = o_net_new (toplevel, OBJ_NET, NET_COLOR,
+   c_current-x, c_current-y,
+   c_current-x, c_current-y);
+  s_page_append (toplevel-page_current, new_net);
+  s_tile_add_object (toplevel, new_net);
+  s_conn_update_object (toplevel, new_net);
+  /* This new net object is only picked up for stretching later,
+   * somewhat of a kludge. If the move operation is cancelled, these
+   * new 0 length nets are removed by the undo operation invoked.
+   */
+}
+
 /* Only attempt to stretch nets and buses */
 if (c_current-other_object-type != OBJ_NET 
 c_current-other_object-type != OBJ_BUS)
-- 
1.6.0.4



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