Fritzing Part test modification log

Initial Setup

Testing paths

Schematic

test01

Open schematic svg with atom, and resave, removing trailing spaces. Verify the actual terminal connection points. Looks good. The breadboard view export is not showing the part number on the package body, and a piece of the package body graphic by the notch is extending too high past pin 14.

test02

Open schematic svg with inkscape, and save as Plain SVG. Inkscape generated file is considerable larger. 12453 versus 8532 bytes

test03

revert to previous schematic svg file, and start simplifying (using text editor)

test04

Here is what is left in the schematic svg file

move the connector… rect elements inside of the layer1 group. The interior body of the schematic symbol only highlights on hover in about a 0.15 inch band. No obvious matching graphics. The outer symbol (background and pins) highlights correctly.

The schematic pins can not be selected, to make connections.

test05

move the connector… elements back outside of the layer1 group. Move the unnamed group of connector lines outside of the layer1 group (just before the rect elements). The line elements do not show up in a simple viewer, even before combining into a part. Redo, duplicating the transform from the layer1 group. test05_schem.svg content looks good, though back to be rotated 90 degrees again.

test06

reduce the transform offset to (0,0) adjusting the line x and y attributes to match. Tweak numbers for consistency, and round to nicer multiples. 7.2 px per 0.1 inch step between pins. Currently each pin line is 8.7 px, or .12 inches long. test06_schem.svg content looks good, though again rotated 90 degrees.

test07

move the connector pin line elements outside of their (no attributes) container groups, and delete the now empty groups (still in the group with the common attributes). test07a_schem.svg content looks good, though again rotated 90 degrees.

test08

add connector6 id to line element, and remove original connector6 rect element. Connectors work in Fritzing, test08a_schem.svg content looks good, back to base orientation.

add matching connector«n» ids to the rest of the connector pin lines, and remove the rect elements with connector«n» ids. test08b_schem.svg content looks good, though again rotated 90 degrees.

cleanup connector«n»terminal rect element position and size. Set the centre of the rectangle to the defined edge of the schematic graphics (it extends outside to main range rectangle). test08c_schem.svg content looks good, though again rotated 90 degrees.

This is now down to a fairly minimal schematic part graphic. It is only 69 lines, 3782 bytes while the Fritzing schematic template file is 88 lines (some blank), 5971 bytes. This is smaller due to moving common attribute values to containing group element. The template also has a few extra example graphic elements.

Recalculate and fix the rest of the connector«n»terminal rect element position and size values. test08d_schem.svg content looks good, though again rotated 90 degrees.

test09

Bring some of the updates from the schematic template file into the working svg.

Set the svg element attributes: version, baseProfile, and id to match the template file: 1.2, tiny, Layer_1. Add full size (as viewBox) background rectangle outside of schematic group. This DOES get carried into Fritzing view, but not exported to svg image. Useful for viewing raw svg schematic file, without the hatched transparent background. Add duplicate rectangle at the top of the schematic group, commented out, to allow easy addition of background when viewing exported svg. test09a_schem.svg content looks good, rotated 90 degrees from base.

Remove svg element xmlns:… attributes that are not in the template. Add 0.1 inch help reference block that will be included in Fritzing, but not exported to the view svg. Add xmlns:xml namespace attribute to schematic group. Remove layer1 id from group. test09b_schem.svg content looks good, rotated 90 degrees from base.

test10

Remove large translate offset from group and adjust child element coordinates to compensate. Remove null group wrappers from around pin labels. Adjust the label matrix offset values to integer multiples of 0.1 inch and adjust the containing group offset to compensate. Remove the scaling from the wrapper around the coil graphics, simplify the curved path segments, adjust the start point to integer multiples of 0.1 inch and adjust the containing group offset to compensate. Adjust the pin connector line coordinates to be integer multiples of 0.1 inch, and set the containing group offset to compensate. Resequence pin related elements into the connector number order within each group. test10_schem.svg content looks good, rotated 90 degrees from base.

test11

