9V battery with 0.2 inch pcb footprint

Here is a clone of the standard 9V battery from Fritzing core, with a 0.2 inch spacing for the PCB footprint.

EDIT: Previous version replaced with a minor correction to property names and values, plus a new variant with much larger solder pads.

battery_9v_2_200mil.fzpz (993 Bytes)
battery_9v_2_200mil_large_pads.fzpz (1.5 KB)

The first is an extreme example of using existing core library files for the part view images in a part file. The fzpz (zip) file contains a fzp part definition, but no (zero) svg files. All of the layer image files are already in the core library, and are found there, instead of creating new copies for this part. The image difference between this and the core part, is the PCB layer, but that is still an image from core. Technically from the code. It is one of the ‘special’ image names that are generated by the application, instead of being loaded from a file.

The second version contains a custom pcb image, to get the larger pads.

@vanepp FritzingCheckPart can not completely process a part created like this. It complains about being unable to find and rename files, because they do not exist. It needs something like the optional --parts «library_path» run time parameter that fritzing uses. I think the easiest implementation, is to check for missing svg files at the start of processing, then copy (with appropriate svg.«viewname». prefix) to the working directory, if they can be found in the library path. Then they will be available for standard rename and processing.

EDIT2: The added large pad version was broken in pcb view. I discovered that the copper pads were only showing up on one side of the board. I fixed that, then discovered that DRC was not seeing the copper for the square pad as part of the connector. Fixed that too. Hopefully, these are stable now.

Adding a path to the parts repository is in the plan. That allows both this and checking family settings against parts already in the parts repo.