abse/smart-ring-flex
A tscircuit package created by abse.
- Version
- 0.0.24
- License
- unset
- Stars
- 0
src/contact-island.tsx
import {schematicFor} from './schematic-layout'
import SavedRouting from './saved-routing'
import copper from '../routing/contact-island-copper.json'
import {SM02B_SRSS_TB_LF__SN_} from '../imports/SM02B_SRSS_TB_LF__SN_'
import {BWCD_L3W2_0H1_0} from '../imports/BWCD_L3W2_0H1_0'
export const contactGeometry={length:21.6,width:9.4,radius:1.4,bendStart:7.1,bendEnd:7.1+Math.PI*1.4/2,bendCenter:7.1+Math.PI*1.4/4}
export default function ContactIsland({folded=false}:{folded?:boolean}={}){const g=contactGeometry;return <>
<net name="CONTACT_5V" isPowerNet/><net name="CONTACT_GND" isGroundNet/>
<SM02B_SRSS_TB_LF__SN_ name="J301" pcbX={5.5} pcbY={0} pcbRotation={-90} layer="top" schSheetName="ContactIsland" schX={-5} schY={2} {...schematicFor('J301')} connections={{pin1:'net.CONTACT_GND',pin2:'net.CONTACT_5V',pin3:'net.CONTACT_GND',pin4:'net.CONTACT_GND'}}/>
<BWCD_L3W2_0H1_0 name="PG301" pcbX={g.bendEnd+7.6} pcbY={0} layer="top" schSheetName="ContactIsland" schX={3} schY={3} schWidth={1.1} schHeight={1.0} {...schematicFor('PG301')} connections={{pin1:'net.CONTACT_5V'}}/>
<BWCD_L3W2_0H1_0 name="PG302" pcbX={g.bendEnd+10.6} pcbY={0} layer="top" schSheetName="ContactIsland" schX={3} schY={-2} schWidth={1.1} schHeight={1.0} {...schematicFor('PG302')} connections={{pin1:'net.CONTACT_GND'}}/>
<pcbstiffener name="CONTACT_SOCKET_BACKING" pcbX={3.45} width={6.3} height={8} thickness={.6} adhesiveThickness={.05} layer="bottom" material="fr4" shape="rect"/>
<pcbstiffener name="CONTACT_PIN_BACKING" pcbX={(g.bendEnd+.5+21.3)/2} width={21.3-(g.bendEnd+.5)} height={8} thickness={.6} adhesiveThickness={.05} layer="bottom" material="fr4" shape="rect"/>
<pcbbend name="CONTACT_RIGHT_ANGLE" x1={g.bendCenter} y1={-4.75} x2={g.bendCenter} y2={4.75} bendRadius={g.radius} bendAngle={folded?90:0} bendSide="right"/>
<silkscreentext text="1 GND / 2 +5V" pcbX={2.9} pcbY={3.9} fontSize={.35} layer="top"/>
<silkscreentext text="R1.4 FOLD" pcbX={g.bendCenter} pcbRotation={-90} fontSize={.35} layer="top"/>
<SavedRouting copper={copper as any} namePrefix="CONTACT"/>
</>}