import { Component } from "../component.js"; import { Schematic } from "../schematic.js"; import type { ISchematicNetDefinition } from "../net_manager.js"; import { Pin } from "../pin.js"; import { TrackBuilder } from './pcb_track_builder.js'; import type { IPcbOptions, INetResolution, IVia, IGrLine, IOutline, IGrTextOptions, IAutorouteOptions, IAutorouteResult, IPcbZoneOptions, IPcbKeepoutOptions, IPcbLineOptions, IPcbCircleOptions, IPcbRectOptions, IPcbPolyOptions } from './pcb_interfaces.js'; import { PcbInternalState } from './pcb_state.js'; import type { RouterFactory, RouterGridConfigurator } from './pcb_router_registry.js'; export { TrackBuilder } from './pcb_track_builder.js'; export type { IPcbOptions, INetResolution, IVia, IGraphicPrimitive, IGrLine, IGrArc, IGrCircle, IGrRect, IGrPoly, OutlineElement, IOutline, ISourceInfo, IGeneratedElement, IGrTextOptions, IZone, IFilledZone, IKeepoutZone, IAutorouteOptions, IAutorouteResult, IAutorouteWaypoint, IImpedanceConstraint, IRouteMetadata, IConnectionIdentifier, IManualRoute, IAutorouteRouteOptions } from './pcb_interfaces.js'; /** * Represents a printed circuit board (PCB). */ export declare class PCB { readonly boardName: string; private _schematic; private _state; private _outlines; private _tracks; /** * Initializes a new PCB. * @param boardName - Name and filename of generated files. * @param options - Optional configuration for the PCB. */ constructor(boardName: string, options?: IPcbOptions); get schematic(): Schematic; get thickness(): number; get copper_thickness(): number; get outlines(): readonly IOutline[]; get tracks(): readonly IOutline[]; get options(): IPcbOptions; /** * Places components on the board. * @param components - List of components to place. */ place(...components: Component[]): void; stage(...components: Component[]): void; /** * Groups components and/or elements from a TrackBuilder together on the board. * @param group_name - Name of the group. * @param items - A list of Component instances or TrackBuilder instances. */ group(group_name: string, ...items: Array): void; text(options: IGrTextOptions): void; create(...items: Array>): Promise; /** * Handles via-related operations. * @param via - The via details. * @returns The component representing the via. */ via({ at, size, drill, net, powerInfo }?: Omit): Component; zone(options: IPcbZoneOptions): void; keepout(options: IPcbKeepoutOptions): void; line(options: IPcbLineOptions): void; circle(options: IPcbCircleOptions): void; rect(options: IPcbRectOptions): void; poly(options: IPcbPolyOptions): void; outline(x: number, y: number, width: number, height: number, filletRadius?: number, conceptualUuidFromUser?: string): void; track(options?: { locked?: boolean; net?: string; deferStaging?: boolean; debug?: boolean; }): TrackBuilder; route(options: IAutorouteOptions): Promise; route(netDefinition: ISchematicNetDefinition, options?: import('./pcb_interfaces.js').IAutorouteRouteOptions): Promise; waitForPendingAutoroutes(): Promise; net(...pins: Pin[]): ISchematicNetDefinition; named(name: string): { net: (...pins: Pin[]) => ISchematicNetDefinition; dnc: (...pins: Pin[]) => void; }; bom(output_folder?: string): void; contract(options?: import('../contract.js').ContractOptions): void; add(...components: Component[]): void; } export declare function getPcbState(pcb: PCB): PcbInternalState; export declare function setPcbOutlines(pcb: PCB, outlines: IOutline[]): void; export declare function setPcbTracks(pcb: PCB, tracks: IOutline[]): void; export declare function pcbTrackSegment(pcb: PCB, start: { x: number; y: number; }, end: { x: number; y: number; }, width?: number, layer?: string, locked?: boolean, uuid?: string, net?: string): string; export declare function pcbGetTrackData(pcb: PCB, uuid: string): IGrLine | null; export declare function pcbResolveNet(pcb: PCB, componentReference: string, pinNumber: string, componentUuid?: string, boardNetNameToCodeMap?: Map, fallbackNetName?: string): INetResolution; export declare function pcbPushOffset(pcb: PCB, x: number, y: number): void; export declare function pcbPopOffset(pcb: PCB): void; export declare function pcbGetCurrentOffset(pcb: PCB): { x: number; y: number; }; export declare function pcbRegisterRouter(pcb: PCB, registerFn: (registry: { register(name: string, factory: RouterFactory, options?: { configureGrid?: RouterGridConfigurator; }): void; }, algorithm?: string) => void): void; export declare function autorouteBatchOnPcb(pcb: PCB, items: Array<{ from: Pin | Pin[]; to: Pin | Pin[]; options?: import('./pcb_interfaces.js').IAutorouteRouteOptions; name?: string; }>, batchOptions?: { rounds?: number; reorder?: 'none' | 'reverse' | 'byDistance'; relaxViaCostPerRound?: number; increaseIterationsPerRound?: number; }): Promise<{ results: IAutorouteResult[]; success: boolean; rounds: number; }>; //# sourceMappingURL=pcb.d.ts.map