Bendable legs hell

So I have a part that I grabbed from Mr Google (my good friend :slight_smile: )

Voltmeter.fzpz (8.3 KB)

Its close, but needs some changes and has bendable legs (which is good, the meters I have have wires connecting them). So the I’ve been trying to move the bendable legs for the last several days now with a notable lack of success. So I broke down and edited the svg file and discovered it lacks a group breadboard (although Fritzing doesn’t seem to care, the original part works fine as far as I can see). So in Inkscape I first moved (via xml editor) all of terminal0/1/2leg inside the view box, then did edit select all, and group which created a new group g3477. I then used xml editor to rename group g3477 to breadboard and then moved the legs back to their original position (because not doing that already hadn’t worked, along with everything else :slight_smile: ). While things look fine in Inkscape, Fritzing disagrees. It has eaten the terminals in breadboard view:

Voltmeter_moded.fzpz (8.9 KB)

Can someone tell me what I’m doing wrong here please? What I need to do in the end is move the 3 wires from the bottom of the meter to the right hand side (and hopefully bend them 90 degrees so they would connect correctly to the breadboard). Along the way I’m trying to comply with the fpz file format doc and have a group called breadboard even though Fritz doesn’t seem to care, but even without doing that I’ve had no success at moving the bendable leads anywhere.

Peter Van Epp

I don’t have a clue about that, but can you export and unzip the battery and analyze it’s format.

Tried that with the servo (also three wires bendable leads and I think with the breadboard group) for most of yesterday with the same results: if I move the leads the connection goes away and I can’t get it back. There has to be something I’m missing somewhere.

Peter Van Epp

It worked for me and I edited very little. Your pins and legs are there, I’m not sure why it didn’t work. I will look at it tomorrow and see if I can nail it down…

1 Like

Oddly enough it worked for me also. using that Ink XML Editor node select - svgline connector0leg - change x coordinate to 20, save, and load into FZ edit. It bends fine even with the leg in mid air.

1 Like

For me the first two legs things are fine because I didn’t change those 2 but the third one I moved and for me that one doesn’t work. There is no connector mark in breadboard for the black wire.I moved all three of the connections i.e.

connector2leg x1 49.816387 x2 49.816387 y1 49.077312 y2 53.425304

                 x1  58.816387 x2 58.816387   9px each!

connector2pin x 48.316387 y 47.469311

                 x 57.316387

path11_1_ m 49.81639,39.660275 0,9.417

        m 58.81639

If you only move one it may not break.

Peter Van Epp

The XML changes for the node, but it still seams to work. I used rotate because the size boxes wouldn’t work.
Voltmeter2.fzpz (8.9 KB)

Forgot to mention I changed doc prop to mm.

I pressed New Element Node button, type svg:g.
Select node id and type breadboard, set.
Moved it under defs96.
Indented the 6 things 1 step that was under it.
Save and load in FZ edit and still working.

1 Like

I’ll have to look closer at yours, but it could be that you aren’t moving the path although moving the connector point should do something I’d think. For me, I just tried moving the pins back to their exact same position as they started with xml editor and the connector pins are still missing. Inkscape has changed the xml around, but it seems mostly the same just in a different order: This is the output from a perl script that decomposes the xml and compares the two files (which should be identical but aren’t). Something about the xml change seems to be bothering Fritzing because the first file works but the second (which is identical in content if not in order) doesn’t none of the connectors have the connect

new file1: g g4468 path path11_1_ fill=“none”

new file1: g g4468 path path11_1_ stroke="#020000"

new file1: g g4468 path path11_1_ stroke-opacity=“1”

new file1: g g4468 path path11_1_ stroke-width=“3”

new file1: line connector2leg fill=“none”

new file1: line connector2leg stroke="#020000"

new file1: line connector2leg stroke-opacity=“1”

new file1: line connector2leg stroke-width=“3”

