Fix incorrect shape of trapezoidal pad shapes. They were not the same as stable branch.

This commit is contained in:
jean-pierre charras 2020-07-31 14:37:21 +02:00
parent 047e95ccc4
commit 4cf5662ea1
2 changed files with 7 additions and 7 deletions

View File

@ -554,10 +554,10 @@ void D_PAD::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
int ddy = GetShape() == PAD_SHAPE_TRAPEZOID ? m_DeltaSize.y / 2 : 0;
wxPoint corners[4];
corners[0] = wxPoint( -dx + ddy, dy + ddx );
corners[1] = wxPoint( dx - ddy, dy - ddx );
corners[2] = wxPoint( dx + ddy, -dy + ddx );
corners[3] = wxPoint( -dx - ddy, -dy - ddx );
corners[0] = wxPoint( -dx - ddy, dy + ddx );
corners[1] = wxPoint( dx + ddy, dy - ddx );
corners[2] = wxPoint( dx - ddy, -dy + ddx );
corners[3] = wxPoint( -dx + ddy, -dy - ddx );
SHAPE_POLY_SET outline;
outline.NewOutline();

View File

@ -319,10 +319,10 @@ void D_PAD::BuildEffectiveShapes() const
SHAPE_LINE_CHAIN corners;
corners.Append( -half_size.x + trap_delta.y, -half_size.y - trap_delta.x );
corners.Append( half_size.x - trap_delta.y, -half_size.y + trap_delta.x );
corners.Append( half_size.x + trap_delta.y, half_size.y - trap_delta.x );
corners.Append( -half_size.x - trap_delta.y, half_size.y + trap_delta.x );
corners.Append( half_size.x + trap_delta.y, half_size.y - trap_delta.x );
corners.Append( half_size.x - trap_delta.y, -half_size.y + trap_delta.x );
corners.Append( -half_size.x + trap_delta.y, -half_size.y - trap_delta.x );
corners.Rotate( -DECIDEG2RAD( m_Orient ) );
corners.Move( shapePos );