I've developed a free open source tool to make life easier from exporting pick&place data to getting boards fabricated. Here's an excerpt from the description:
PnPPP - Pick & Place Pre-Processor
PnPPP is a tool for automatically converting PCB assembly files to the format required by your fab or machine, automatically rotate parts to the correct orientation and duplicate pick-and-place data with new positions for the purpose of panelization. All required meta data can be maintained directly within the CAD project. The tool was developed to process output files from Altium CircuitStudio for use with JLCPCB's self-service PCBA interface, but it can be configured flexibly and potentially be used with other CAD programs and different fabs.
Features
- Parse and re-generate BOM (bill of materials) and PNP (pick and place) files in CSV format
- Continuously scan sub directories of a given file path for changes and automatically process changed files
- Auto-rotation: further rotate parts in pick-and-place file based on per-component setting in the BOM file
- Panelization: duplicate pick-and-place information with adjusted coordinates to generate PCB panels from a single board
- Rename, re-order and delete columns in BOM and PNP files
- Remove extra lines not conforming with the CSV format (what were you thinking, Altium?)
- Move output files to alternate destination path
- All meta data (for auto-rotation, panelization etc.) can be managed from within the CAD project
- Input and output format customizable through a JSON config file (needed only once, not per project)
Auto-Rotation
I frequently ran into the problem that orientation of a part in my library was different than what the fab expected. As a result, the rotation of the part was wrong in the fab's preview. There were two ways to fix this: either rotating the graphics in the footprint (which breaks the design) or manually editing the generated pick-and-place file (tedious, error-prone and needed to be done again everytime the files were re-exported).
PnPPP solves this problem once and for all: it automatically rotates components as needed and generates a modified pick-and-place file in the format the fab expects. In order to do this, PnPPP first needs to know which components need to be rotated and by what offset. Other tools rely on seperate files cotaining that information... however, from a logical point of view, this information is associated with the definition of a component, so I found it more logical to manage it where the component is defined: in the schematic library itself. To achieve this, I am using a custom parameter named JlcRotation on every schematic symbol that needs rotation. This parameter is automatically added by PnPPP to the rotation of all instances of the respective component.
Note that Rotation is a mandatory per-instance parameter (i.e. it can be different for each instance of a component on the PCB), while JlcRotation is an optional per-symbol parameter (i.e. it is set only once per each schematic symbol and applied to all instances of the part). CircuitStudio does not let users configure which fields to export as part of a pick-and-place file, therefore PnPPP pulls this information out of the BOM and then applies it on the pick-and-place data.
So whenever you find the rotation of a part to be incorrect, you can simply open the schematic symbol in your library, add a JlcRotation parameter, and let PnPPP do the work. From then on, whenever you use the Generate outputs feature, PnPPP will know what to do and automatically fix your pick-and-place files, in your current project as well as in all future projects until the end of days.
By the way: you don't have to use the name JlcRotation for the parameter. You can configure a custom parameter name in config.json so your library could even contain different rotation offsets for different fabs.
Panelization
The optional panelization feature in PnPPP enables you to automatically generate BOM and pick-and-place files for 1- or 2-dimensional PCB panels. If using this feature, PnPPP automatically duplicates all components multiple times and adjusts the position of the copies to accomodate for a panel with multiple instances of the same PCB. The meta-data required can be edited conveniently within your schematic file.
This feature is useful if you want to manually panelize a PCB. While CircuitStudio supports embedded board arrays (which allows you to generate gerbers for a panel), CircuitStudio can still only export BOM and pick-and-place files for a single PCB and not the whole panel. This is where PnPPP comes in: it takes the files for a single PCB as an input and outputs files for the panel.
In order to use this feature, PnPPP requires 6 values: the number of columns and rows, the x and y offset of the bottom-leftmost PCB within the panel and the x and y spacing between boards. Since it makes a lot of sense to maintain this information within the CAD project instead of an external configuration file, PnPPP retrieves this information from a single special item within the BOM, named PnPPP_Panel. It is recommended that you create a schematic symbol with the default designator PnPPP_Panel and the type Mechanical (which puts the item in the BOM but not on the PCB). You can then place this symbol in your schematic file and set its Comment to the comma-seperated 6 values.
Check it out!
See repository for more info: https://github.com/pastaclub/PnPPPAnd please let me know what you think!