file1: line connector2leg style=stroke-linecap:round;
file2: line connector2leg style="fill:none;stroke:#020000;stroke-width:3;stroke-linecap:round;stroke-opacity:1"

new file2: g g4468 path path11_1_ style=“fill:none;stroke:#020000;stroke-width:3;stroke-opacity:1”

All this seems to indicate is the Inkscape has split out the style lines in to separate lines, the information should be the same but doesn’t work anymore for some reason. Its possible that there is a 4th item that I don’t know about that affects bendable legs, I expect its going to be something like that.

Peter Van Epp

Your file provides an interesting data point, it isn’t the connector leg that’s breaking things its either the connectorxpin or the path thats doing the damage. I’ve been moving all three at once. I’ll try moving the path in your file and see if that breaks. I use the rotate command in the tool bar after cntrl-left click to select the element I need to rotate (you don’t have to ungroup things if you do this) .

Peter Van Epp

I don’t know anything about coding - you guys are the experts there -, I just use Ink XML Editor to select the node, the toolbar, and Object/transform, no ungrouping, no nothing.
Here is the svg with the breadboard group
****** Change the .fzp to .svg ****** - the extension swap is to fool the uploader.
svg.breadboard.Voltmeter_c975ed737cfd9b3ca93abd153732eb5c_1ttt_breadboard.fzp (16.4 KB)

1 Like

RESOLVED: You can’t use certain css properties in the bendable leg… Apparently, the properties i.e. “stroke:#f0f0f0 and stroke-width:3”, in the style attribute will not work with the bendable leg… they must be attributes of the connector##leg element. Although, the style property (stroke-linecap:round) does seam to work with the bendable leg… Apparently, some work… some don’t…

Personally, I don’t like to use any style properties, style sheets or css properties of any kind in FZ. Using css tags of any kind in FZ have always concerned me…

1 Like

This is your file with the breadboard image generated by inkscape with all attributes in the element and no style properties…

Voltmeter_moded_v2.fzpz (8.5 KB)

1 Like

Thanks as always! Now all I have to do is figure out how to keep Inkscape from using any of these. It seems to like to randomly rearrange the xml any time it saves it … Knowing what breaks Fritzing at least tells me what I need to avoid. I’ll study this and undoubtably be back with more questions later :slight_smile:

Peter Van Epp

Well at least now I know why its broken if not (yet) how to fix it. I started from your new file and loaded/saved it with Inkscape (making no changes) and the xml changes like this:

$ Voltmeter_moded_040484b42d1e64d6830f5712366a2bd0_1_breadboard.svg.orig Voltmeter_moded_040484b42d1e64d6830f5712366a2bd0_1_breadboard.svg

new file2: defs id=“defs3500”

new file2: metadata id=“metadata3502”

new file2: metadata rdf:RDF cc:Work dc:format=“image/svg+xml”

new file2: metadata rdf:RDF cc:Work dc:type rdf:resource=“

new file2: metadata rdf:RDF cc:Work rdf:about="“no data”"

new file2: xmlns:svg=“

which seems harmless enough. ( is doing an xml diff of the two input files as Inkscape seems to change the xml order more or less at random when it writes). So I replaced your original file with the one Inkscape wrote then used Inkscape to move the black pin .1 inch to the left. As usual (at least for me) that breaks Fritzing, but I now know why (if not how to fix it):

$ Voltmeter_moded_040484b42d1e64d6830f5712366a2bd0_1_breadboard.svg.orig Voltmeter_moded_040484b42d1e64d6830f5712366a2bd0_1_breadboard.svg

file1: g g g4468 path path11_1_ d=m49.816 39.66v9.417
file2: g g g4468 path path11_1_ d="M 57.576086,39.66 57.576086,49.077"

new file1: g g g4468 path path11_1_ stroke="#020000"

new file1: g g g4468 path path11_1_ stroke-width=“3”

