Is there a way to use an image, such as a jpg, as a “stencil” to model my PCB outlines around?
I need to make a PCB to fix in an existing enclosure, and I need the non-plated mounting holes to line up perfectly, and the only way I can get it done perfectly is to scan the original mounting plate.
Out of the scematic editor press F8 to update PCB from scematic. Alternatively click Tools/Open PCB Editor or click the icon in the top toolbar. In Pcbnew click File/Import/Import Graphics. Select your outline.dxf and import it to dwgs.user. That’s it.
Here’s a simple approach without using any extra tools…
Know One distance to use for the scaling (Scale Factor).
Click the Bitmap Converter tool (Icon with letter ‘a’ in toolbar.
Load your jpeg into it.
Use the resolution slider to get a reasonable presentation of an area with the One known dimension.
Export for PCB (it creates a .mod file (it’s a Footprint). Save it to location where your footprints are located.
Open your PCB file and place the new footprint.
Use the Measure tool to measure distances of the Known item.
Most likely, it will not be correct and needs scaling.
Let’s say the measured distance is smaller than the Actual distance. Therefore, Scale Factor is Actual/Measured
Now, draw your items at positions using the scaling.
Using a Pickguard I made for my D’Angelico guitar with a Known distance from Screw1 to Screw2 (dist = 147mm). Image 1
Note: I did not fuss to change grid so, I only placed close enough for this example…)
• Loaded the jpg photo into Bitmap Converter
• Set to Black & White and resolution slider to see the Two Screws
• Exported for PCB on F_Silk_Layer
• Placed the exported Footprint (image 2)
• Used Measure Tool to measure dist between screws.
It measured 131.4
Since actual is 147, ScaleFactor = 147/131.4 = 1.11
•I placed a hole on edgecut layer at 147 and any other items for image3
placement use their Measure_Tool dist multiplied by the Scale Factor.