/** * PCB Routing Calculation Functions * * This module contains standalone calculation functions extracted from the main PCB class. * These functions are pure mathematical calculations that don't depend on PCB class state. */ import { Component } from "../component.js"; /** * PCB design constants used across routing and calculation modules. * All dimensional values are in millimeters unless otherwise noted. */ export declare const PCB_CONSTANTS: { /** Default track width in mm */ readonly DEFAULT_TRACK_WIDTH: 0.2; /** Default clearance in mm */ readonly DEFAULT_CLEARANCE: 0.1; /** Default copper thickness in microns (1 oz copper) */ readonly DEFAULT_COPPER_THICKNESS_UM: 35; /** Conversion factor: mils per ounce of copper */ readonly MILS_PER_OZ: 1.378; /** Conversion factor: mm to mils */ readonly MM_TO_MILS: number; /** Conversion factor: microns to mils */ readonly UM_TO_MILS: number; /** Default temperature rise in degrees C for current calculations */ readonly DEFAULT_TEMP_RISE: 10; /** Default via size in mm */ readonly DEFAULT_VIA_SIZE: 0.6; /** Default via drill size in mm */ readonly DEFAULT_VIA_DRILL: 0.3; /** Default via size in mm for component-level vias */ readonly DEFAULT_VIA_SIZE_COMPONENT: 0.8; /** Default via drill size in mm for component-level vias */ readonly DEFAULT_VIA_DRILL_COMPONENT: 0.4; /** Standard schematic grid unit in mm (0.1 inch) */ readonly SCHEMATIC_GRID_UNIT: 2.54; }; /** * Calculate the current capacity of a via based on its size and drill * Based on IPC-2152 formula for via current capacity * * @param size - Via size in mm * @param drill - Via drill size in mm * @param thickness - Copper plating thickness in microns (defaults to 35 microns if not provided) * @param boardThickness - Board thickness in mm (not used in calculation but kept for compatibility) * @param maxTempRise - Maximum temperature rise in °C (defaults to 10) * @returns Maximum current capacity in amperes */ export declare function calculateViaCurrentCapacity(size: number, drill: number, thickness?: number, boardThickness?: number, maxTempRise?: number): number; /** * Calculate minimum trace width using IPC-2221 formula. * Reuses the formula from TrackBuilder. * * @param current - Current in amperes * @param layer - Layer name (e.g., "F.Cu", "B.Cu", "In1.Cu", etc.) * @param maxTempRise - Maximum temperature rise in °C * @param thickness - Copper thickness in microns * @returns Minimum trace width in mm */ export declare function calculateMinTraceWidth(current: number, layer: string, maxTempRise: number, thickness: number): number; /** * Calculate minimum via size using the same IPC-2221-based barrel approximation * used by routing helpers and track building. * * @param current - Current in amperes * @param thickness - Copper thickness in microns * @returns Minimum via size and drill in mm */ export declare function calculateMinViaSize(current: number, thickness?: number): { size: number; drill: number; }; /** * Interface for board bounds calculation result */ export interface BoardBounds { minX: number; maxX: number; minY: number; maxY: number; } /** * Interface for outline elements used in bounds calculation */ export interface OutlineElement { x: number; y: number; width: number; height: number; } /** * Creates a bounding box centered around all component positions. * * @param components - Array of components to calculate bounds for * @param outlines - Optional array of outline elements that define board edges * @param stagedComponents - Optional array of staged components to include * @returns Bounding box coordinates */ export declare function calculateBoardBounds(components: Component[], outlines?: OutlineElement[], stagedComponents?: Component[]): BoardBounds; //# sourceMappingURL=pcb_routing_calculations.d.ts.map