Silkscreen images appear in Gerber viewer but not in Fritzong

Hi All,

I’ve been experimenting with uploaded images from Inkscape to Fritzing, basically a rectangular outline to enclose groups of component. The PCB view in Fritzing is as I would expect:

When I export for PCB as an Extended Gerber File and upload to PCBWay’s Gerber Viewer, I seem to get a number of other silkscreen images (marked with a white arrow):

I’ve used Control+A to highlight everything in case the unwanted images were lurking off the board in the design area of Fritzing but nothing shows up.

Any tips gratefully accepted.

Best wishes

Phil

Best bet is to upload the sketch (the .fzz file, upload is 7th icon from the left in the reply menu.) With that I can produce the gerbers and likely figure out what the problem is.

Peter

Thanks for the reply Peter.

Is the .fzz file the Fritzing Project File?

I can’t see any other files with a file extension of .fzz.

Thanks for your patience, Phil

If it ends in .fzz that should be the sketch, yes. It is the file that you saved the project in to and should load the sketch when clicked on.

Peter

Allotment Pump 7.fzz (34.2 KB)

Hi Peter,

Having uploaded it, I can see the file extension above!

Best wishes, Phil

Yep, that is the file. If you are on Windows, by default it suppresses the file extension so the .fzz will show up as " Allotment Pump 7" I expect. Your sketch does the same for me, Fritzing silkscreen looks fine:

but the gerber output is wrong (here displayed by gerbv which eliminates a fault with gerber displayer you are using.) Now I need to figure out why this is happening which may take a while. This is silkscreen layer only so the copper doesn’t show up indicating the error is in silkscreen somewhere. It could be a badly configured part with translates that shouldn’t be there, I guess we will see.

edit:

It appears to be something in your image files that is causing the issue. If I delete all the image files the silkscreen looks correct (indicating the parts are correct and the problem is in the image files.) This is the gerbv output of the silkscreen layer without any of the image files and the artifacts are all gone. I’ll have a look at the image files (which should be in the .fzz file) and see what I can see.

edit2:

