@tscircuit/capacity-autorouter 0.0.22 → 0.0.24

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
@@ -1,8 +1,8 @@
1
1
  # @tscircuit/capacity-autorouter
2
2
 
3
- [View Online Playground](https://unraveller.vercel.app) · [tscircuit docs](https://docs.tscircuit.com)
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
- A high-density PCB autorouter library for node.js and TypeScript projects. Part of the [tscircuit project](https://github.com/tscircuit/tscircuit) · [discord](https://tscircuit.com/join) · [twitter](https://x.com/seveibar) · [try tscircuit online](https://tscircuit.com)
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)
6
6
 
7
7
  Check out this [short youtube explanation of this autorouter](https://youtu.be/MmTk0806fAo)
8
8
 
package/dist/index.js CHANGED
@@ -1865,7 +1865,10 @@ var CapacitySegmentToPointSolver = class extends BaseSolver {
1865
1865
  (seg) => seg.assignedPoints.map((ap) => ({
1866
1866
  x: ap.point.x,
1867
1867
  y: ap.point.y,
1868
- label: `${seg.capacityMeshNodeId}-${ap.connectionName}`,
1868
+ label: [
1869
+ `${seg.capacityMeshNodeId}-${ap.connectionName}`,
1870
+ `z: ${seg.availableZ.join(",")}`
1871
+ ].join("\n"),
1869
1872
  color: this.colorMap[ap.connectionName],
1870
1873
  step: 4
1871
1874
  }))
@@ -2057,7 +2060,7 @@ var SingleHighDensityRouteSolver = class extends BaseSolver {
2057
2060
  const margin = isVia ? this.viaDiameter / 2 : this.obstacleMargin;
2058
2061
  const tooClose = node.x < this.bounds.minX + margin || node.x > this.bounds.maxX - margin || node.y < this.bounds.minY + margin || node.y > this.bounds.maxY - margin;
2059
2062
  if (tooClose && !isVia) {
2060
- if (distance(node, this.B) < margin * 2) {
2063
+ if (distance(node, this.B) < margin * 2 || distance(node, this.A) < margin * 2) {
2061
2064
  return false;
2062
2065
  }
2063
2066
  }