Hi Sebastian.

For PCBmodE I use Inkscape layers for PCB layers ("top", "bottom") and what I call "sheets" ("soldermask", "silkscreen", "documentation", etc.) in order to avoid confusion. I also use hierarchy of layers so I can completely hide the top/bottom layer and so on.

Here's an example SVG PCBmodE generated:

  https://bitbucket.org/boldport/pcbmode/downloads/shimmy_rev_A_1.svg

(I cleaned up a lot of things since that SVG was generated, and there's still work on that front ;)

I tried to solve the problem you describe in several ways, but couldn't find anything that wasn't a huge hack. (Worth mentioning is that I've decided to use Inkscape without modification up to now.) My current solution for movement of components is to only move the copper pads (which are grouped) and then when I next generate the board, the new coordinates are extracted, and then all the other layers/sheets are placed in the new location. It's not perfect but it works for me for now.

cheers,
saar.




On Tue, May 7, 2013 at 10:42 AM, Sebastian Götte <jaseg@...2974...> wrote:
Hi,
I'm currently working on a GSoC proposal to add PCB layout and
schematics editing capabilities to Inkscape (it's not as hard as it
sounds). In a PCB layout, you have a number of (physically stacked)
layers (one copper layer on each side of the board, possibly multiple
copper layers *inside* the board, green solder mask on both sides on top
of the copper layers and white print on top of the solder mask for
markings etc.). I'm currently unsure on how to map these layers to SVG.

It appears obvious to map these to Inkscape layers/SVG groups. This does
not work too well however, since all components on the board span
multiple layers (pads for the pins on the copper layer, cut-outs for the
pads on the solder mask and a package outline and part id/number on the
silkscreen). If a component is moved, all parts of it (on any layers)
need to be moved simultaneously, and in fact, normally it does not make
sense to even select the parts of a component individually.

My problem is that this would essentially require cross-group groups,
i.e. groups whose elements can be elements of other groups not part of
the group, which clashes with XML's tree structure.

Currently, I have two and a half ideas on how to address this issue:

 1) I implement PCB layers as something different to Inkscape's layers
    that is just denoted by an object property (I don't like this). This
    attribute would be pretty similar to the z-order attribute that will
    be include in SVG 2.
 2) I find some way of "linking" multiple groups on multiple layers (I
    don't like this either, it's easier but more "hackish").

I'm currently leaning towards the second option since I can imagine the
first will require a *lot* of work (though I will still look into that
further).

Perhaps you have some ideas on how this could be implemented in pre-2.0
SVG.

Thanks,
Sebastian

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...1794...s.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/inkscape-devel