Use nested groups to set different offset for left and right pin information while keeping the actual element coordinates the same. test11a_schem.svg content looks good, rotated 90 degrees from base.

Remove generic id attributes not used for Fritzing. Group pin related together to make changes easier. Currently 3 sets: pin numbers, connectors, and terminals. Could be pin labels as well. Increase coil graphics to standard stroke width. test11b_schem.svg content looks good, rotated 90 degrees from base.

test12

Adjust full dimensions to even multiples of 0.1 inch. Adjust wrapper offsets so that pin element references start from 0,0. test12a_schem.svg content looks good, rotated 90 degrees from base.

Adjust so the pin elements are NOT at a multiple of 0.1 inch from the top. test12b_schem.svg content looks good, rotated 90 degrees from base.

test13

Tweak for better svg version 1.2 tiny conformance. Remove Adobe Illustrator generator comment. Remove doctype. Remove id from svg element. test13_schem.svg content looks good, rotated 90 degrees from base.

Pending ideas

Move connection terminals (back) outside of the schematic group, so that they will not be exported to view svg files. Even if they are invisible. Check to see if they do get exported anyway.

Schematic result

This is now a pretty good base for a Fritzing part schematic template file. A few other elements could be added, like pin label names in the standard size and colour. Also a pin group name.

relay, even SPST, could use the split schematic: the coil and (each) switch could be separated on the schematic.

Breadboard

test14

cleanup xml and svg tag attributes for svg version 1.1. remove defs, sodipodi, and metadata elements. remove inkscape generator comment wrap blocks of rect elements group elements, extracting the common fill="none" to the container. change the «integer»,«fraction» values in the rect elements to «integer».«fraction» comment out the block of rect elements that are not displayed, and do not have any id attribute. test14a_bb.svg content *mostly* looks good, other than the errors that have been there since the base. test14a_schem.svg content looks good. Schematic was rotated in Fritzing to get to match base.

Move connector group outside of breadboard group. (connector rectangles are also used for terminal reference) Add group wrappers with offset translations to get connector coordinates on 0.1 inch grid use nested groups with offsets to get the coordinates the same for the low and high numbered connector pins. Adjust so connector pin rectangle centres are exactly on 0.1 inch grid. Change part label to "TEMPLATE". test14b_bb.svg content looks good.

Remove generic/generated ids. Add group wrappers around related element sets: (chip orientation markings, notch, legs). Delete extra precision digits. test14c_bb.svg content looks good.

Why does the DIP package body (top/background) have both stroke and fill? They are the same colour, and there seems to be no need for a border. Original from before the 3D border was added? Found that the part name text is not showing up because the font-size was set to 0 in the svg export. Changing the svg element style from "font-size:4.8px;…" to "font-size:4.8;…" fixed it. Remove large transform offset from block of elements creating the DIP package body. Replace with offset to get (0,0) to top left corner of the DIP package body. Remove stroke from main DIP package body, and adjust size to compensate. Remove scaling from elements and adjust coordinates to compensate. Get rid of more extraneous precision digits. Remove duplicate connection pin piece test14d_bb.svg content looks good.

Add physical dimensions with units, and viewBox scaling factors. Attempt to create reusable components with defs: Visible in Fritzing, but failed to export to svg. - kept in file, but commented out, with sample usage references. Get rid of the large offset for the pin leg graphics, adjusting element offsets to compensate. Simplify the pin leg graphics, and reduce to common coordinates with simple multiples of 0.1 in offsets. Group repeating leg graphics sections, and move common attributes to the groups. test14e_bb.svg content looks good, and leg connections look and work correctly in Fritzing.

test15

Change to version 1.2 tiny header. Remove more unneeded id attributes. Tweak leg graphics coordinates to symmetrical positions. Simplify icon graphics and match to breadboard coordinates. test15_bb.svg content looks good, and leg connections look and work correctly in Fritzing.

test16

Cleanup pcb graphics. test16_«x».svg content looks good, and leg connections look and work correctly in Fritzing.