Placement Panelization of CSV File Using Python

We had a situation where we needed to panelize a PCB, but we did not have panelized placement data for the components of this PCB. So, imagine we took a PCB and made a 2×2 array of that board. We need to clone the original placement data and copy it with the offset to match the 3 new boards that are added to each panel.

See code at Github: https://github.com/brandondrury/PlacementReplication

Problem
We had a PCB that required panelization but we didn’t have the component placement data to match the required panelization.

Solution
This Python script allows us to clone placement data with an offset to match the placement requirements of a 2×2 array.

Note: This was a very specific case. The fields were setup for a specific standard of placement data. I expect I’ll need something similar in the future, but with differing fields. This script was created for one, specific case with a time budget of precisely 0 seconds and was not necessarily created to handle any other use cases.

Most likely, it will need to be significantly altered for future use.

Use

  • Copy the csv file that requires manipulation into the same directory as this PlacementReplication001.py script
  • Run the script. I use Sublime Text (Control + B) for this, but you could use command line or probably IDLE.
  • Panelized_Placement.csv will be generated in the same directory.