import { Component } from "../../component.js"; import { PCB } from "../../pcb/pcb.js"; import { IFilledZone, IKeepoutZone, IGrLine, IOutline } from "../../pcb/pcb_interfaces.js"; import { IRoutingObstacle } from "./routing_grid.js"; /** * Builds routing obstacles from PCB elements. * Converts components, pads, zones, and other PCB features into obstacle representations * for the routing grid. */ export declare class ObstacleBuilder { /** * Build all obstacles from a PCB instance. * * @param pcb - The PCB to extract obstacles from * @param defaultClearance - Default clearance for obstacles in mm * @param additionalComponents - Additional components to include (e.g., from pins being routed) * @returns Array of routing obstacles * * @example * ```ts * const obstacles = ObstacleBuilder.buildFromPCB(pcb, 0.2); * obstacles.forEach(obs => grid.addObstacle(obs)); * ``` */ static buildFromPCB(pcb: PCB, defaultClearance?: number, additionalComponents?: Component[], debug?: boolean): IRoutingObstacle[]; /** * Build an obstacle from a component's body (courtyard). * * @param component - The component * @param clearance - Clearance around component in mm * @returns Component body obstacle, or null if unable to determine bounds */ static buildFromComponent(component: Component, clearance: number): IRoutingObstacle | null; /** * Build obstacles from a component's pads. * * @param component - The component * @param clearance - Clearance around pads in mm * @param pcb - PCB instance to resolve nets * @returns Array of pad obstacles */ static buildFromComponentPads(component: Component, clearance: number, pcb: PCB, debug?: boolean): IRoutingObstacle[]; /** * Build an obstacle from a pad geometry. * @private */ private static buildFromPad; /** * Build an obstacle from a filled zone. * * @param zone - The filled zone * @returns Zone obstacle, or null if invalid */ static buildFromZone(zone: IFilledZone): IRoutingObstacle | null; /** * Build an obstacle from a keepout zone. * * @param zone - The keepout zone * @returns Keepout obstacle, or null if tracks are allowed */ static buildFromKeepoutZone(zone: IKeepoutZone): IRoutingObstacle | null; /** * Build an obstacle from a track. * * @param track - The track (IGrLine) * @param width - Track width in mm * @param clearance - Clearance around track in mm * @param net - Net name for net-aware routing (optional) * @returns Track obstacle */ static buildFromTrack(track: IGrLine, width: number, clearance: number, net?: string, isManualRoute?: boolean): IRoutingObstacle; /** * Build an obstacle from a board outline. * * @param outline - The board outline * @param clearance - Clearance from outline in mm * @returns Outline obstacle (everything outside the outline is blocked) */ static buildFromOutline(outline: IOutline, clearance: number): IRoutingObstacle | null; /** * Build an obstacle from a plated through via component. * Represent as a circular pad on all copper layers to enforce * trace-to-via clearances during routing. */ private static buildFromVia; /** * Extract component bounds from footprint S-expression. * Looks for courtyard or fabrication layer bounds. * @private */ private static extractComponentBounds; /** * Build a simple component obstacle using estimated dimensions. * @private */ private static buildSimpleComponentObstacle; /** * Calculate bounding box from a polygon. * @private */ private static calculatePolygonBounds; } //# sourceMappingURL=obstacle_builder.d.ts.map