/** * PCB constraint validation rules. * * Implements production constraint checks that operate on {@link PcbConstraintInput} * and produce structured {@link PcbConstraintIssue}s. * * Rules: * 1. Missing board outline (error) * 2. Board outline too small (warning) * 3. Missing layer stackup (warning) * 4. Layer count mismatch between intent and board (error) * 5. Missing mounting holes (warning) * 6. Missing net classes (warning) * 7. Invalid clearance / creepage (error) * 8. Keepout area violations (error) * 9. Missing placement zones (warning) * 10. Missing manufacturing constraints (warning) * 11. Fiducials recommended for SMT (warning) * 12. High-voltage creepage/clearance (error) * 13. Missing drill file (error) * 14. Copper-to-edge clearance violations (error) * 15. Drill/annular-ring manufacturing risk (warning) * 16. Soldermask sliver risk (warning) * 17. Silkscreen over exposed pads (warning) * 18. Tooling holes for assembly/panel fixtures (warning) * 19. Polarity/orientation marks (warning) * 20. Component spacing/courtyard violations (warning) * 21. Critical-net testpoint coverage (warning) * 22. Programming/debug header access (error) * 23. Fabrication notes completeness (warning) * * @module */ import type { PcbConstraintInput, PcbConstraintResult } from './types.js'; /** * Run all PCB constraint validation rules against board data. * * Orchestrates 23 rules: * 1. Missing outline — error if board outline is not defined * 2. Outline too small — warning if dimensions are below 5mm * 3. Missing stackup — warning if no detailed layer stack * 4. Layer count mismatch — error if >2 layers without stackup * 5. Missing mounting holes — warning if zero mounting holes * 6. Missing net classes — warning if no routing rules * 7. Invalid clearance — warning if net classes but no clearance rules * 8. Keepout violations — warning if zones but no keepouts * 9. Missing placement zones — warning if multi-layer without zones * 10. Missing mfg constraints — warning if process/quantity unspecified * 11. Fiducials recommended — warning if SMT board without fiducials * 12. High-voltage clearance — error if HV domain without proper clearance * 13. Drill file — error if NC drill file is missing * 14. Copper edge clearance — error if copper is too close to board edge * 15. Drill/annular ring — warning if process dimensions are risky * 16. Soldermask sliver — warning if soldermask web is too small * 17. Silkscreen over pad — warning if silkscreen overlaps exposed pads * 18. Tooling holes — warning if assembly tooling holes are missing * 19. Polarity marks — warning if orientation-sensitive parts lack marks * 20. Component spacing — warning if courtyard/spacing violations exist * 21. Testpoint coverage — warning if critical nets lack test access * 22. Programming header — error if required debug/programming access is missing * 23. Fabrication notes — warning if handoff notes are missing */ export declare function validatePcbConstraints(input: PcbConstraintInput): PcbConstraintResult; /** * Build a human-readable constraint report explaining which constraints * were applied and which require manual review. */ export declare function buildConstraintReport(input: PcbConstraintInput, result: PcbConstraintResult): import('./types.js').ConstraintReport; /** * Create PcbConstraintInput from a CircuitIR PCB intent object. */ export declare function fromPcbIntent(pcb: { boardOutline?: unknown; layerCount?: number; widthMm?: number; heightMm?: number; layerStack?: unknown[]; netClasses?: unknown[]; clearanceRules?: unknown[]; keepoutAreas?: unknown[]; placementZones?: unknown[]; mountingHoles?: unknown[]; fiducials?: unknown[]; testPads?: unknown[]; hasDrillFile?: boolean; minCopperToEdgeMm?: number; copperToEdgeViolationCount?: number; minDrillMm?: number; minAnnularRingMm?: number; minSolderMaskSliverMm?: number; solderMaskSliverViolationCount?: number; silkscreenOverPadCount?: number; smtComponentCount?: number; fiducialCount?: number; toolingHoleCount?: number; polarizedComponentCount?: number; polarityMarkCount?: number; componentSpacingViolationCount?: number; criticalNetNames?: string[]; testPointNets?: string[]; hasProgrammingHeader?: boolean; requiresProgrammingHeader?: boolean; hasFabricationNotes?: boolean; manufacturingProcess?: string; manufacturing?: { process?: string; quantity?: number; }; quantity?: number; highVoltage?: boolean; }): PcbConstraintInput;