Handle pad->custom conversion more closely

When converting pads to custom polygons, avoid padding with the polygon
width and keep the anchor pad within the boundary of the original pad
itself

Fixes https://gitlab.com/kicad/code/kicad/issues/8842
This commit is contained in:
Seth Hillbrand 2021-07-22 12:11:31 -07:00
parent 3e815882c1
commit 8d1dd1f8b0
1 changed files with 4 additions and 2 deletions

View File

@ -691,13 +691,15 @@ void PAD_TOOL::recombinePad( PAD* aPad )
ERROR_INSIDE );
aPad->SetAnchorPadShape( PAD_SHAPE::CIRCLE );
wxSize minAnnularRingWidth( Millimeter2iu( 0.2 ), Millimeter2iu( 0.2 ) );
aPad->SetSize( aPad->GetDrillSize() + minAnnularRingWidth );
if( aPad->GetSizeX() > aPad->GetSizeY() )
aPad->SetSizeX( aPad->GetSizeY() );
aPad->SetOffset( wxPoint( 0, 0 ) );
PCB_SHAPE* shape = new PCB_SHAPE;
shape->SetShape( SHAPE_T::POLY );
shape->SetFilled( true );
shape->SetWidth( 0 );
shape->SetPolyShape( existingOutline );
shape->Move( - aPad->GetPosition() );
shape->Rotate( wxPoint( 0, 0 ), - aPad->GetOrientation() );