Correct way to save InkScape SVG-files?

InkScape version 0.92.1 r15371

  • I took the file RPACK_WRONG.fzpz which you uploaded after correction, and opened it with Fritzing.
    So the part is listed in my parts bin.

  • Right click - Edit part (New Parts editor)

  • Select PCB-view

  • File - Export - as image - SVG.

  • Opened the resulting SVG-file with Microsoft Visual Studio 2010. To view it as XML.
    Uploaded a screenshot from this view. It looks OK.

  • Opened same file with InkScape. Took a screenshot from the XML-view and uploaded.
    This one has separate copper1/copper0.

The file RPACK_WRONG.fzpz you corrected, works fine when used in Fritzing. So nothing wrong there.

For once not Inkscape’s fault :slight_smile: . Fritzing is from somewhere picking up that it is (or at least was) an old style part and looks to be converting it back from new style to old style for some reason. Since Fritzing supports both versions it should be fine other than old style xml if exported. It may always do this as I rarely re export parts after changing them from old style to new. One other thing to watch on the new Inkscapes is that dot per inch (i.e. scale) has changed from 90 dots per inch in 0.91 (and which Fritzing is expecting) to the CSS standard of 96 dot per inch in 0.92 and later. Usually it doesn’t matter as Inkscape detects the old style scale somehow and adjusts, but I had one part that looked fine in Inkscape but was scaled wrong in Fritzing when I was running 0.92. Moving back to 0.91 fixed the problem and I stayed there. From later comments I think there is a new tab in Inkscape that will set the scale so its possible that you can now specify that a drawing should use 90 DPI rather than 96, I need to upgrade and look at it but haven’t done so yet.

Peter

Peter

Why do you ever use px as a measurement? I have my Inkscape set to use MM and for those of you that use Imperial you can set it to use Inches. I can’t see any reason one would leave things set to pixels when they are trying to make something that is measured in real world units.

Because I don’t know how to get it out of px. I’ve never found a global setting to change everything to in or mm and I think Inkscape always uses px (perhaps because of the lack of the global setting) in xml editor. Another Inkscape tip if you know how to do this :slight_smile: .

Peter

I can’t say there is a global setting but when I start a new image my Inkscape does start with all the units set to mm. I am using Inkscape 0.92 so these settings may be different than yours.

These are the settings I have set. I also change the document properties whenever I open an SVG that has been saved as units other than mm.

In the file menu file/document properties you can set the “Display units” and you can set the page sizing with “Custom Size” to use your units of choice.

Also in the Preferences you can make more changes. edit/preferences/interface/grids has two places to set units. Also in edit/preferences/behaviour/steps you could change more units although I still have these set to px but use mm for all my other settings and when I look in the XML editor I do not see px mentioned and all units appear to be mm.

Thanks, I’ll try this out (and upgrade to 0.92 or probably 0.921) and see if it bites me again Most things ran fine on 0.92 (I think because it was detecting old style drawings and converting) but one part I was debugging for someone had scale issues and I think it may have been created from scratch on 0.92 and was using 96 DPI Switching back to 0.91 fixed the issue and I stayed there out of lazyness.

Peter

Yep all of these are here in 0.91 and I have them all set in my template but it ignores the template on existing documents and I never realized doing a resize page may convert to the selections if I set them. I’ll see if that fixes up the issues I have seen such as odd units in xml editor, it is sometimes in thousanths of an inch (desirable) but sometimes in some unit I can’t match to anything (in, mm, or px) which makes calculating hole sizes a pain. If resizing the document fixes that I’ll be a happy camper :slight_smile: .

edit: Well this was illuminating anyway, installed 0.92.1 and picked one of my problem parts. Turns out it is scaled in points (72 to the inch) which scale told me (and probably was before but I didn’t look at it). Unfortunatly changing the scale to 1000 screws up the drawing without modifying the units in xml editor (so a double loss :slight_smile: ). But at least knowing what the units are (which I didn’t before) I can resize with a calculator.

Peter