Skip to content

Commit

Permalink
Merge pull request #51 from tscircuit/fix-route-obstacles
Browse files Browse the repository at this point in the history
add some default connectedTo ids for obstacles
  • Loading branch information
seveibar authored Sep 10, 2024
2 parents 025969b + 5368ede commit 95380b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions module/lib/solver-utils/getObstaclesFromCircuitJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const getObstaclesFromCircuitJson = (soup: AnySoupElement[]) => {
},
width: element.radius * 2,
height: element.radius * 2,
connectedTo: [],
connectedTo: [element.pcb_smtpad_id],
})
} else if (element.shape === "rect") {
obstacles.push({
Expand All @@ -31,7 +31,7 @@ export const getObstaclesFromCircuitJson = (soup: AnySoupElement[]) => {
},
width: element.width,
height: element.height,
connectedTo: [],
connectedTo: [element.pcb_smtpad_id],
})
}
} else if (element.type === "pcb_keepout") {
Expand Down Expand Up @@ -111,7 +111,7 @@ export const getObstaclesFromCircuitJson = (soup: AnySoupElement[]) => {
},
width: element.outer_diameter,
height: element.outer_diameter,
connectedTo: [],
connectedTo: [element.pcb_plated_hole_id],
})
} else if (element.shape === "oval" || element.shape === "pill") {
obstacles.push({
Expand All @@ -124,7 +124,7 @@ export const getObstaclesFromCircuitJson = (soup: AnySoupElement[]) => {
},
width: element.outer_width,
height: element.outer_height,
connectedTo: [],
connectedTo: [element.pcb_plated_hole_id],
})
}
} else if (element.type === "pcb_trace") {
Expand Down

0 comments on commit 95380b3

Please sign in to comment.