From dd929c7b2e6263278d5f2f26aeda2df3d212d09e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 9 Oct 2020 17:33:43 +0200 Subject: [PATCH] Gen drill map file: ensure plot works when the edge cut layer is not visible Fixes #5912 https://gitlab.com/kicad/code/kicad/issues/5912 --- pcbnew/exporters/gen_drill_report_files.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/exporters/gen_drill_report_files.cpp b/pcbnew/exporters/gen_drill_report_files.cpp index 3757f645b6..5ae00e0aa0 100644 --- a/pcbnew/exporters/gen_drill_report_files.cpp +++ b/pcbnew/exporters/gen_drill_report_files.cpp @@ -79,8 +79,12 @@ bool GENDRILL_WRITER_BASE::genDrillMapFile( const wxString& aFullFileName, PLOT_ const PAGE_INFO& page_info = m_pageInfo ? *m_pageInfo : dummy; - // Calculate dimensions and center of PCB + // Calculate dimensions and center of PCB. The Edge_Cuts layer must be visible + // to calculate the board edges bounding box + LSET visibleLayers = m_pcb->GetVisibleLayers(); + m_pcb->SetVisibleLayers( visibleLayers | LSET( Edge_Cuts ) ); EDA_RECT bbbox = m_pcb->GetBoardEdgesBoundingBox(); + m_pcb->SetVisibleLayers( visibleLayers ); // Calculate the scale for the format type, scale 1 in HPGL, drawing on // an A4 sheet in PS, + text description of symbols