Parts editing: breadboard view does not render properly

It appears to be something to do with parts editor. I downloaded your fzpz file and unzipped it to get

‘part.MQ-2 Gas sensor_d41ce08d82ad6a59be64df66daa2671c_2.fzp’

‘svg.breadboard.MQ-2 Gas sensor_d41ce08d82ad6a59be64df66daa2671c_2-orig_breadboard.svg’

‘svg.breadboard.MQ-2 Gas sensor_d41ce08d82ad6a59be64df66daa2671c_2_breadboard.svg’
‘svg.icon.MQ-2 Gas sensor_d41ce08d82ad6a59be64df66daa2671c_2_icon.svg’

‘svg.pcb.MQ-2 Gas sensor_d41ce08d82ad6a59be64df66daa2671c_2_pcb.svg’

‘svg.schematic.MQ-2 Gas sensor_d41ce08d82ad6a59be64df66daa2671c_2_schematic.svg’

which is the fzp file and the 4 svgs in fzpz format. Then I renamed

‘svg.breadboard.MQ-2 Gas sensor_d41ce08d82ad6a59be64df66daa2671c_2_breadboard.svg’

to

‘svg.breadboard.MQ-2 Gas sensor_d41ce08d82ad6a59be64df66daa2671c_2-orig_breadboard-orig.svg’

then copied your original svg in to

‘svg.breadboard.MQ-2 Gas sensor_d41ce08d82ad6a59be64df66daa2671c_2_breadboard.svg’

ran FritzingCheckPart.py against the files to clean up any lingering px in font-sizes and rezipped the part. Loading the new part works correctly in Fritzing indicating the problem is in parts editor export of the new part. The linear gradients appear to work in Fritzing but have export difficulties in parts editor. Note that FritzingCheckPart found a variety of things to complain about that I haven’t corrected here (the most important is no breadboard layerId which will prevent the part from exporting as an image!)

What I would do (which I normally do anyway!) is to ignore parts editor and edit the files directly that is likely the only way at present to keep the linear gradients working correctly. How I make parts (which is what I used here) is decribed in this tutorial set:

and here is the corrected part (I’ll poke at the differences between the two breadboard svgs and see if I can figure out what parts editor is deleting on export.)

MQ-2-fixed.fzpz (9.6 KB)

edit: the problem is indeed the linear gradient but I don’t know why. The left is your original svg the right is the breadboard from the fzpz file. Both have been ungrouped for easier visability, both are now identical (I edited the path on the breadboard svg in xml editor to be identical to the one in the working svg, but it still doen’t display correctly!) For some reason the linear gradient doesn’t get rendered but I don’t know why.

As far as I can see the gradient stuff is all the same in both svgs, just one works and the other doesn’t unless the layer1 is important to the linear gradient (I don’t know anything about linear gradiants!) as that seem to be the only obvious difference between the two svgs.

Peter

1 Like