Skip to content
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,19 @@ export const minimizeTurnsWithFilteredLabels = ({

const TRACE_WIDTH = 0.01
const getTraceObstacles = (obstacleTraces: SolvedTracePath[]) =>
obstacleTraces.flatMap((trace, i) =>
trace.tracePath.slice(0, -1).map((p1, pi) => {
const p2 = trace.tracePath[pi + 1]!
obstacleTraces.flatMap((trace, i) => {
const tracePath = (trace as any).tracePath ?? (trace as any).path
return tracePath.slice(0, -1).map((p1: any, pi: number) => {
const p2 = tracePath[pi + 1]!
return {
chipId: `trace-obstacle-${i}-${pi}`,
minX: Math.min(p1.x, p2.x) - TRACE_WIDTH / 2,
minY: Math.min(p1.y, p2.y) - TRACE_WIDTH / 2,
maxX: Math.max(p1.x, p2.x) + TRACE_WIDTH / 2,
maxY: Math.max(p1.y, p2.y) + TRACE_WIDTH / 2,
}
}),
)
})
})

const staticObstaclesRaw = getObstacleRects(inputProblem)
const PADDING = 0.01
Expand All @@ -74,7 +75,8 @@ export const minimizeTurnsWithFilteredLabels = ({
maxY: obs.maxY + PADDING,
}))

const originalPath = targetTrace.tracePath
const originalPath =
(targetTrace as any).tracePath ?? (targetTrace as any).path
const filteredLabels = allLabelPlacements.filter((label) => {
const originalNetIds = mergedLabelNetIdMap[label.globalConnNetId]
if (originalNetIds) {
Expand Down
Loading