hrithik18k/punck-tscircuit-recreation
A four-layer Eurorack drum/sampler controller PCB built around an STM32H743, dual QSPI flash, PCM5100 stereo DAC, TL074 analog audio circuitry, input clamps, 12V-to-3.3V power regulation, MIDI/USB/SWD connectors, controls, LEDs, and trigger/audio I/O.
- Version
- 1.0.3
- License
- unset
- Stars
- 0
native/ExactFootprint.tsx
// Only physical pad/hole/silkscreen primitives. No imported copper routing.
export function ExactFootprint({part}:{part:any}) {
return <footprint originalLayer={part.layer}>{part.footprint.map((e:any,i:number)=>{
const p:any={pcbX:e.x,pcbY:e.y,layer:e.layer,portHints:e.port_hints}
if(e.type==='pcb_smtpad')return <smtpad key={i} {...p} shape={e.shape} width={e.width} height={e.height} radius={e.radius} cornerRadius={e.corner_radius} points={e.points} ccwRotation={e.ccw_rotation}/>
if(e.type==='pcb_hole')return <hole key={i} {...p} diameter={e.hole_diameter}/>
if(e.type==='pcb_plated_hole')return <platedhole key={i} {...p}
shape={e.shape==='rotated_pill_hole_with_rect_pad'?'pill_hole_with_rect_pad':e.shape}
pcbRotation={e.ccw_rotation??e.rect_ccw_rotation??0}
holeDiameter={e.hole_diameter} outerDiameter={e.outer_diameter}
holeWidth={e.hole_width} holeHeight={e.hole_height} outerWidth={e.outer_width} outerHeight={e.outer_height}
rectPadWidth={e.rect_pad_width} rectPadHeight={e.rect_pad_height} holeOffsetX={e.hole_offset_x} holeOffsetY={e.hole_offset_y}/>
if(e.type==='pcb_silkscreen_path')return <silkscreenpath key={i} layer={e.layer} route={e.route} strokeWidth={e.stroke_width}/>
if(e.type==='pcb_silkscreen_circle')return <silkscreencircle key={i} layer={e.layer} pcbX={e.center.x} pcbY={e.center.y} radius={e.radius} strokeWidth={e.stroke_width}/>
return null
})}</footprint>
}