fix(autorouter/anterouter): Make fanouts axis-aligned with their ratline endpoints

This commit is contained in:
Mikolaj Wielgus 2025-10-07 14:24:13 +02:00
parent 7e1a5857b1
commit 506104a6a7
1 changed files with 9 additions and 2 deletions

View File

@ -326,11 +326,18 @@ impl Anterouter {
.drawing()
.primitive(source_dot)
.maybe_net();
let center = autorouter
.board()
.layout()
.drawing()
.primitive(source_dot)
.shape()
.center();
let bbox_to_anchor = Point::from(cardinal_direction) * 1.4;
let bbox_anchor = point! {
x: bbox.center()[0] + (bbox.upper()[0] - bbox.lower()[0]) / 2.0 * bbox_to_anchor.x(),
y: bbox.center()[1] + (bbox.upper()[1] - bbox.lower()[1]) / 2.0 * bbox_to_anchor.y(),
x: center.x() + (bbox.upper()[0] - bbox.lower()[0]) / 2.0 * bbox_to_anchor.x(),
y: center.y() + (bbox.upper()[1] - bbox.lower()[1]) / 2.0 * bbox_to_anchor.y(),
};
//let via_bbox_to_anchor = [-pin_bbox_to_anchor[0], -pin_bbox_to_anchor[1]];