shibosoftwaredev/f1c100s-linux-nema8-stepper-controller
Restores component part numbers and CAD models, removes test-point 3D bodies, and validates that solder paste exists only on top-side SMT pads without altering copper or DRC.
- Version
- 0.3.5
- License
- unset
- Stars
- 0
routing-boundary.ts
import { applyPartMetadata, applyCadMetadata, applyAssemblyPasteMetadata } from "./assembly-metadata"
/** Keep the reservation in the autorouter input, then remove the non-fabricated
* helper after routing and before copper generation / final DRC. */
export function routingKeepoutRef(keepout: any) {
if (!keepout) return
keepout.doInitialPcbCopperPourRender=()=>{
if (keepout.root && keepout.pcb_keepout_id)
keepout.root.db.pcb_keepout.delete(keepout.pcb_keepout_id)
}
}
/** Apply assembly metadata before the unmodified full DRC. */
export function routingBoundaryRef(board: any) {
// React 19 calls callback refs with null during cleanup.
if (!board?.doInitialPcbDesignRuleChecks) return
const check=board.doInitialPcbDesignRuleChecks.bind(board)
board.doInitialPcbDesignRuleChecks=()=>{ applyPartMetadata(board); check() }
const parts=board.doInitialPartsEngineRender.bind(board)
board.doInitialPartsEngineRender=()=>{ applyCadMetadata(board); applyAssemblyPasteMetadata(board); return parts() }
}
