[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: Test with SVG schematics
On Thu, Jul 31, 2008 at 6:15 PM, Peter TB Brett <peter@xxxxxxxxxxxxx> wrote:
> One of the problems we encountered was the question of how to associate
> electrical data (connectivity etc) with the graphical elements -- in
> particular, the question of how to make symbols and heirachy work well.
For schematics I don't really see a big problem. An example:
If I had 2 components in the schematics, the connection between two
pins can easely stored as a svg 'path' object.
<path d="M 100 100 L 300 100 L 200 400 z"
stroke="blue" stroke-width="2" />
If a pin of a component is connected now, the pin of the component
should have an attribute of 'net="name"'.
Then every component have a pin number and the coordinates of these
pins are all given by the components itself, so the 'path' needs some
more info on which pin it should connect.
<g transform="translate(20,20)">
<path d="M 100 100 L 300 100 L 200 400 z"
stroke="blue" stroke-width="2">
<!-- schematic extension -->
<geda:netinfo m_pin="(id_of_component1:pin_to_connect)"
net="netname" />
</path>
</g>
The svg 'g' element is only to thread the 'path' as an object and for
transformation. With this info added to the path, the application
could easily draw the net. And because we now the coordinates of the
m_pin (master_pin), we can easily positioning the path with
"trnsform="translate()" of the 'g' element.
With this info added, the creation of a netlist should be a snap.
>
> This was one of the ideas behind my SCANT project
> (http://scant.peter-b.co.uk/) which has since stalled because I'm lazy. ;)
>
Good to hear that I am not the only lazy person :)
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user