@tscircuit/capacity-autorouter 0.0.119 → 0.0.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as graphics_debug from 'graphics-debug';
2
2
  import { GraphicsObject, Rect, Circle, Line, Point as Point$3 } from 'graphics-debug';
3
+ import { Polygon } from '@tscircuit/math-utils';
3
4
  import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
4
5
 
5
6
  type TraceId = string;
@@ -14,6 +15,10 @@ interface SimpleRouteJson {
14
15
  minY: number;
15
16
  maxY: number;
16
17
  };
18
+ outline?: Array<{
19
+ x: number;
20
+ y: number;
21
+ }>;
17
22
  traces?: SimplifiedPcbTraces;
18
23
  }
19
24
  interface Obstacle {
@@ -206,12 +211,27 @@ declare class CapacityMeshNodeSolver extends BaseSolver {
206
211
  finishedNodes: CapacityMeshNode[];
207
212
  nodeToXYOverlappingObstaclesMap: Map<CapacityMeshNodeId, Obstacle[]>;
208
213
  layerCount: number;
214
+ protected outlinePolygon?: Polygon;
209
215
  MAX_DEPTH: number;
210
216
  targets: Target[];
211
217
  targetTree: TargetTree;
212
218
  obstacleTree: ObstacleSpatialHashIndex;
213
219
  constructor(srj: SimpleRouteJson, opts?: CapacityMeshNodeSolverOptions$1);
214
220
  computeTargets(): Target[];
221
+ protected getNodeBounds(node: CapacityMeshNode): {
222
+ minX: number;
223
+ maxX: number;
224
+ minY: number;
225
+ maxY: number;
226
+ };
227
+ protected getNodeRect(node: CapacityMeshNode): {
228
+ center: {
229
+ x: number;
230
+ y: number;
231
+ };
232
+ width: number;
233
+ height: number;
234
+ };
215
235
  _nextNodeCounter: number;
216
236
  getNextNodeId(): string;
217
237
  getCapacityFromDepth(depth: number): number;