I’m learning how to make parts and have made PCB layouts for two PC817 surface mount packages which are missing from fritzing. My issue is that the sizing is as per the datasheet in Inkscape but seem off when imported into fritzing.
I have my limit of one linked and I was hoping someone could tell me what I am doing wrong
The first thing I notice is you have all the Inkscape labels set and that is not needed. It will not hurt anything but Fritzing only looks at the ID which you have also set. You don’t even have to set the copper pad names at all if you are using the parts editor in Fritzing to assign the connections.
I also notice everything is set to px and unless you are using the correct px per mm the scaling will be wrong. If you go into the document properties (under the file menu) you can set the document to mm (or inches). Then in the main window when you are using the selection tool you can also set the units to mm (or inches) at the top where you adjust the location and dimensions of an object. Once you have set those can you confirm they are the right dimensions? I get 2.2mm x 1.7mm for each pad and they are 8.2mm apart which is correct according to the datasheet I checked. Once saved it should always open as mm after changing the document properties.
The next thing I notice is you have all the copper and silkscreen groups inside another group and that group has a transform which could be the issue. If you select the entire thing and press ctrl+shift+g it will ungroup them into 2 groups (silkscreen and copper1) and remove the extra transform.
The last thing is save as a plain svg not an Inkscape svg as they contain extra data that Fritzing does not want/need.
Here is the file after doing the above. I have not tried building a part with it but it should be easy for you to try changing the svg. I hope this helps and I hope one of them is the cause of the issue. If it still has the issue how are you checking the dimensions after building the part?
If you are only looking at Inkscape, then that’s normal. Inkscape always saves in px, the other units in the gui are translated from px. By default it starts and displays in px as well. Does the Fritzing part not work in some manner? If so post the part (7th button from the left in the reply tool bar) and one of us will have a look at it and tell you what is wrong.
I assume that is a rendering from Ailser and what you are seeing around the pads is the solder resist making it look larger than it is. Check the copper only layer or as Vanepp said upload the part or sketch so we can check it out.
I played with your SVG awhile and could never find the exact reason it was scaling wrong. I found many places it had transforms and viewbox scaling, some in inches some in metric some in px etc which implies to me that you edited an existing svg to make this one and from my experience that almost never goes well.
So I tried remaking your svg as it is only 5 squares and 1 circle and it worked the first time.
you will have to assign the connections in the parts editor as they are not defined in the svg.
For each new part footprint you create not each new pcb you make. But most parts out there have an equivalent footprint available and in that case you would only be changing labels. Like recently someone was looking for an Atmega1284 tqfp which is not in Fritzing but if you search for tqfp you will find some other part with a different name. In that case you open the part you found in the editor, save as a new part and change all the names and labels but leave the SVGs as they are (with the possible exception of the schematic which you may want to change the labels in the SVG). This is the case with most footprints you will be looking for. In your case there are no easy to find SMD gul wing 4 pad parts existing so making your own SVG was the only solution.
I do not believe you did anything wrong simply that each time you edit an SVG it gets more transforms and if someone else made the SVG it could have had the wrong PPI so they then scaled it and then you edit it and use the correct PPI but their scaling now makes yours wrong etc.
@Troy1967 No problem we are here to help. When you know the SVG is clean or you created it yourself I think editing it is ok.
If you check the SVG i uploaded http://forum.fritzing.org/uploads/default/original/2X/9/95c85f93f54554dfb087e07e32e0a36f756cb0af.svg you will see each pad size is 1.7 by 2.2 which is mm so I do not believe you are correct that is always saves in px. The location is in px but not the size. If you start with a fresh SVG and have all the settings for the document set to mm the results are mm. If you start with an existing part it will be however the existing part was which I believe is one of the reasons they turn out wrong so often. I haven’t had issues since starting from scratch.
That could well be correct, I never have figured out exactly what it saves in. Many things are always px (I believe due to CSS) but you may well be correct it depends on something (and I don’t know what something is) for what it saves in. I have also discovered it appears to be impossible to remove transforms from polygons automatically. None of the suggested fixes on line appear to work. The only success I have had is delete the transform with xml editor then edit the points again using xml editor to change the polygon (or polyline in this case) back to where it should be. That said progress is occurring. The above polyline came about in fixing the parts factory to output a correctly scaled schematic for headers. The current one (which I hadn’t noticed before) is scaled at .75 rather than the correct 10.41667 for 1px = 1 thou as the rest of the files are. I expect that is because of the issue of changing the polyline (since schematic is the only one not done). I just downloaded QT and Visual Studio to produce a head version on Windows as I have fixes for the two main file related annoyances (the crash and parts editor not deleting its files even when you tell it to).
The only way to add to the core parts is to make a submission through Fritzings Part Repo on Github. Unless you are familiar with Github I would suggest for now you should just create your own parts and it will be in your “mine” parts bin for future use. You can also export those parts and upload them here to share with others looking for them.
If you are interested in learning how to submit a part to the core parts please read the following.
At present in general you can’t. The ones that appear to do that in inspector are actually each individual parts with code in the source (which you can sometimes fool to add your parts) that does the selection between the parts.