From 283aaff2dff43fc144025b922806e81688e2b24f Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 25 Feb 2022 11:11:36 -0800 Subject: [PATCH] Use board polygon instead of bbox for size Board BBox uses the visible size of the board, which includes edge cut thickness. This is not appropriate for the Board characteristics. Using the outline polygon gives accurate results and falls back to a bounding box in the case where the outline is invalid Fixes https://gitlab.com/kicad/code/kicad/issues/10972 (cherry picked from commit 54f621c570174e08dbc3359effb46ae66cf275c6) --- pcbnew/tools/drawing_stackup_table_tool.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/drawing_stackup_table_tool.cpp b/pcbnew/tools/drawing_stackup_table_tool.cpp index aaeeb88175..db3fba6902 100644 --- a/pcbnew/tools/drawing_stackup_table_tool.cpp +++ b/pcbnew/tools/drawing_stackup_table_tool.cpp @@ -431,7 +431,9 @@ std::vector DRAWING_TOOL::DrawBoardCharacteristics( const wxPoint& t->SetText( StringFromValue( EDA_UNITS::UNSCALED, settings.GetCopperLayerCount(), false ) ); colData1.push_back( t ); - EDA_RECT size = m_frame->GetBoard()->ComputeBoundingBox( true ); + SHAPE_POLY_SET outline; + m_frame->GetBoard()->GetBoardPolygonOutlines( outline ); + BOX2I size = outline.BBox(); t = static_cast( dataStyle->Duplicate() ); t->SetText( _( "Board overall dimensions: " ) ); colLabel1.push_back( t );