; An experiment with extracting net information from gschem
; schematics.

; Use it at your own risk
; Stefan Petersen (spe@stacken.kth.se)


This files were just a play with algorithms and Scheme. The main reason
was to test the adjacent list algorithm. I don't think it handles 
the latest incarnation of gschems files with rotation/mirroring information.

The program concentrates on nets or on segments. A net consist of one
or several segments. In the graphical description (.sch-file) of a
schematic all segments are lines between two nodes. Each node is described
as a X-Y-pair. These X-Y-pairs are then converted to a node number, so that
that the same X-Y-pair gets the same node number, and different X-Y-pairs
gets different node numbers.

From the list with all X-Y-pairs converted, all segment nodes are extracted.
Each segment is a pair with (apperently) two nodes. This node list is 
converted to a list which suits the algorithm to chew on.

Then the algorithm chews it and spits out a list with each sublist
describing nodes interconnected.

If you change the line which describes where your schematic is,
then you can run the program as:

	guile -l ng.scm

Please don't take this to serious as it was just an experiment.
I wanted to test/prove the algorithm and increase the knowledge of
Scheme.

Stefan Petersen
spe@stacken.kth.se
