From 5974446523ab87f7b36a9a924e004487e985ff29 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sat, 17 Apr 2021 21:37:11 -0400 Subject: [PATCH] PNS: Let's make the r-tree work for us I'm not sure where the magic number of "4x worst" came from, but it's been around forever. This is extremely inefficient as it negates much of the power of r-tree filtering in dense designs. If we really trusted it, we could set this just to worstClearance. Keeping it above the worst clearance by a little bit seems to provide enough of a speed improvement to resolve the test cases I have, so I'll go with that for now. Fixes https://gitlab.com/kicad/code/kicad/-/issues/7777 --- pcbnew/router/pns_kicad_iface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index 3e39482ed4..a8b65c9cf7 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -1363,7 +1363,7 @@ void PNS_KICAD_IFACE_BASE::SyncWorld( PNS::NODE *aWorld ) m_ruleResolver = new PNS_PCBNEW_RULE_RESOLVER( m_board, this ); aWorld->SetRuleResolver( m_ruleResolver ); - aWorld->SetMaxClearance( 4 * worstClearance ); + aWorld->SetMaxClearance( 1.5 * worstClearance ); }