3D modeling and gEDA

Creating 3D models of PCB is good for checking how the assembly will fit together.

The Perl script is an electronic version of of a pick an place machine.

I have added the name of the 3D file to the schematic symbols along with the footprints. One important point is that the origin for the footprint and the 3D file must be the same.

The script creates an attribute file with the list of the reference designators and 3D file names using gnetlist. It also exports the xy locations file from PCB. The script also exports the gerber files from PCB for the plated drill holes.

So, after you combine the BOM, XY file, and CNC drill file you can create most of the 3D model. The other minor thing is the PCB size is parsed from the PCB file. It is just the work area size. It does not follow the outline layer in PCB.

Below is a compressed file of an example project and Perl script.

Just run the Perl file pcbto3d.pl in the folder with the .sch, .pcb and folder with 3d model files. It should create a OpenSCAD file called balance_sensors.scad.