From 1a3f6028f895d95ab47e07d5ac0702798c28b99a Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sat, 30 Aug 2025 08:33:17 -0700 Subject: [PATCH] Fix missed last points Fixes https://gitlab.com/kicad/code/kicad/-/issues/21596 --- common/eda_shape.cpp | 2 ++ pcbnew/plot_brditems_plotter.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/eda_shape.cpp b/common/eda_shape.cpp index 581ff3bd1d..d0c5580a33 100644 --- a/common/eda_shape.cpp +++ b/common/eda_shape.cpp @@ -1844,6 +1844,8 @@ std::vector EDA_SHAPE::makeEffectiveShapes( bool aEdgeOnly, bool aLineCh for( int i = 0; i < outline.PointCount() - 1; ++i ) effectiveShapes.emplace_back( new SHAPE_SEGMENT( outline.CPoint( i ), outline.CPoint( i + 1 ), width ) ); + + effectiveShapes.emplace_back( new SHAPE_SEGMENT( outline.CPoint( outline.PointCount() - 1 ), outline.CPoint( 0 ), width ) ); } } else diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index dd1bc24a1e..b3560934bf 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -1102,7 +1102,7 @@ void BRDITEMS_PLOTTER::PlotShape( const PCB_SHAPE* aShape ) SHAPE_POLY_SET poly; poly.NewOutline(); - for( int ii = 0; ii < outline.PointCount() - 1; ++ii ) + for( int ii = 0; ii < outline.PointCount(); ++ii ) poly.Append( outline.CPoint( ii ) ); if( margin < 0 )