seveibar/pd-dual-stepper-controller

Bottom-side PCB silkscreen artwork consisting of embedded mirrored TS Circuit SVG logos, with via-clearance-aware lower-board placement.

Version
0.1.0
License
unset
Stars
0

scripts/repro-orientation-metadata.tsx

import { Circuit } from 'tscircuit'
import { BSS84 } from '../imports/BSS84'
import { AO3400A } from '../imports/AO3400A'
for (const enabled of [false, true]) {
  const c = new Circuit({platform:{enablePartOrientationAnalysis:enabled}})
  c.add(<board width={20} height={10} routingDisabled>
    <BSS84 name="Q_PD_ENABLE" pcbX={-4} pcbY={0}/>
    <AO3400A name="Q_BUZZER" pcbX={4} pcbY={0}/>
  </board>)
  await c.renderUntilSettled()
  const j: any[]=c.getCircuitJson()
  console.log(JSON.stringify({enabled,parts:j.filter(e=>e.type==='pcb_component').map(e=>({name:j.find(s=>s.type==='source_component'&&s.source_component_id===e.source_component_id)?.name,rotation:e.rotation,pin1_location:e.pin1_location??null,supplierMap:e.supplier_pin1_location_map??null}))}))
}