yaqwsx / KiKit

Automation tools for KiCAD
https://yaqwsx.github.io/KiKit
MIT License
1.55k stars 201 forks source link

JLCPCB fabrication settings are slightly different than JLC's instructions #650

Open arxwtf opened 8 months ago

arxwtf commented 8 months ago

Prerequisites

KiKit version

1.5.0

KiCAD version

8.0.0.

Operating system

macOS Sonoma 14.1.2

Description

Looking through the fab settings for JLCPCB in export.py and comparing them with JLCPCB instructions, I see these two points:

help2 help3

Thank you for all your hard work!

Steps to Reproduce

markh-de commented 8 months ago

Regarding your points:

"MergeNPTH" is True, but should be False - JLC prefers separate drill files for PTH and NPTH

They haven't checked the PTH/NPTH merge option in their screenshots, but I know from experience that they can handle merged drill files very well. I would not worry too much. However, yes, it may be better to follow their guidelines here, because if something goes wrong you don't want to be blamed for ignoring their rules. :wink:

"UseAuxOrigin" is True - is this the opposite of "Drill Origin: Absolute" in Kicad's "Generate Drill Files" settings? And is this the same as choosing "Use drill/place file origin" in Kicad's gerber Plot settings? (see attached screenshots). If so, it should be False.

No need to worry either. The important thing is that you use the same setting for plot and drill files. When plotting via KiCad, the GUI kind of forces you to use the same setting for plots and drill files (the checkboxes of both dialogs are kept in sync - you would have to switch settings between exporting plot and drill files to mess it up).

I think what JLC really wanted to say is: Use the same setting for plots and drills. It doesn't make much sense to use absolute values, because this only moves your panel to an arbitrary point in the X/Y-space. I think it makes much sense to use the aux origin, which is moved by KiKit to one of the panel's corners (top left by default).

Pro Tip: :wink: If you want to diff your own plot files with JLC's production files (which I highly recommend!), you should really use bl (bottom left) as the panel plot/drill origin (as they do it). JSON settings:

{
    "post": {
        "origin": "bl"
    }
}

drill map file is generated as .pdf, set by line drlwriter.SetMapFileFormat(PLOT_FORMAT_PDF). From JLC's screenshots, it seems they prefer Gerber X2 format for drill map file. I'm not sure if this matters, though.

I think they stated (somewhere?) that drill maps are not required anyway. So they won't care about the format.

arxwtf commented 8 months ago

I think what JLC really wanted to say is: Use the same setting for plots and drills. It doesn't make much sense to use absolute values, because this only moves your panel to an arbitrary point in the X/Y-space. I think it makes much sense to use the aux origin, which is moved by KiKit to one of the panel's corners (top left by default).

This makes sense, thank you for the explanation!

Pro Tip: 😉 If you want to diff your own plot files with JLC's production files (which I highly recommend!), you should really use bl (bottom left) as the panel plot/drill origin (as they do it). JSON settings:

{
    "post": {
        "origin": "bl"
    }
}

Oh, nice, thank you for this advice! But where do I put these JSON settings?

I think they stated (somewhere?) that drill maps are not required anyway. So they won't care about the format.

The JLCPCB instructions state this:

Generate Drill Map File This is optional, but suggested. This can be done in the same dialog for drill files. Just check Gerber for "Map File Format", then click Generate Map File button at bottom right of the dialog. This drill map file provides additional information for drill holes, it is for human reading, it indicates which holes are plated and which are not, it also indicates total slotted holes. More information, less probability of error.

So yes, it's not required, but since it's recommended and "doesn't cost anything", I would include them. I guess they want it in Gerber format so that they can opet it in some kind of gerber viewer together with drill file and compare hole sizes visually. Just guessing, tho.