Separate Packages or just different Footprints

Hey I’ve got a question regarding package/footprint. The JST SH connector I am trying to add has different variants (2 pin, 3 pin, …, 20 pin) and each different variant has 2 mounting options, sideways and bottom. (See image below)

Now the physical connector for the 2 mounting options is essentially the same the only real difference is where the solder leads exit the connector. It is not entirely clear to me if this case falls under “different mounting options of a package” so that I should use 2 different footprints for the same package or if I should create two separate packages with 1 footprint respectively.

I would argue that the latter makes more sense (please correct me if I’m wrong though).

Example (JST SH 4 Pin Connector):

Packages:
JST SH 4 Pin Connector Side Entry (1 Footprint named ‘default’)
JST SH 4 Pin Connector Top Entry (1 Footprint named ‘default’)

Devices:
SM04B-SRSS-TB (using first package)
BM04B-SRSS-TB (using second package)

Also, is the naming of these things alright? My goal is to contribute these parts to the JST library in the future :+1:

Hi,
these are clearly two different packages, not just two footprints. You cannot assembly the side entry package on a top entry footprint and vice versa.

The naming looks good, but we recommend using IPC naming (uppercase, no spaces) for the package name. Note that since this package is available in different pin counts, it should be generated with our generator if you intend to contribute them to our libraries - and actually there’s even already a pull request open for JST SH (JST Connector generator by ollelogdahl · Pull Request #98 · LibrePCB/librepcb-parts-generator · GitHub), but unfortunately it’s not ready for inclusion yet. Maybe I can work on that :thinking:

You cannot assembly the side entry package on a top entry footprint and vice versa.

Thanks for the reply! That cleared things up

Note that since this package is available in different pin counts, it should be generated with our generator if you intend to contribute them to our libraries - and actually there’s even already a pull request open for JST SH

Yes, I am currently in the process of writing a generator script, or to be more precise, continue, update and polish the work done by the original PR creator (ollelogdahl). I’m planning to open a new PR soon :slight_smile:
(I commented on his PR but unfortunately there hasn’t been a response yet).

Ah, nice! Sorry for not commenting the PR yet - actually I started to review it but it turned out there are way too many things to be corrected:

  • Violating various rules of our library conventions (even fundamental things like having (0, 0) in the center of the package).
  • Needs to be updated to file format 1.0, including package outline polygons, part numbers etc.
  • Not mandatory, but it would be a huge bonus if 3D models are generated as well (nothing fancy, just simple models) - if JST provides nice & small (in file size) models, I could ask JST to release them under the CC0 license (unlikely, but asking costs only a mail :wink:)
  • The Python code itself looks very unfinished (incomplete functions, flake8 errors, …) and inconsistent with the concepts of all the other generator scripts. For us it would be highly preferred to have similar concepts for all the generators to reduce maintenance effort.

Due to these things, I’d actually highly recommend not using this PR as a starting point for a new PR. I’d recommend starting a new script based on one of the scripts contained in the master branch instead.

Ah, nice! Sorry for not commenting the PR yet

No worries at all! :+1:

actually I started to review it but it turned out there are way too many things to be corrected:

Yes, the code in his PR provided an excellent starting point for me to get development started (since it did what I needed) but in the end I had to heavily modify the code and started orienting it on one of the other scripts (as you pointed out) in order to correct and update things and comply with the conventions :+1:

if JST provides nice & small (in file size) models, I could ask JST to release them under the CC0 license (unlikely, but asking costs only a mail :wink:)

Let me know if you find time for this, official models would be great! Otherwise we’ll resort to CadQuery

For now, I plan to create the PR without 3D Models in the upcoming weeks (might add them when I find the time) :wink:

1 Like