12. Import a board from Gerber files
Goal: a simulation model from the manufacturing files of a board: substrate in the board shape, the copper of each layer, vias and holes, all on a stackup whose variables drive the geometry. This section reads back the files written in section 6; files from KiCad, Altium or Eagle work the same way. The reference of the import is PCB_IMPORT.md.
- Write the files of
examples/GerberTestBoard.hznas in section 6 into a folder. - File > New, 3D FEM, units mm, Create.
- File > Import PCB (Gerber, Excellon)... (also Import PCB on the ribbon). Press Add folder... and choose the folder. A zip archive or single files work too.
- The table says what each file is and how it was found (Found by: X2 attribute, job file, file name). Here the two copper layers and the outline come from their X2 attributes, the two drill files are Excellon, and the export report is Other (not loaded). Change an entry with its drop-down list if a file was recognised wrongly.
- Stackup: without a job file (
.gbrjob) Hertzon assumes a usual 2-layer board of 1.6 mm and says so. Edit stackup... opens the stackup editor: set the core thickness, εr and tan δ of your board and choose for each copper layer whether it is a sheet with finite conductivity (thin conductor) or solid copper. - The preview shows the selected file; Shift + drag limits the import to a part of the board. What will be made lists the result before anything is built.
- Press Import.
Import PCB with the files of the test board: two copper layers, the outline and two drill files, the stackup
assumed (no job file), and the list of what will be made.
The design now holds the substrate Sub_Core_1_2 in the board shape (the slot, the mounting hole and the via
cut out), 8 copper shapes on L1 Top and the ground plane on L2 Bottom (groups PCB L1 Top, PCB L2
Bottom), the via as a copper cylinder (PCB Vias) and the boundaries Cu_L1_Top and Cu_L2_Bottom.
The stackup writes the variables stk_Core_1_2_t, stk_L1_Top_zs, stk_total and so on, read-only in
Design Properties: change a thickness in Modeler > PCB Stackup... and every object moves with it.
What is not simulated (solder mask, silkscreen, paste) is not loaded, and the import report names it. Import again to replace the earlier import. Then add ports, a region and a setup as in the sections above.