The svg is in the .fz file, but is in escaped xml rather standard xml I can translate it back to xml, but it would be easier if you upload the svg files for the images you used (the upload will load the svg file to the forum and display it, right clicking on it and selecting “save image as” will download it. I think you may have some test images in the .fz file that you didn’t intend that are appearing in the gerber output but not Fritzing for some reason (which may indicate a Fritzing bug!) This one for instance may be the white rectangle

“C:/Users/phil-/Documents/Fritzing/Rectangle Test 1.svg”

in the fz file it looks like this

        <instance moduleIdRef="newLogoImageModuleID" modelIndex="86350" path=":/resources/parts/core/newlogoimage.fzp">
            <property name="width" value="19"/>
            <property name="height" value="31.5"/>
            <property name="shape" value="&lt;?xml version='1.0' encoding='UTF-8' standalone='no'?&gt;&#10;&lt;!-- Created with Inkscape (http://www.inkscape.org/) --&gt;&#10;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; height=&quot;1.24016in&quot; id=&quot;svg1&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 100 130&quot; width=&quot;0.748031in&quot; &gt;&#10; &lt;g id=&quot;silkscreen&quot;&gt;&#10;  &lt;defs id=&quot;defs1&quot;&gt;&#10;   &lt;linearGradient id=&quot;swatch6&quot;&gt;&#10;    &lt;stop id=&quot;stop6&quot; offset=&quot;0&quot; style=&quot;stop-color:#000000;stop-opacity:0;&quot;/&gt;&#10;   &lt;/linearGradient&gt;&#10;   &lt;linearGradient gradientUnits=&quot;userSpaceOnUse&quot; id=&quot;linearGradient6&quot; x1=&quot;60.322121&quot; x2=&quot;116.03363&quot; xlink:href=&quot;#swatch6&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; y1=&quot;53.406212&quot; y2=&quot;53.406212&quot;/&gt;&#10;  &lt;/defs&gt;&#10;  &lt;g id=&quot;layer1&quot;&gt;&#10;   &lt;rect fill=&quot;none&quot; height=&quot;45.721863&quot; id=&quot;rect1&quot; stroke-width=&quot;0.264583&quot; width=&quot;64.932732&quot; x=&quot;30.35317&quot; y=&quot;71.464424&quot;/&gt;&#10;   &lt;rect fill=&quot;none&quot; height=&quot;5.7632599&quot; id=&quot;rect2&quot; stroke-width=&quot;0.264583&quot; width=&quot;4.2263904&quot; x=&quot;112.19146&quot; y=&quot;91.443726&quot;/&gt;&#10;   &lt;rect fill=&quot;none&quot; height=&quot;40.342823&quot; id=&quot;rect3&quot; stroke-width=&quot;0.264583&quot; width=&quot;30.353001&quot; x=&quot;107.96507&quot; y=&quot;79.532982&quot;/&gt;&#10;   &lt;rect fill=&quot;none&quot; height=&quot;60.706341&quot; id=&quot;rect4&quot; stroke-width=&quot;0.264583&quot; width=&quot;80.685646&quot; x=&quot;12.294954&quot; y=&quot;47.642948&quot;/&gt;&#10;   &lt;rect fill=&quot;none&quot; height=&quot;16.521345&quot; id=&quot;rect5&quot; stroke-width=&quot;0.264583&quot; width=&quot;36.884865&quot; x=&quot;41.879692&quot; y=&quot;21.131952&quot;/&gt;&#10;   &lt;rect fill=&quot;#000000&quot; height=&quot;36.116428&quot; id=&quot;rect6&quot; stroke-width=&quot;0.264583&quot; style=&quot;opacity:0;&quot; width=&quot;55.711514&quot; x=&quot;60.322121&quot; y=&quot;35.347996&quot;/&gt;&#10;   &lt;rect fill=&quot;none&quot; fill-opacity=&quot;1.0&quot; height=&quot;122.07047&quot; id=&quot;rect8&quot; stroke=&quot;#000000&quot; stroke-dasharray=&quot;none&quot; stroke-width=&quot;2.58065&quot; style=&quot;fill-rule:evenodd;&quot; width=&quot;94.406822&quot; x=&quot;3.5132768&quot; y=&quot;3.5132775&quot;/&gt;&#10;  &lt;/g&gt;&#10; &lt;/g&gt;&#10;&lt;/svg&gt;&#10;"/>
            <property name="lastfilename" value="C:/Users/phil-/Documents/Fritzing/Rectangle Test 1.svg"/>
            <property name="originalWidth" value="100.00000000000001"/>
            <property name="originalHeight" value="130"/>
            <title>IMG3</title>

which contains the svg file, but with xml escapes like ". It is possible to manually convert them (the " translates to either ’ or " very likely) but it is a fair amount of work to do and having the svg file would be easier. It is also possible that the problem is that Fritzing kept adding new images every time and didn’t delete the original ones (I don’t know of a way to delete an image file that you upload although there may be one!)

Peter

OK, I manually recovered one of your svgs. It has a bunch of rectangles that I don’t think should be there and it looks like the gerber processing is picking them up and putting them in the gerbers. This is the recovered svg displayed in Inkscape. In this series of images I selected the rectangles one at a time. and marked the ones I don’t think should be there in red

this rectangle is the only one that I think should be in the svg.

This image is two copies of the gerber output, on the right the original sketch on the left the sketch with the leftmost (largest) rectangle deleted.

As we see one of the extra rectangles disappears with the removal of the associated svg indicating the extra rectangle is coming from the svg. This svg should produce the correct image (having only one rectangle, but it doesn’t seem to for some reason that I don’t understand. Right clicking on the image below and selecting save image as should download the svg file for you.

test

as we see in this image, when loaded the svg truncates the lines on the left and right and I am not sure why (although the extra rectangle doesn’t appear!)

Peter

Good work Peter!
I would say that this is a bug in Fritzing and it would be great if you report it in the issue tracker.
Happy New Year!

Yes I was planning on reporting it as a bug later today. Indeed happy New Year!

Peter

Hi Peter,

Firstly, thanks for all your help in such a short timeframe.

I used the XML editor (I had no idea what this was until your replies) to delete the unwanted rectangles. I deleted the rectangles in the Fritzing app and uploaded the newly saved Inkscape file with just the single rectangle.

This appears to have done the trick although I note that the narrow boxes have thinner edges compared to the larger ones. I have de-selected Keep Aspect Ratio on all the rectangles, perhaps this has something to do with it. The borders should be 1mm wide.

Learnt a lot over the past 24 hours, many thanks.

Best wishes

Phil

There appears to be something odd going on with svg import. In my original svg the viewbox is set to the outline of the part as normal, but by the time it gets to gerber processing the right and left lines appear to be truncated. That may well be a bug in gerber processing, I will report both the bugs on github and they may get fixed in a future release. If the extra rectangles don’t show in pcb view they shouldn’t be appearing in the gerbers, but that doesn’t appear to be the case and that is a bug that should be corrected. You may be able to correct the problem by making the viewbox slightly wider than the outline of the part in Inkscape. The easy way to do that would be to put a drawing element like a rectangle on the 4 corners of the svg,
then do an Edit->select all and Edit resize page to selection to set the viewbox, then delete the 4 rectangles. That will set the viewbox slightly larger than the actual image and may stop the truncation (I haven’t experimented with that yet.) This has been useful as it turned up a bug we didn’t know about!

edit:

It appears there is something unusual about your svg. When I resize the svg an offset appears in the image and I am not sure why. When I started a new image and created a single rectangle the export works correctly with no truncation. In any case I’ll report your original svg as an error on github.

Peter