Fritzing ignores mm unit in svg

i tried to make a part and used the mm measurements from the datasheet (hand crafted svg cause inkscape constantly messed up the values). it displayed correctly in browsers, but guess what fritzing did. it ignored the mm unit and seemed to interpret the values as 100th of an inch. i then divided each of the values (by hand!!!) by 0.254, which should result in the right values, but again fritzing thinks that my units are not good enough and the part was a little bit too big (7 units, or 70 thou). i subtracted the 7 thou from the right side of the part, which finally made it fit (in the width). then i tried to export, to validate that the pads are at the correct location, and fritzing strikes again. the text i had in the silkscreen is teeny tiny (displayed fine in the pcb view though).

What I expected should have happened instead:

i expected fritzing to work with the given units, and to display the font on the export like it displayed it in the pcb view. whats so hard about that? i wasted my whole day on that part because fritzing just completely stood in my way. guess i should write my own software (with blackjack and hookers)

My version of Fritzing and my operating system:

fritzing 0.9.3
windows 10

the now completely ruined svg is attached (oh wait i cant see an attach button… greaaaat)
here a link to the svg https://dropfile.to/40P0Lf5

As far as a know Fritzing only uses the standard electronics measurement of thou or mil(not mm).

I think your conversion is wrong, it’s not mm divided by 0.254, it’s mm divided by 25.4 - 25.4mm to the inch - or mm multiplied by 39.3701 - I use 40 as rounded up -.

Always setup a 0.100" grid before you start drawing and you can use the snap to centre for connectors.

I don’t know what svg program you are using but in Inkscape you node select in the XML editor and physically enter the dimensions of that node in the tool bar at the top, then you just move it to where you want. Editing is rather quick.

the pcbs are measured in mm though. if i would multiply by 40 the part would be huge (around 8 inch in) and its only 19.7mm. as i said, fritzing is using 10 thou per unit in the svg (or at least it seemed like it, its deffo not 1 thou per unit) so i had to multiply by 3,93701

also rounding when manufacturing technical parts isnt really a good practice i think.

yeah inkscape applied transforms to some parts when moving them around in a group, and fritzing was like “nah ill ignore that” and the parts were crooked (again looked fine in browsers), so i tried to do it by hand, which also allowed me to not introduce many many floating point errors, that accumulated quite quickly in inkscape. all i want is fritzing to properly implement the svg standard, which according to this https://www.w3.org/TR/SVG/types.html#DataTypeLength allows units like mm, in, px and so on as dimensions, etc.

Sorry I’m a machinist and I just multiply by 40 and ignore the divide by 1000 - I move the decimal point in my head.

I think you have to change the units in your vector program to the units you like (mm) because it sounds like you are using pixels as units there. In Inkscape File/preferences.

As far as I know FZ can not convert, they have to be dimensionally accurate before they are loaded in. Just imagine you are doing a engineering drawing for production.

Use the measuring stick set to the units you want.

EDIT
by dimensionally accurate I mean that it has to be a full size 1:1 drawing of any units that make the thing actual size. I think the problem is in the vector program because you haven’t set the units you want. PCB has to be exact because it goes to production. Breadboard only has to have contacts on a 0.100" (2.54mm) grid to connect with breadboard, strip and pref board.

as i said i made the file by hand. so there is no program. i typed in the values like 0.2mm and it worked great in the browser. when using inkscape it always screws up the precision when moving stuff, and it seems that fritzing also has a problem with that, i had a part where the text was always offset by a certain amount for no reason at all. but it displayed fine in the browser.

im not making a breadboard part, im making a pcb part, and its screwing up everything

Try this… I am not sure what size it is suppose to be… http://imgh.us/RFM69HW_pcb_1.svg

Update: I looked up the data sheet to get the correct size… try this one http://imgh.us/RFM69HW_pcb_2.svg

yes the second one is the right size, i had to resize the pads though, as they had 1mm too much overhang for me. now it displays fine in the pcb view http://i.imgur.com/uHMVAFt.png , but again its fucked in the export (silkscreen top) http://i.imgur.com/LuqA48V.png

How are you creating these parts? Are you using the Fritzing Parts Editor?

i tried it first with copying the rfm22 file, and then edited it with inkscape, but this gave me a heap of problems. so i decided to write the svg by hand in notepad++ (its not a binary format, if you didnt know that, its xml, and therefore human readable and writeable)

