The use of this software subjects you to our Terms Of Use
bom-cpl-plugin.py
in your KiCad working directory.It is necessary for the operation to add 4 additional custom fields in Eeschema, which are:
Manufacturer
PartNumber
Supplier
SupplierRef
The required field Supplier
must be set to one of the predefined supplier (LCSC or JLCPcb for example) or any other supplier name case insensitive.
The required field SupplierRef
can be replaced by other custom fields such as: LCSCRef
or JLCPcbRef
in order to make possible the referencing of several suppliers on a Eeschema component.
In this case, changing the value of the Supplier
field will allow you to switch to the correct supplier reference automatically.
Two additional fields can be add to an Eeschema componant, witch are:
Quantity
Rotation
The optional Quantity
field allow to manage the quantities in Eeschema.
In the absence of this field, the default quantity is 1.
If value is set to 0 or is invalid, the component will not be integrated to any BOM file…
The optional Rotation
field allow to correct rotation, if needed when generating the CPL file…
If necessary, a grouping is carried out on the quantities, making it possible to generate a single row for identical components in the BOM file.
If you know a little Python, the grouping and the order of the components in the BOM files is fully configurable …
When launching the plugin (in Eeschema BOM) it will create as many BOM files as there are different Supplier
encountered.
In order to generate a BOM file for several pieces, it is possible to add a quantity argument at the end of the plugin command line (ie: "bom-cpl-plugin.py" "%I" "%O" 100
for 100 pieces).
If the supplier is not configured for regrouping, or without this argument or with an invalid value, a default quantity of 1 will be used.
It also creates the CPL file for JLCPcb from one of the position files found in the working directory (ie: your_project-all-pos.csv
, your_project-top-pos.csv
, your_project-bottom-pos.csv
).
A correction on the rotations will be made according to the Rotation
field of each component.
This plugin has been configured to work with LCSC, JLCPcb and also with many other suppliers …
CSV BOM file columns:
CSV BOM componants are grouped by same PartNumber and SupplierRef
CSV BOM componants are order by: Manufacturer, PartNumber
No CPL file will be generated.
CSV BOM file columns:
No CSV grouping is performed, in the absence of a BOM Quantity column
CSV BOM componants are order by: SupplierRef
CPL file will be generated if a position file can be found.
This configuration applies to all other suppliers (other than LCSC, JLCPcb)
CSV BOM file columns:
CSV BOM componants are grouped by same PartNumber and SupplierRef
CSV BOM componants are order by: Manufacturer, PartNumber
No CPL file will be generated.
In case of problem, :-(
I encourage you to create an issue
I will try to solve it :-)