Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -217,14 +217,17 @@ export class IdentifyDecouplingCapsSolver extends BaseSolver {
}

for (const rect of graphics.rects || []) {
if (rect.label !== this.lastChip?.chipId) {
const baseLabel = (rect.label || "").split(" ")[0]
if (baseLabel !== this.lastChip?.chipId) {
rect.fill = "rgba(0,0,0,0.5)"
}
}

for (const rect of graphics.rects || []) {
const chipId = (rect as any).label as ChipId
const group = chipDecapGroupMap.get(chipId)
const baseLabel = (((rect as any).label as string) || "").split(
" ",
)[0] as ChipId
const group = chipDecapGroupMap.get(baseLabel)
if (!group) continue
rect.label = `${rect.label}\n${group.decouplingCapGroupId}`
rect.fill = getColorFromString(group.decouplingCapGroupId, 0.8)
Expand Down
17 changes: 13 additions & 4 deletions lib/solvers/LayoutPipelineSolver/doBasicInputProblemLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,19 @@ export function doBasicInputProblemLayout(
> = {}

for (const component of packResult.components) {
chipPlacements[component.componentId] = {
x: component.center.x,
y: component.center.y,
ccwRotationDegrees: component.ccwRotationOffset,
const chip = inputProblem.chipMap[component.componentId]
if (chip?.fixedPosition) {
chipPlacements[component.componentId] = {
x: chip.fixedPosition.x,
y: chip.fixedPosition.y,
ccwRotationDegrees: chip.availableRotations?.[0] ?? 0,
}
} else {
chipPlacements[component.componentId] = {
x: component.center.x,
y: component.center.y,
ccwRotationDegrees: component.ccwRotationOffset,
}
}
}

Expand Down
Loading
Loading