mirror of https://codeberg.org/topola/topola.git
fix(router/navmesh): Don't unionize with fillets
This commit is contained in:
parent
3e466960fa
commit
03e70a1a7e
|
|
@ -30,7 +30,7 @@ use crate::{
|
||||||
Drawing,
|
Drawing,
|
||||||
},
|
},
|
||||||
graph::{GenericIndex, GetPetgraphIndex, MakeRef},
|
graph::{GenericIndex, GetPetgraphIndex, MakeRef},
|
||||||
layout::Layout,
|
layout::{CompoundEntryLabel, Layout},
|
||||||
math::RotationSense,
|
math::RotationSense,
|
||||||
router::thetastar::MakeEdgeRef,
|
router::thetastar::MakeEdgeRef,
|
||||||
};
|
};
|
||||||
|
|
@ -324,8 +324,28 @@ impl Navmesh {
|
||||||
overlapping_prenavnodes_unions: &mut UnionFind<NodeIndex<usize>>,
|
overlapping_prenavnodes_unions: &mut UnionFind<NodeIndex<usize>>,
|
||||||
prenavnode: PrenavmeshNodeIndex,
|
prenavnode: PrenavmeshNodeIndex,
|
||||||
) {
|
) {
|
||||||
for overlap in layout.drawing().overlapees(prenavnode.into()) {
|
// Ignore overlaps of a fillet.
|
||||||
let PrimitiveIndex::FixedDot(overlapee) = overlap.1 else {
|
if layout
|
||||||
|
.drawing()
|
||||||
|
.compounds(GenericIndex::<()>::new(prenavnode.petgraph_index()))
|
||||||
|
.find(|(label, _)| *label == CompoundEntryLabel::Fillet)
|
||||||
|
.is_some()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for overlapee in layout.drawing().overlapees(prenavnode.into()) {
|
||||||
|
// Ignore overlaps with fillets.
|
||||||
|
if layout
|
||||||
|
.drawing()
|
||||||
|
.compounds(GenericIndex::<()>::new(overlapee.1.petgraph_index()))
|
||||||
|
.find(|(label, _)| *label == CompoundEntryLabel::Fillet)
|
||||||
|
.is_some()
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
let PrimitiveIndex::FixedDot(overlapee) = overlapee.1 else {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue