From 8e361e8a151d629880732c218e2820fdccace688 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 16 Sep 2022 17:21:51 -0700 Subject: [PATCH] Be more diligent about checking for zone file deps The outline collision is relatively cheap (especially after filtering bbox collisions) so check if a zone REALLY depends on another zone before making it wait. Waiting for zones can really increase the total fill time --- pcbnew/zone_filler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index 335375cc65..3f7632ec2d 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -210,7 +210,10 @@ bool ZONE_FILLER::Fill( std::vector& aZones, bool aCheck, wxWindow* aPare BOX2I inflatedBBox = aZone->GetCachedBoundingBox(); inflatedBBox.Inflate( m_worstClearance ); - return inflatedBBox.Intersects( aOtherZone->GetCachedBoundingBox() ); + if( !inflatedBBox.Intersects( aOtherZone->GetCachedBoundingBox() ) ) + return false; + + return aZone->Outline()->Collide( aOtherZone->Outline(), m_worstClearance ); }; auto fill_lambda =