the file you sent me, i edited with inkscape, to make the pads smaller, but as you see the text is still incredibly tiny (even though you set it to 1000px with your editor, all the values are huge).

i want to make the parts by hand, because it gives me the most control over the values, but it seems fritzing is not able to adhere to the svg standard

Here is another one with the pads at 3mm. http://imgh.us/RFM69HW_pcb_3.svg . I thought they were a little long too. The footprint wasn’t in the data sheet. I found a couple of breakout board and that is what they had. I tested it and have no problem with the silkscreen. If you are still having a problem, send me the .fzpz.

Are you using the Fritzing Text Editor or creating the part manually in the .fzp?

When saving your .svg in inkscape… what format are you saving the .svg? (Inscape .svg or Plain .svg)?

You can’t expect Fritzing to understand a svg that is not displayed correctly in Inkscape in the first place. Sounds like you have a problem with your svg drawing not FZ, because my parts are fine in FZ because they are fine in IK.

Open the svg in Inkscape and make 100% sure it full size, 1:1, dimensional correct, save it as a Plain svg, and import it.

the 3rd one also has a problem where the font is too small, without changing it.
im making the fzp by hand. i copied an original part (RFM22) and changed it
i just pressed ctrl+s so i guess a inkscape svg

the svg displayed fine and correct in inkscape, its just fritzing that cant work with it.

Mine has big fonts. Maybe get a part with big fonts and reverse engineer it to find out why.

i actually posted this here in the hope of getting an actual developer to say something about it, not to work my way around their broken software. i mean if it displays okay in the pcb view, but not in the silkscreen, there is something broken, you cant argue otherwise. also my text is the most simplest form, its a text element, with a css style that dictates the font size, nothing more. its as simple as it gets. something is broken in fritzing, and it shouldnt be up to the user to fix it

You’ve made so many mistakes it looks like the drawing is the problem. Steelgoose fixed most so it was the svg.

Search MPX2010 in Parts, and in the PCB view the Vacuum and Pressure text isn’t tiny.

Link a download and I will look at it.

There is nothing wrong with the .svg’s. You cannot create a part without using the Parts Editor. Fritzing Parts Editor error checks and rewrites the svg’s so they will work in Fritzing. Fritzing creates these “gorn” in the code which are required for the proper display of the graphics. (see code below)… This is what the silkscreen code from your .svg should look like… “notice all the gorn’s”

<g id="silkscreen" gorn="0.1.1"> <line y1="22" id="top" x1="561" stroke-width="43.2403" stroke-linecap="round" x2="11740" fill="none" stroke="#373435" gorn="0.1.1.0" y2="22"/> <line y1="9101" id="bottom" x1="561" stroke-width="43.2403" stroke-linecap="round" x2="11739" fill="none" stroke="#373435" gorn="0.1.1.1" y2="9101"/> <line y1="22" id="right" x1="11739" stroke-width="43.2403" stroke-linecap="round" x2="11739" fill="none" stroke="#373435" gorn="0.1.1.2" y2="9101"/> <line y1="22" id="left" x1="561" stroke-width="43.2403" stroke-linecap="round" x2="561" fill="none" stroke="#373435" gorn="0.1.1.3" y2="9101"/> <text x="3414" font-family="OCRA" font-weight="500" id="label" y="4845" font-size="1008.83" fill="#373435" gorn="0.1.1.4">RFM69HW</text> <rect x="2788" height="2177" y="5963" stroke-width="43.2403" fill="none" stroke="#373435" width="2252"/> <rect x="2844" height="2027" y="589" stroke-width="43.2403" fill="none" stroke="#373435" width="6693"/> </g>
If you use InkScape and the Fritzing Parts Editor you should not have any problems.

“youve made so many mistakes” … like adhering to the svg standard?

the gorn attribute is some kind of help to put the parts in a tree structure. see the group has 0.1.1 and the sub parts all have 0.1.1.*
it has nothing to do with how its displayed, and for example the rfm22 part doesnt have these gorn things. the svg is served with fritzing. its under Fritzing\fritzing-parts\svg\core\pcb\sparkfun-rf_rfm22-xxx-s2_pcb.svg

When I loaded the http://imgh.us/RFM69HW_pcb_3.svg with the Parts Editor it displayed properly and the text displayed in the proper size… Using the Parts Editor for making parts for Fritzing is essential…