fix(autorouter/ratline): Don't count ratlines with shared endpoint as intersecting

This commit is contained in:
Mikolaj Wielgus 2025-09-04 14:37:09 +02:00
parent eb0ee25565
commit b49aa9e1b7
2 changed files with 20 additions and 0 deletions

View File

@ -28,6 +28,7 @@ allowed_scopes = [
"autorouter/place_via",
"autorouter/pointroute",
"autorouter/ratsnest",
"autorouter/ratline",
"autorouter/remove_bands",
"autorouter/selection",
"drawing/band",

View File

@ -81,6 +81,25 @@ impl<'a, M: AccessMesadata> RatlineRef<'a, M> {
.ratsnest()
.graph()
.edge_indices()
.filter(move |other| {
let (self_source, self_target) = self
.autorouter
.ratsnest
.graph()
.edge_endpoints(self.index)
.unwrap();
let (other_source, other_target) = self
.autorouter
.ratsnest
.graph()
.edge_endpoints(*other)
.unwrap();
self_source != other_source
&& self_source != other_target
&& self_target != other_source
&& self_target != other_target
})
.filter(move |other| {
let other_line = other.ref_(self.autorouter).line();