-
Notifications
You must be signed in to change notification settings - Fork 13
/
KeyswitchSocket.tsx
56 lines (55 loc) · 1.49 KB
/
KeyswitchSocket.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import "@tscircuit/core"
/**
* A switch shaft you can use to connect a pluggable Kailh socket.
*
* Datasheet: https://wmsc.lcsc.com/wmsc/upload/file/pdf/v2/lcsc/2211090930_Kailh-CPG151101S11-1_C5184526.pdf
*/
export const KeyswitchSocket = (props: {
name: string
pcbX?: number
pcbY?: number
layer?: "top" | "bottom"
}) => (
<chip
{...props}
pcbRotation={0}
cadModel={{
objUrl: `https://modelcdn.tscircuit.com/easyeda_models/download?pn=C5184526`,
}}
supplierPartNumbers={{
jlcpcb: ["C5184526"],
}}
footprint={
<footprint>
{/* <silkscreentext text={props.name} /> */}
<smtpad
shape="rect"
width="2.55mm"
height="2.5mm"
portHints={["pin1"]}
layer="top"
/>
<smtpad
shape="rect"
width="2.55mm"
height="2.5mm"
portHints={["pin2"]}
layer="top"
/>
<hole name="H1" diameter="3mm" />
<hole name="H2" diameter="3mm" />
<constraint xDist="6.35mm" centerToCenter left=".H1" right=".H2" />
<constraint yDist="2.54mm" centerToCenter top=".H1" bottom=".H2" />
<constraint edgeToEdge xDist="11.3mm" left=".pin1" right=".pin2" />
<constraint sameY for={[".pin1", ".H1"]} />
<constraint sameY for={[".pin2", ".H2"]} />
<constraint
edgeToEdge
xDist={(11.3 - 6.35 - 3) / 2}
left=".pin1"
right=".H1"
/>
</footprint>
}
/>
)