-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JST SH generator script #127
Conversation
Thanks for working on this. I did a very quick look at it, but really not in detail. The output itself looks not bad. However:
Regarding code, to be honest I'm really not happy that you copied all the concepts/style of #98 🙈 It is so completely different to our other generators, I really don't like to have every generator using a very different style because it makes our life hard to maintain them all in the future. I'm not sure how we should proceed now regarding this topic...
Done. No comment about their response 😉
|
Thanks @ubruhin for having a look! 😄 I fixed/implemented
Could you provide more detail for this? I don't really see the resemblance to #98 at all anymore apart from some helper functions 🙈 I actually think it looks and works more like
Well I guess that's a no, which is bit disappointing but kind of expected... Thank you for trying anyways! 🤝 Let me know what you think of the changes if you find time! Output now looks like this: Edit: Fixed typo, check item no. 5 in list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI fails. Please run tests and linter locally and fix the issues they show.
@rnestler Thanks, we should be good now 👍 |
Awesome, thanks for all the updates! 🎉 I didn't review them yet in detail but I'll try to do so soon.
Yes the helper functions are one thing which I consider as difference to the other generators - in my opinion they actually decrease readability but I guess this is a personal taste 🙈 As a concrete example, honestly I see no reason why to factor out functions like Let me share my thoughts:
Please don't get me wrong - I don't want to be too strict and insist in changing all these things, generally I'm open for other opinions (also from other maintainers). |
That was fast 😃
Ah good you checked it as I was not completely sure - in this case I'm fine with it anyway 👍 Regarding the coordinate transformations I see your point and maybe it is indeed a valid case. Generally we don't follow datasheet coordinate systems because every manufacturer does it differently while we want a consistent system across all libraries. But so far probably we never had the case that two very similar footprints need to be generated with partially 180° rotated content. Let me think about it... Maybe we also get feedback from other maintainers in the mean time. Btw. a small side-note (still not done a detailed review): I was confused about the manufacturer name "J.S.T. Mfg. Co., Ltd." which did not look familiar for me so I did some research. It seems this company name is used on their website so it is for sure not wrong. However, in the end this is the name which ends up in the BOM so it is helpful to use the same/similar naming as suppliers use (to increase chances of correct automatic matching). Also for example the upcoming feature LibrePCB/LibrePCB#1313 relies on manufacturer name matching. Unfortunately manufacturer names are often not consistent and JST is not different:
Often I go with the naming of DigiKey because I think it is the de-facto standard and their data quality usually is very good. In this case, maybe just "JST" would be even better. But is seems "J.S.T. Mfg. Co., Ltd." is not used by suppliers so it might not match good with them. |
Okay! 👌
Yeah, I agree. I just copied it from the offical site, but to actually use the name used by large suppliers is definitely a better idea. I have never actually seen "J.S.T. Mfg. Co., Ltd." it in the wild 🙈 Regarding LibrePCB/LibrePCB#1313, if the system uses name matching, wouldn't it make sense to add all known manufacturer name variations to the part somehow to get the best chance of automatic matching? I have no clue how the system works underneath, so this is just an idea, but maybe this would be worth considering? Since we know manufacturer names are not consistent and we also know the different variations of the name. Kind of like aliases or "aka.", we have the most common variation used by suppliers as "main name" that gets displayed in the BOM but in the background we have these aliases/variations to help matching. |
Yes it makes sense to store manufacturer aliases, but not on client (i.e. application) side 🙂 The application sends the MPN + manufacturer name to the server and the server replies with the part information so the matching is done server side. Unfortunately these aliases are not available yet so the matching capability is limited. But for long therm this is the goal. Anyway, this is only one use-case. The most important use-case is exporting the BOM manually, and there the user expects the most common manufacturer name to be used to help finding the correct parts (for example, by CSV upload to a webshop). There aliases also don't help on our side since only one name can (and should) be listed in the BOM. |
Sorry for the long delay @nbes4 - the LibrePCB 1.1 release had priority... 🙈 I reviewed the changes and the output looks really good! I think these are the last small things which should be done:
|
@ubruhin All good. I totally understand this, congratulations on the 1.1 release! 🎉 Thank you for your feedback and the review, I'll adjust the PR accordingly in the upcoming days 👍 |
@ubruhin I implemented your first two points and changed the category to "Pin Header (Male)". I originally put them in the "Direct Wire to Board Connector" since it's marketed that way on DigiKey (without the direct though)
but I agree, at the end of the day they are pin headers. However, I am unsure on how to add an attribute to a
Will do once I implemented all of your feedback. 👍 |
3863a40
to
9a4a0ed
Compare
I apologize, I had to rebase and force-push this branch since I messed something up in my git config. Should not affect anything though. Please delete your local copy of this branch (if you have one) and pull it again. Thanks |
Yes I know, but the direct is exactly the thing which makes a big difference 😉 A direct w2b connector is not really a connector but a fixed connection which cannot be plugged off anymore -- thus a separate category for this very special kind of connection.
Oh indeed, seems even attributes in general are not implemented in the generator yet 🙁 Hmm in that case I'd be OK to either add the additional MPNs without attributes (preferred) or even ignore them for now... Up to you.
No problem, I'm okay with rebasing anyway. |
@ubruhin Thanks for the clarification on the W2B connectors - never really paid too much attention to the subtle details! 😅
I'll ignore them for this PR, but I opened up another PR for the missing |
Awesome! 😃 So then I'm looking forward for the PR in the JST library. I triggered CI on this PR again because there was a temporary failure on the last run, now it succeeded. |
This PR adds a generator script for JST SH type connectors.
For more info about the connector and its variants, please see the official datasheet
The generator script generates packages and devices according to the specs and names in the datasheet. The generated devices consist of the generated packages which are linked to PINHEADER components (from the LibrePCB Connectors library).
The output of the generator script generally looks like this:
3D/Silkscreen View (no models yet):
The naming of the packages (e.g. JST SH-BM-05) was based on the package from the Molex LibrePCB library (Molex 53261-06) but I am not sure if this is inline with the naming conventions mentioned in this post on the LibrePCB forum.
For the device and package category I chose "Direct Wire to Board connector" although the Molex library uses "Pin Headers (Male)" (devcat) and "Molex" (pkgcat) so I'm not sure which one to choose for the JST pkg/dev. Maybe someone could clarify? 😉
Furthermore, I placed a "pad one marking" (silkscreen dot) next to the pads that are defined as "circuit no. 1" in the datasheets. Is this common practice or are there other ways of identifying the no. 1 pad? For example by making the pad corners have a radius of 0 while all others have a radius of 0.5? And speaking of silkscreen, some silkscreen markings extend over the courtyard, is that ok?
Possible improvements (from the top of my head):
Regarding the 3D Models, maybe JST could provide some of them since I saw a "Request 3D Models" button on a webpage of theirs:
@ubruhin maybe you could shoot them an E-Mail as the main dev and explain why and what we'd use them for! 😄
I apologize for any oversights or convention violations, still new around here!
Any feedback/criticism is welcome!
Credits:
Some code is based on the PR from @ollelogdahl which provided a very good starting point for this PR 👍
Edit: Fixed typos