@tscircuit/capacity-autorouter 0.0.127 → 0.0.129

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  An MIT-licensed full-pipeline PCB autorouter library for node.js and TypeScript projects. Part of [tscircuit](https://github.com/tscircuit/tscircuit)
4
4
 
5
- [View Online Playground](https://unraveller.vercel.app) · [tscircuit docs](https://docs.tscircuit.com) · [discord](https://tscircuit.com/join) · [twitter](https://x.com/seveibar) · [try tscircuit online](https://tscircuit.com) · [Report/Debug Autorouter Bugs](https://docs.tscircuit.com/contributing/report-autorouter-bugs)
5
+ [View Online Playground](https://autorouter.tscircuit.com) · [tscircuit docs](https://docs.tscircuit.com) · [discord](https://tscircuit.com/join) · [twitter](https://x.com/seveibar) · [try tscircuit online](https://tscircuit.com) · [Report/Debug Autorouter Bugs](https://docs.tscircuit.com/contributing/report-autorouter-bugs)
6
6
 
7
7
  Want to understand how the autorouter works? Check out a stage-by-stage breakdown with videos in [this autorouter walk through](./docs/blog-post/blog-post.md)
8
8
 
package/dist/index.d.ts CHANGED
@@ -271,9 +271,28 @@ declare class CapacityMeshNodeSolver2_NodeUnderObstacle extends CapacityMeshNode
271
271
  opts: CapacityMeshNodeSolverOptions;
272
272
  VIA_DIAMETER: number;
273
273
  OBSTACLE_MARGIN: number;
274
+ /**
275
+ * The threshold for the percentage of a single-layer node that must be
276
+ * covered by obstacles to be considered "under an obstacle"
277
+ */
278
+ OVERLAP_THRESHOLD_FOR_SINGLE_LAYER_NODES: number;
274
279
  constructor(srj: SimpleRouteJson, opts?: CapacityMeshNodeSolverOptions);
275
280
  isNodeCompletelyOutsideBounds(node: CapacityMeshNode): boolean;
276
281
  isNodePartiallyOutsideBounds(node: CapacityMeshNode): boolean;
282
+ /**
283
+ * Calculate the percentage of node area covered by obstacles
284
+ */
285
+ getObstacleCoveragePercentage(node: CapacityMeshNode): number;
286
+ /**
287
+ * Check if a single-layer node should be filtered due to obstacle coverage
288
+ */
289
+ shouldFilterSingleLayerNodeForObstacle(node: CapacityMeshNode): boolean;
290
+ /**
291
+ * Check if a node should be filtered due to obstacles.
292
+ * Single-layer nodes: filtered only if >20% covered
293
+ * Multi-layer nodes: filtered if any overlap
294
+ */
295
+ shouldFilterNodeForObstacle(node: CapacityMeshNode): boolean;
277
296
  createChildNodeAtPosition(parent: CapacityMeshNode, opts: {
278
297
  center: {
279
298
  x: number;
@@ -2121,4 +2140,4 @@ declare const convertSrjToGraphicsObject: (srj: SimpleRouteJson) => {
2121
2140
  points: Point$3[];
2122
2141
  };
2123
2142
 
2124
- export { type CachableSolver, type CacheProvider, CapacityMeshSolver, InMemoryCache, LocalStorageCache, calculateOptimalCapacityDepth, convertSrjToGraphicsObject, getGlobalInMemoryCache, getGlobalLocalStorageCache, getTunedTotalCapacity1, setupGlobalCaches };
2143
+ export { AutoroutingPipelineSolver, type CachableSolver, type CacheProvider, CapacityMeshSolver, InMemoryCache, LocalStorageCache, calculateOptimalCapacityDepth, convertSrjToGraphicsObject, getGlobalInMemoryCache, getGlobalLocalStorageCache, getTunedTotalCapacity1, setupGlobalCaches };