From 2ecda37806f2ba95836e3386e5f2c237d5858af2 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 23 Feb 2012 15:59:57 +0100 Subject: [PATCH] Pcbnew: zone filling: fix broken thermal relief shape for oval pads. mainly noticeable for oval pads having very different X and Y sizes. --- pcbnew/board_items_to_polygon_shape_transform.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index 6d4b96c809..10d03071a3 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -778,10 +778,13 @@ void CreateThermalReliefPadPolygon( std::vector& aCornerBuffer, shape_offset = wxPoint( deltasize, 0 ); // Crosspoint of thermal spoke sides, the first point of polygon buffer - corners_buffer.push_back( wxPoint( copper_thickness.x / 2, copper_thickness.y / 2 ) ); + corner.x = copper_thickness.x / 2; + corner.y = copper_thickness.y / 2; + corners_buffer.push_back( corner ); // Arc start point calculation, the intersecting point of cutout arc and thermal spoke edge - if( copper_thickness.x > deltasize ) // If copper thickness is more than shape offset, we need to calculate arc intercept point. + // If copper thickness is more than shape offset, we need to calculate arc intercept point. + if( copper_thickness.x > deltasize ) { corner.x = copper_thickness.x / 2; corner.y = (int) sqrt( ( (double) outer_radius * outer_radius ) - @@ -801,7 +804,6 @@ void CreateThermalReliefPadPolygon( std::vector& aCornerBuffer, corner.x = copper_thickness.x / 2; corner.y = outer_radius; corners_buffer.push_back( corner ); - corner.x = ( deltasize - copper_thickness.x ) / 2; } // Add an intermediate point on spoke sides, to allow a > 90 deg angle between side