Connector

@Seve
21 Replies
Abse
AbseOP4w ago
GitHub
Implement the <connector standard="usb_c" /> flow · Issue #748 ...
Lots of steps, many PRs Implement Connector.ts in tscircuit/core Implement the relevant API inside the parts engine to retrieve USB connectors https://github.com/tscircuit/parts-engine Make sure th...
Abse
AbseOP4w ago
I want to work on this with @Anas
Seve
Seve4w ago
okey doke
Abse
AbseOP4w ago
should we make the standard prop enum with only tested connectors in it > ?
Anas
Anas4w ago
What kind of connectors do we have to start with?
Seve
Seve4w ago
you can focus on just USB_C CC @Rishabh IIUC they'll also need async footprint loading, that alone is pretty tricky.
Abse
AbseOP4w ago
how can we do this ?
Seve
Seve4w ago
The autorouter and parts engine inside core both use async effects. Basically you want to pause rendering until you’ve found the requested part and footprint. You’ll probably need to introduce a new render stage Its not that complex it just requires understanding the pipeline a bit
Abse
AbseOP4w ago
what should we take from ] jlcpcb everything like pin labels , footprint,3d or just footprint
Seve
Seve4w ago
Everything yea You also have to ensure that the standard pins are always provided Otherwise its not viable The parts engine should handle some of that
Abse
AbseOP4w ago
where is the api that return the components from jlcpcb ?
Seve
Seve4w ago
The parts engine uses jlcsearch.tscircuit.com
Seve
Seve4w ago
GitHub
GitHub - tscircuit/parts-engine: The tscircuit platform parts engine
The tscircuit platform parts engine. Contribute to tscircuit/parts-engine development by creating an account on GitHub.
Abse
AbseOP4w ago
@Seve can't we just use the easyeda-converter in core for fetching the footprint ?
No description
Seve
Seve4w ago
No core isnt allowed to have any third party integrations The parts engine is allowed to
Abse
AbseOP4w ago
kk
Seve
Seve4w ago
You may need to somehow get jlcsearch to return footprint information and/or cache it appropriately If easyeda goes down we dont want circuits to fail, so we may need a long cache. But if you implement something clean in the parts engine this should be nbd Eg i think with the easyeda converter you can swap the api url to api.tscircuit.com which can cache stuff
Abse
AbseOP4w ago
we will make the connector a chip like component and get the footprint , cadmodel , pinlabels etc from the parts-engine is this right ?
No description
Seve
Seve4w ago
Sort of. Keep in mind the bigger picture. If a user uses <connector standard="usb_c" />, then they should always, 100% of the time, be expecting the same pin labels and the same schematic representation. That should never change, there should never be new or unexpected pin labels. However, the footprint might change depending on what the parts engine returns. That's what makes the connector useful but also difficult to implement
Abse
AbseOP3w ago
should we hard code that pinlabels and parse them for eg: GND1 = A1/B1
Seve
Seve3w ago
Yea basically, you should use the most standardabels for usb. And yea you can hard code those into core for the standard

Did you find this page helpful?