cpl module#

The pick-and-place file (CPL) JLCPCB’s placement machines read.

MIN_SPACING = 0.2#

JLCPCB requires at least this much between two different designators, in millimetres, and reports closer pairs as a repeated designator.

write(path, parts)[source]#

Write the CPL: millimetres, counter-clockwise degrees, both sides.

Coordinates are the design origin unchanged, which is what the gerber image uses; JLCPCB aligns the two against each other, so what matters is that they agree rather than where the origin is.

Return type:

None

Parameters:
check_spacing(parts)[source]#

Warn about designators closer together than JLCPCB allows.

A warning rather than an error: their rule does not say whether it applies across sides, and two parts at the same position on opposite sides is a normal design (a decoupling capacitor mirrored under a package).

Return type:

None

Parameters:

parts (list[Part])