matthewlai / JLCKicadTools

Tool for using JLCPCB assembly service with KiCad
GNU General Public License v3.0
346 stars 62 forks source link

components being grouped across different designators #19

Closed Shackmeister closed 4 years ago

Shackmeister commented 4 years ago

From how I see it, the tool should only try to group components if they are the same designator type (R1, R5, R10 etc) besides FP, value etc.

An NTC resistor with same value and FP as a normal resistor, gave me this warning: "Components R5, TH1 from same group have different LCSC part numbers: C25744, C92371" Is this a bug or by design?

matthewlai commented 4 years ago

That's actually how KiCad's netlist parsing script groups components: https://github.com/matthewlai/JLCKicadTools/blob/6e19b39dea3fa3014f29e1715333116c6c34c6ad/jlc_kicad_tools/jlc_lib/kicad_netlist_reader.py#L651 https://github.com/matthewlai/JLCKicadTools/blob/6e19b39dea3fa3014f29e1715333116c6c34c6ad/jlc_kicad_tools/jlc_lib/kicad_netlist_reader.py#L338

I agree it makes sense to also use refdes. Happy for you to change it if you have a moment for a PR.

Shackmeister commented 4 years ago

hmm currently it seems like by build uses the internal libraries for the Kicad modules. Would you know how to force it to use the ones in the repo?

matthewlai commented 4 years ago

Are you sure? The library is imported by path: https://github.com/matthewlai/JLCKicadTools/blob/6e19b39dea3fa3014f29e1715333116c6c34c6ad/jlc_kicad_tools/jlc_lib/generate_bom.py#L19

Though it's possible that if you installed with pip it may be using an installed copy. I would suggest uninstalling from pip, and just git clone the repo instead.

Shackmeister commented 4 years ago

Fixed in https://github.com/matthewlai/JLCKicadTools/pull/20