Gerber plotter: Non horiz or vertical oval pads: better plot output:
These pads were plotted as a segment. This is not the right way. Pads must be flashed or plotted as regions, not painted. They are now plotted as Gerber regions round rectangle pads. These regions are similar to flashed pads.
This commit is contained in:
parent
e46e2e4e79
commit
de7154e8e9
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
* Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||||
* Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -793,6 +793,16 @@ void GERBER_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, doub
|
||||||
}
|
}
|
||||||
else // Plot pad as region.
|
else // Plot pad as region.
|
||||||
// Only regions and flashed items accept a object attribute TO.P for the pin name
|
// Only regions and flashed items accept a object attribute TO.P for the pin name
|
||||||
|
{
|
||||||
|
if( trace_mode == FILLED )
|
||||||
|
{
|
||||||
|
// Draw the oval as round rect pad with a radius = 50% min size)
|
||||||
|
// In gerber file, it will be drawn as a region with arcs, and can be
|
||||||
|
// detected as pads (similar to a flashed pad)
|
||||||
|
FlashPadRoundRect( pos, aSize, std::min( aSize.x, aSize.y ) /2,
|
||||||
|
orient, FILLED, aData );
|
||||||
|
}
|
||||||
|
else // Non filled shape: plot outlines:
|
||||||
{
|
{
|
||||||
if( size.x > size.y )
|
if( size.x > size.y )
|
||||||
{
|
{
|
||||||
|
@ -804,25 +814,10 @@ void GERBER_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, doub
|
||||||
orient -= 2700;
|
orient -= 2700;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( trace_mode == FILLED )
|
|
||||||
{
|
|
||||||
// TODO: use an aperture macro to declare the rotated pad
|
|
||||||
// to be able to flash the shape
|
|
||||||
// For now, the pad is drawn as thick segment (painted with only one segment)
|
|
||||||
|
|
||||||
// The pad is reduced to an segment with dy > dx
|
|
||||||
int delta = size.y - size.x;
|
|
||||||
wxPoint p0( 0, -delta / 2 );
|
|
||||||
wxPoint p1( 0, delta / 2 );
|
|
||||||
RotatePoint( &p0.x, &p0.y, orient );
|
|
||||||
RotatePoint( &p1.x, &p1.y, orient );
|
|
||||||
|
|
||||||
ThickSegment( pos + p0, pos + p1, size.x, trace_mode, gbr_metadata );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
sketchOval( pos, size, orient, -1 );
|
sketchOval( pos, size, orient, -1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize,
|
void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize,
|
||||||
|
|
Loading…
Reference in New Issue