Exporting breadboard as SVG bugs

Posting this here as I guess I came off too strong on a GitHub post and got in trouble and in timeout for a month… Sorry, my frustration got the best of me. :sweat_smile:

Two issues when exporting as an image and selecting SVG as the format.

  1. The sizing is not correct and it causes the image (and in turn parts) to appear cutoff. If I manually edit the SVG file values, I can resolve this issue though but of course that shouldn’t be needed.
  2. Wires don’t align with the pins they are attached to as expected. This does not happen when I export as PNG/JPG/PDF.

Steps I took that resulted in the problem:

  1. Create breadboard diagram
  2. File > Explort > as Image > SVG
  3. View file

What I expected should have happened instead:

All parts viewable (not cutoff) and wires align where they are supposed to be as with other export methods.

My version of Fritzing and my operating system:

V1.02
macOS 14.2.1

I’ve attached the SVG which you can see has issues. I’ve also attached a PNG and PDF which do not. I’m wanting to export as SVG for two reasons:

  1. Where I plan to use the image.
  2. Only when exported as SVG do the pins not highlight.

Please let me know if you need anything further.
heltec v3 cardkb


It is certainly reproducible, but it looks to be an error in the Heltek part not Fritzing. This is the Heltek V2 part from core parts (for future reference it is good practice to upload the sketch file, the .fzz file so we can experiment on the real sketch.) This is on Fritzing 1.0.2 on Win10.

the bounding box is not correct and the wires are off as in your image

replace the Heltek with the Arduino pro mini and things work as expected bounding box contains the entire image

and the wires align correctly

Untitled Sketch1.fzz (17.2 KB)

I didn’t keep the first sketch only the second. I’ll have a look at the Heltek part in core parts and see if I can identify the error in the parts.

Peter

1 Like

I will too. Sorry if that was my error… The part in the original layout above is the V3 module, which may not yet be in Core Parts. However, it uses all the same basic details in the component part files so, if there’s a problem in the V2 part, it’s probably there in the V3 part too.

Update: OK, so there’s something really weird going on there. I’m not sure how many of the parts I have made have made it to Core Parts but, as I anticipated, all versions of the Heltec WiFi LoRa 32 board behave the same way—they don’t scale properly when exported as SVGs (they render fine as image files, JPG or PNG). The strange thing, from my perspective, is that the Heltec WiFi Kit 32 board, which again is derived from the same graphics, seems to be OK. This may all come back to the fact that I use Illustrator to create my drawings and we have that eternal problem of converting from pixels to something ‘real’. I need to look closely at the WiFi LoRa vs WiFi Kit parts to see where the difference, and hence probably the problem, lies.

1 Like

My error… As I know you’ve (@vanepp) said on many occasions, the whole image needs to be grouped or it won’t render properly…

Please check that attached. It should now render correctly and, if you can confirm that it does, I will go through all of my parts and ensure that they all conform to this requirement.

Edit: Corrected Part (both Breadboard & Schematic) attached.

Heltec WiFi LoRa 32 V3.fzpz (62.8 KB)

The V2 (and likely V3) part is missing breadboard and schematic layerIds. In versions before 1.0.2 that meant the part wouldn’t export at all, it looks like 1.0.2 exports it but not quite correctly. The original svg is circled in red here. It needs a breadboard group (which needs to match the layerId in the .fzp file which is likely breadboard.)

same with schematic (this is the original)

which needs to look like this

pcb is OK as is.

So if I correct the part

Heltec WiFi LoRa 32 V2-fixed.fzpz (58.1 KB)

then export it as an svg (with the correct layerIds) it then works as expected the same as the pro mini.

something about the lack of layerIds is breaking Fritzing 1.0.2 in a new way.

Peter

1 Like

OK, so I need to fix the Schematic in the V3 version above too. I’ll do that now and amend the previous post when done.

1 Like

Wow! I did not expect a solution so quick. Thank you @vanepp and @UniquePete!
Screenshot of the correct SVG now.