Superimposing one board on another

I want a feature that allows you to import a graphic image of another PCB file into a layer in a current PCB new document - Its to verify alignment of holes and connectors for boards that stack on top of each other.

Ideally, the overlay graphic can be toggled on or off with a button, the image its self needs (obviosuly) to be rendered at the correct scale but with sufficient resolution so you can zoom in and check pin positions, and the image needs to me moveable so you can align it with your PCB design. It would also be great if it was linked to the source file so you can click an ‘update overlay’ button to grab the latest version of the board.

In the “other” project: Pcbnew / File / Plot / Plot format: .DXF
In the “current” project: Pcbnew / File / Import / Import Graphics.

There are no units in .DXF files, and by default export is in inches while import is in millimeters. You can select a layer while importing (for example Eco1.User), and then you can toggle visibility by just turning that layer on and off.

If an image (PNG, JPEG…etc) from any program is all you have, do this:

• You’re going to make a Footprint from the Image and load it into the PCB.

Example:

[PCB Image to be used is from Fritzing]

I’m not going to take the time to dial-in the exact/fractional dimensions and confirmations but, that’s easy to do.

  1. Assuming you have a good image (always best to have White or Transparent Image) (you can use Inkscape/others to remove background colors/opaqueness)

  2. In Kicad’s Main Panel, click the ‘Bitmap’ tool icon.
    Import your Image (does not need to be BMP, I used PNG)
    Set the DPI for the correct/desired scale. May take some trial/error but, you’ll see the relationships of the shown dimensions when changing DPI. Different programs use different DPI’s…)

Try the different “Picture” tabs and Drag the Black/White slider to fine-tune the graphic.

Export to PCBnew (creates a .mod file). You Now have a Footprint

  1. Place the new Footprint in desired PCB.

Confirm some Known Dimensions. If needing to scale it, redo the above. Generally, once getting it correct, the same DPI can be used for similar images from the same program…

The Example (Fritzing) Image contains Rulers just for Confirmaions. But, if you know the dims of some objects in the Image (including the Pitch of the Pads), you have the info needed. Best to strive for using Big distances so as to get better resolutions…

Example shows confirmations of ~50mm distance. Can use the measurement info at bottom of panel…

[EDIT] Added last screenshot showing a Kicad part (LM386) dropped into the image/footprint - dim’s are perfect!

Image Loaded Into BMP Tool

Footprint Loaded Into PCB

1 Like

I wonder if you could do this in GerberView. It would not allow you to tweak one if there is a misalignment but you should be able to see any issues.

I’m not sure how GerberView would handle the files from two or three boards, you would have to test.

I frequently overlay gerbers to verify things, and I do it with GEDA’s Gerbv. It’s more flexible on these matters than built-in GerberVIew, as (among many other features) allows to align and/or scale layers.

In responding to another post re drill files, I discovered that GBRview has a PCBnew Export that worked for drill files so, I came back to this post to say, "Yes! "

In GBRview, load different PCBnew files, then; File>Export_to_PCBnew

Then, open the newly created file in PCBnew and use it (can Move, change… all the stuff normally doing…)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.