Browse Source

Prevent round-off errors from drawing one spoke and not the other.

Fixes https://gitlab.com/kicad/code/kicad/issues/13316
7.0
Jeff Young 3 years ago
parent
commit
f4bce6079c
  1. 6
      pcbnew/zone_filler.cpp

6
pcbnew/zone_filler.cpp

@ -1302,7 +1302,11 @@ bool ZONE_FILLER::fillCopperZone( const ZONE* aZone, PCB_LAYER_ID aLayer, PCB_LA
// Hit-test against other spokes
for( const SHAPE_LINE_CHAIN& other : thermalSpokes )
{
if( &other != &spoke && other.PointInside( testPt, 1, USE_BBOX_CACHES ) )
// Hit test in both directions to avoid interactions with round-off errors.
// (See https://gitlab.com/kicad/code/kicad/-/issues/13316.)
if( &other != &spoke
&& other.PointInside( testPt, 1, USE_BBOX_CACHES )
&& spoke.PointInside( other.CPoint( 3 ), 1, USE_BBOX_CACHES ) )
{
if( m_debugZoneFiller )
debugSpokes.AddOutline( spoke );

Loading…
Cancel
Save