Skip to content

Commit 772e32e

Browse files
committed
Block Invalid Single-Layer Usage: FixedTopologyHighDensityIntraNodeSolver Now Fails with Explicit 2-Layer Requirement
1 parent dc551a2 commit 772e32e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/solvers/FixedTopologyHighDensityIntraNodeSolver/FixedTopologyHighDensityIntraNodeSolver.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ export class FixedTopologyHighDensityIntraNodeSolver extends BaseSolver {
7373
this.colorMap = buildColorMapFromPortPoints(this.nodeWithPortPoints)
7474
}
7575

76+
if (this.nodeWithPortPoints.availableZ?.length === 1) {
77+
this.error =
78+
"FixedTopologyHighDensityIntraNodeSolver requires at least 2 layers."
79+
this.failed = true
80+
this.solved = false
81+
return
82+
}
83+
7684
const nonTopLayerPortPoint = this.nodeWithPortPoints.portPoints.find(
7785
(pp) => pp.z !== 0,
7886
)

0 commit comments

Comments
 (0)