[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: spring-mass autoplacer



On Mon, 28 Mar 2005 22:57:37 +0200
PR <piotr-re@xxxxx> wrote:

> I would like to share a very early version of my autoplacer based on
> spring - mass interaction.
> 
> It is very limited but maybe it will evelve in something useful.
> 
> I didn't waste my time learning gtk so it is currently under ctrl-p key
> combination (as the other autoplacer was).
...
> Simply put:
> Select what you want to move, hit ctrl-p and watch it change.
> 
> The diff files are probably hard to use but I didn't know how to make
> better ones :)

Use "diff -ur file.c.orig file.c" to get a context patch of a single file, or to get
one patch of several files, run your diff on directories:  "diff -urN pcb.orig pcb"

To get the spring mass function to appear in the Select menu, you just
need to add one line:

--- gui-top-window.c.orig	2005-03-28 15:17:57.169543507 -0600
+++ gui-top-window.c	2005-03-28 15:21:33.410754513 -0600
@@ -1691,6 +1691,7 @@
 "			</menu>"
 "			<separator/>"
 "			<menuitem action='AutoPlaceSelected'/>"
+"			<menuitem action='SpringMassSelected'/>"
 "			<menuitem action='DisperseAllElements'/>"
 "			<menuitem action='DisperseSelectedElements'/>"
 "			<separator/>"

It will use the <control>s shortcut you've specified in your SpringMassSelected
GtkActionEntry, but what about <alt>s to avoid taking away the default change
size <control>s?

Bill