Bendable legs hell


#3

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


#4

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…


#5

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.


#6

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


#7

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)

EDIT
Forgot to mention I changed doc prop to mm.

EDIT EDIT
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.


#8

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
dots.

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


#9

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


#10

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)


#11

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…


#12

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)


#13

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


#14

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:

$ xml.pl 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=“http://purl.org/dc/dcmitype/StillImage

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

new file2: xmlns:svg=“http://www.w3.org/2000/svg

which seems harmless enough. (xml.pl 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):

$ xml.pl 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


#15

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:


#16

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


#17

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


#18

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


#19

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…


#20

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 FritzingCheckPart.py 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.

Peter


#21

Wow, that was great… Thanks a lot…
Now, It’s looks very easy… :heart_eyes:

I’ve to change some position, stroke size… And now it’s perfect…
Didn’t face any issue after edited in Illustrator…

Power Inductor new.fzpz (6.2 KB)

I tried to make bendable legs, for my previous parts… It’s little tricky…
Changing BB svg doesn’t work… Because I already ignored the leg parts…!!!
So, there was two option, make the whole part from start, or the following…
(for anyone having issue)

  1. Extract the old FZPZ file.
  2. Edit the part file, add leg Id in every breadboard view.
  3. Create new FZPZ file.
  4. Unload old part from fitzing, and Import the new file.
  5. Edit part > load the new breadboard SVG > save…

Thanks a lot… :grinning:


#22

I’ve almost never found it easy :slight_smile: . In this case it was because you had done most of the work already. I usually take 3 or 4 attempts to get it right starting from scratch. As noted if you don’t inline the style commands it will also often fail silently @steelgoose found that for me a couple of years ago.

Peter