import { RoutingGrid, IRoutingObstacle } from '../shared/routing_grid.js'; import { IRoutePath } from '../../pcb/pcb_interfaces.js'; import { ISteinerPoint } from '../router/steiner_optimizer.js'; /** * Generates debug visualizations of routing grids and paths. * Creates simple PPM (Portable PixMap) images that can be viewed with most image viewers. */ export declare class DebugVisualizer { /** * Generate a debug visualization of the routing grid with obstacles and paths. * * @param grid - The routing grid * @param obstacles - Array of obstacles * @param paths - Array of routed paths * @param filename - Output filename (without extension) * @param layer - Which layer to visualize (default: first layer in grid) * @param cellSize - Pixels per grid cell (default: 1, max 2 for large grids) * @param steinerPoints - Optional Steiner points to highlight * * @example * ```ts * DebugVisualizer.visualizeRouting(grid, obstacles, [path], 'debug_route', 'F.Cu', 1); * ``` */ static visualizeRouting(grid: RoutingGrid, obstacles: IRoutingObstacle[], paths: IRoutePath[], filename?: string, layer?: string, cellSize?: number, steinerPoints?: ISteinerPoint[], debug?: boolean): void; /** * Get color for obstacle based on net ownership. * @private */ private static getObstacleColor; /** * Get color for obstacle based on type. * @private */ private static getObstacleTypeColor; /** * Fill a rectangle with a color. * @private */ private static fillRect; /** * Draw a rectangle outline. * @private */ private static drawRect; /** * Fill a circle with a color. * @private */ private static fillCircle; /** * Draw a line using Bresenham's algorithm. * @private */ private static drawLine; /** * Set a single pixel in the flat Uint8Array. * @private */ private static setPixel; /** * Save image as PPM (Portable PixMap) format. * This is a simple text-based format that requires no dependencies. * Uses binary PPM (P6) for smaller file sizes. * @private */ private static savePPM; /** * Visualize multiple layers side by side. * * @param grid - The routing grid * @param obstacles - Array of obstacles * @param paths - Array of routed paths * @param filename - Output filename (without extension) * @param cellSize - Pixels per grid cell (default: 2) */ static visualizeAllLayers(grid: RoutingGrid, obstacles: IRoutingObstacle[], paths: IRoutePath[], filename?: string, cellSize?: number, steinerPoints?: ISteinerPoint[], debug?: boolean): void; } //# sourceMappingURL=debug_visualizer.d.ts.map