@tscircuit/capacity-autorouter 0.0.98 → 0.0.99
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.js +16 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15760,6 +15760,12 @@ var CapacityMeshEdgeSolver = class extends BaseSolver {
|
|
|
15760
15760
|
return node1.availableZ.some((z) => node2.availableZ.includes(z));
|
|
15761
15761
|
}
|
|
15762
15762
|
visualize() {
|
|
15763
|
+
const edgeCount = /* @__PURE__ */ new Map();
|
|
15764
|
+
for (const edge of this.edges) {
|
|
15765
|
+
for (const nodeId of edge.nodeIds) {
|
|
15766
|
+
edgeCount.set(nodeId, 1 + (edgeCount.get(nodeId) ?? 0));
|
|
15767
|
+
}
|
|
15768
|
+
}
|
|
15763
15769
|
const graphics = {
|
|
15764
15770
|
lines: [],
|
|
15765
15771
|
points: [],
|
|
@@ -15781,7 +15787,8 @@ var CapacityMeshEdgeSolver = class extends BaseSolver {
|
|
|
15781
15787
|
node.capacityMeshNodeId,
|
|
15782
15788
|
`availableZ: ${node.availableZ.join(",")}`,
|
|
15783
15789
|
`target? ${node._containsTarget ?? false}`,
|
|
15784
|
-
`obs? ${node._containsObstacle ?? false}
|
|
15790
|
+
`obs? ${node._containsObstacle ?? false}`,
|
|
15791
|
+
`conn: ${edgeCount.get(node.capacityMeshNodeId) ?? 0}`
|
|
15785
15792
|
].join("\n"),
|
|
15786
15793
|
layer: `z${node.availableZ.join(",")}`
|
|
15787
15794
|
};
|
|
@@ -15927,6 +15934,12 @@ var DeadEndSolver = class extends BaseSolver {
|
|
|
15927
15934
|
this.nodeMap.set(node.capacityMeshNodeId, node);
|
|
15928
15935
|
}
|
|
15929
15936
|
}
|
|
15937
|
+
const edgeCount = /* @__PURE__ */ new Map();
|
|
15938
|
+
for (const edge of this.edges) {
|
|
15939
|
+
for (const nodeId of edge.nodeIds) {
|
|
15940
|
+
edgeCount.set(nodeId, 1 + (edgeCount.get(nodeId) ?? 0));
|
|
15941
|
+
}
|
|
15942
|
+
}
|
|
15930
15943
|
const graphics = {
|
|
15931
15944
|
lines: [],
|
|
15932
15945
|
points: [],
|
|
@@ -15948,7 +15961,8 @@ var DeadEndSolver = class extends BaseSolver {
|
|
|
15948
15961
|
node.capacityMeshNodeId,
|
|
15949
15962
|
`availableZ: ${node.availableZ.join(",")}`,
|
|
15950
15963
|
`target? ${node._containsTarget ?? false}`,
|
|
15951
|
-
`obs? ${node._containsObstacle ?? false}
|
|
15964
|
+
`obs? ${node._containsObstacle ?? false}`,
|
|
15965
|
+
`conn: ${edgeCount.get(node.capacityMeshNodeId) ?? 0}`
|
|
15952
15966
|
].join("\n"),
|
|
15953
15967
|
layer: `z${node.availableZ.join(",")}`
|
|
15954
15968
|
};
|