From 5616ef2e7ccc44d877f591df12e5216d6aaa9432 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 10 Aug 2022 15:27:28 +0200 Subject: [PATCH] ZONE_FILLER::buildThermalSpokes() fix incorrect spoke shape for pad shapes with offset. Fixes #12201 https://gitlab.com/kicad/code/kicad/issues/12201 --- pcbnew/zone_filler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index 60b8700611..1b989416da 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -1413,8 +1413,10 @@ void ZONE_FILLER::buildThermalSpokes( const ZONE* aZone, PCB_LAYER_ID aLayer, PAD dummy_pad( *pad ); dummy_pad.SetOrientation( spokesAngle ); - // Spokes are from center of pad, not from hole - dummy_pad.SetPosition( -1 * pad->GetOffset() ); + // Spokes are from center of pad shape, not from hole. So the dummy pad + // (the pad shape) has no offset and is at position 0,0 + dummy_pad.SetPosition( VECTOR2I( 0, 0 ) ); + dummy_pad.SetOffset( VECTOR2I( 0, 0 ) ); BOX2I reliefBB = dummy_pad.GetBoundingBox(); reliefBB.Inflate( thermalReliefGap + epsilon );