Fritzing SVG dimension rules

Translates, the source of all evil :slight_smile: ! The work around is simple, fixing the code is likely to be more complex. The issue appears to be a transform in the top level group:

ungroup (to remove the transform)

Now edit select all and group and name it schematic. Then save as plain svg. Rezip it in to a part and load it and now the schematic is correct.

corrected part:

original part:

It appears the transform isn’t being taken in to account when Fritzing adjusts the xml to add the colored line to the connection. With the transform present the new xml gets offset slightly when rendered (likely because the transform wasn’t taken in to account.) so removing the transform makes it work correctly. I expect it may be difficult (unless there is a QT call that will do it!) to apply the transforms (potentially more than one!) to the xml before adding the color markers. This same issue may occur elsewhere if transforms are present as well.

How I would do the schematic for the connectors:

Use the svg.schematic.group-connectors-schematic-template_1_schematic.svg from here

dimensions in in and scale the desirable 10.41667. Pins are .1in long, terminalIds are 10thou 10thou and centered on the end of the pin:

The pin color is #555555 as specified on the graphics standard and the group text and lines are #999999 also as per the graphics standards. I chose to use the group (as opposed to the simple) template because your part has dual row connectors at least in part and the group template will show that in schematic (which I like to do!) Note the template is ungrouped and currently aligned on .1 boundaries so with the tool bar in “in” and the grid size at .1 (or 0.01 in my case) you can move pins around or duplicate them and alignment will remain mostly correct (I tend to check and correct the slight shifts due to floating point roundoff when the svg is finished.) So remove the unused top and bottom connectors (they are in the template so all possible positions are available) to leave a dual row connector on one side and a single row connector on the other.

svg.schematic.new-schematic_1.1_schematic

Now delete the bottom most line on the connector so there won’t be two of them after the dup:

then duplicate the first 8 pins to make a 16pin dual row connector (with some editing):

(note this is one position to far down in y, so move it back up 1 via the tool bar like this:

Then dup one of the lines and move it down .1 in via the tool bar to complete the connector and duplicate and move 8 more pins on the right side to make that connector longer.

Now move the surrounding rectangle down to be below the last connector, changing the height and width if needed. In this case the height reduces from 2.110 to 1.910. Now do an edit select all and resize page to drawing to correct the viewbox to give the final svg (although the connector numbering is screwed up)

Now to fix up the connectors. To do so start with connector0 and move it (and its associated terminalId to the bottom of the svg via the move to bottom icon on the tool bar. If connector0 wasn’t already labeled connector0pin (it was in this case) you would need to set its id to connector0pin (actually just connector will do.)

There needs to be no labels staring with connector above this as the python script will start making pins (at connector0) at the first connector ID it finds. Now do all the rest of the pins (in the order you want them numbered) the same way. In this case after connector7pin we have an unnumbered (because it was dupped) pin which will become connector8pin and terminal:

In this case I chose to start at the bottom right and increase the pins upwards. You could also choose to use the top right to do the pins in the opposite order.

then proceed to the top leaving you with this:

svg.schematic.new-schematic_1.2_schematic

Now save this as a plain svg and exit Inkscape and run the python script (which isn’t yet public) to renumber the connectors:

$ SvgSetConnectors.py svg.schematic.new-schematic_1.2_schematic.svg

*** Process svg.schematic.new-schematic_1.2_schematic.svg ***
$

I cheated and renamed the above to svg.schematic.new-schematic_1.3_schematic.svg to have both the original and the renumbered svgs available. The renumbered svg now has the correct connectors set like this and can be grouped (after correcting the text which I was too lazy to do here!) to create the schematic svg.

svg.schematic.new-schematic_1.3_schematic

and schematic is completed. I find this the easiest way to make schematics these days.

Peter