file1: g g g4468 rect connector2pin x=48.316
file2: g g g4468 rect connector2pin x="57.036087"

file1: g g g4468 rect connector2pin y=47.469
file2: g g g4468 rect connector2pin y="47.469002"

new file1: g line connector2leg fill=“none”

new file1: g line connector2leg stroke="#020000"

new file1: g line connector2leg stroke-linecap=“round”

new file1: g line connector2leg stroke-width=“3”

file1: g line connector2leg x1=49.816
file2: g line connector2leg x1="57.496235"

file1: g line connector2leg x2=49.816
file2: g line connector2leg x2="57.496235"

file1: g line connector2leg y2=53.425
file2: g line connector2leg y2="53.424999"

new file2: g g g4468 path path11_1_ style=“stroke:#020000;stroke-width:3”

new file2: g line connector2leg style=“fill:none;stroke:#020000;stroke-width:3;stroke-linecap:round”

Inkscape is helpfully inserting style xml in to the output. I’ve tried changing preferences->Input/Output->SVG output->path data->path string format

from optimized to absolute

but Inkscape still adds in the style line. So unless someone knows the Inkscape magic to supress this, I’m going to be searching the Inkscape docs (more, I already have and they are not illuminating) and site to see if there is a cure, and if not its perl to post process the svg output to remove the style lines again (it looks like a simple enough text transformation, and I need to kill the px added to text lines anyway, maybe I’ll start there :slight_smile: ). Again thanks for identifying the problem, I would have been lost not even knowing what css is.

Peter Van Epp

Everything is easy as long as you know how… Hmmmm, that sounds like something that Yogi would say… I will spare you the agony… Sense I don’t use Inkscape, it took me a couple hours to figure this one out. FZ told you wrong… When you save your .svg, don’t save it as Plain SVG… save it as Optimized SVG and check the boxes in the dialog box that will pop-up “Convert CSS Attributes to XML Attributes” which will convert your style properties to XML attributes, :grinning: and “Remove Metadata” which will remove a bunch of unneeded stuff that clutters up your file. The rest of the check boxes I am not sure about or if any of them need to be checked for FZ.

This will cost you a brownie button… :purple_heart: only got one all last week… and I made a bunch of parts… :disappointed:


Thanks! That too helps as I’ve just been through the Inkscape forums without a lot of success (possibly because I don’t know what I should be searching for) although I did find some interesting stuff on enabling grid lines and settings by default that I wanted to know. I’m happy to supply you lots of brownie points, but you’ll have to tell me how :slight_smile:

Peter Van Epp

Just found the brownie button and hit it on the post. I will go back (assuming I can) and do that on the rest of your replies as well! Thanks again!

Peter Van Epp

I needed to untick

Shorten color values

as Fritzing objects to the colors being stripped of their leading 0s, but now it seems to work fine!

Peter Van Epp

Hello, I don’t know how to create a bendable leg part…
I tried, and failed…

I’m creating a new parts… Not an issue without Bendable legs for me…
But, maybe It’ll be helpful for others…

I completed with the breadboard view…
Can anyone make it as “bendable legs”… Thanks in advanced…

Power Inductor.fzpz (5.2 KB)

It’s a power inductor… I couldn’t find any parts for that… So, making it with various footprint/size…

Almost right :slight_smile: Bendable legs are very picky about format. I changed the breadboard svg, there are several problems: the legId is wrong, connector1leg_ in the svg but connector1leg in the fzp. As well the format isn’t quite right, the path (currently connector1leg_ and connector0leg_) needs to be just a path (path23 and path24). The legId needs to be a line (which Inkscape won’t create so you need to copy it in from another part) and outside the viewbox (which is configured correctly). With those changes and a run through to inline the style commands (because bendable legs do not support style commands), the part works.

Power Inductor.fzpz (5.7 KB)

I didn’t change the moduleId of this so you will need to unload the current part before trying to load this one.


1 Like