abse/smart-ring-flex
A tscircuit package created by abse.
- Version
- 0.0.24
- License
- unset
- Stars
- 0
src/integral-charge-extension.tsx
import {schematicFor} from './schematic-layout'
import {internalContact as g} from './internal-contact-geometry'
// Local review candidate. Neutral radius1.61mm gives1.55mm nominalinnerR for0.12mmflex.
// Legacy outline constants remain only for non-active historical entries; wiredDock uses exact developedoutline.
export const ext={x:-5.480622272325182,width:3,radius:1.21,start:-4.3,arc:Math.PI*1.21,faceLength:6.4}
export const endY=ext.start-ext.arc-ext.faceLength
export default function Extension({folded=false}:{folded?:boolean}) {return <>
{(['PAD_CHARGE_POS','PAD_CHARGE_GND'] as const).map(name=><chip key={name} name={name} doNotPlace pinAttributes={{pin1:{isPassive:true}}} pcbX={g.pads[name][0]} pcbY={g.pads[name][1]} layer="top" {...schematicFor(name)} pinLabels={{pin1:[name==='PAD_CHARGE_POS'?'POS':'GND']}} footprint={<footprint><smtpad portHints={['pin1']} radius={1.04} shape="circle" noSolderPaste/></footprint>} connections={{pin1:name==='PAD_CHARGE_POS'?'net.DOCK_5V':'net.GND'}}/>)}
{g.bends.map(b=><pcbbend key={b.name} name={b.name} x1={b.start[0]} y1={b.start[1]} x2={b.end[0]} y2={b.end[1]} bendRadius={b.radiusMm} bendAngle={folded?b.angleDeg:0} bendSide={b.side}/>)}
{g.keepoutTiles.map(b=><keepout key={'KO_'+b.name} name={'KO_'+b.name} shape="rect" pcbX={b.x} pcbY={b.y} width={b.w} height={b.h} layers={['top','bottom']} allowTraces/>)}
<silkscreentext text="+" pcbX={g.pads.PAD_CHARGE_POS[0]+.1} pcbY={g.pads.PAD_CHARGE_POS[1]-1.15} fontSize={.35} layer="top"/>
<silkscreentext text="G" pcbX={g.pads.PAD_CHARGE_GND[0]-.1} pcbY={g.pads.PAD_CHARGE_GND[1]+1.15} fontSize={.3} layer="top"/>
</>}