Gerber export: fix incorrect shape of round rect pads on paste layers in some cases.
They can be plotted as rect shape depending on margin value. From master branch. Fixes #16257 https://gitlab.com/kicad/code/kicad/-/issues/16257
This commit is contained in:
parent
e1c0bddff3
commit
e05b3955a5
|
@ -1,10 +1,3 @@
|
||||||
/**
|
|
||||||
* @file plot_board_layers.cpp
|
|
||||||
* @brief Functions to plot one board layer (silkscreen layers or other layers).
|
|
||||||
* Silkscreen layers have specific requirement for pads (not filled) and texts
|
|
||||||
* (with option to remove them from some copper areas (pads...)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 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.
|
||||||
*
|
*
|
||||||
|
@ -28,6 +21,12 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Functions to plot one board layer (silkscreen layers or other layers).
|
||||||
|
* Silkscreen layers have specific requirement for pads (not filled) and texts
|
||||||
|
* (with option to remove them from some copper areas (pads...)
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <eda_item.h>
|
#include <eda_item.h>
|
||||||
#include <layer_ids.h>
|
#include <layer_ids.h>
|
||||||
|
@ -448,11 +447,12 @@ void PlotStandardLayer( BOARD* aBoard, PLOTTER* aPlotter, LSET aLayerMask,
|
||||||
|
|
||||||
case PAD_SHAPE::ROUNDRECT:
|
case PAD_SHAPE::ROUNDRECT:
|
||||||
{
|
{
|
||||||
// rounding is stored as a percent, but we have to change the new radius
|
// rounding is stored as a percent, but we have to update this ratio
|
||||||
// to initial_radius + clearance to have a inflated/deflated similar shape
|
// to force recalculation of other values after size changing (we do not
|
||||||
int initial_radius = pad->GetRoundRectCornerRadius();
|
// really change the rounding percent value)
|
||||||
|
double radius_ratio = pad->GetRoundRectRadiusRatio();
|
||||||
pad->SetSize( padPlotsSize );
|
pad->SetSize( padPlotsSize );
|
||||||
pad->SetRoundRectCornerRadius( std::max( initial_radius + mask_clearance, 0 ) );
|
pad->SetRoundRectRadiusRatio( radius_ratio );
|
||||||
|
|
||||||
itemplotter.PlotPad( pad, color, padPlotMode );
|
itemplotter.PlotPad( pad, color, padPlotMode );
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue