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
This commit is contained in:
Seth Hillbrand 2022-02-25 11:11:36 -08:00
parent d29d981784
commit 54f621c570
1 changed files with 3 additions and 1 deletions

View File

@ -431,7 +431,9 @@ std::vector<BOARD_ITEM*> 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<PCB_TEXT*>( dataStyle->Duplicate() );
t->SetText( _( "Board overall dimensions: " ) );
colLabel1.push_back( t );