From 0184dfb625450200be729524dba4587cbbdb539c Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Fri, 23 Feb 2024 22:13:59 +0300 Subject: [PATCH] Do not call MakeShapes in AddCopperPolygonShapes when polyset is empty. Ease of debugging. --- pcbnew/exporters/step/step_pcb_model.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/exporters/step/step_pcb_model.cpp b/pcbnew/exporters/step/step_pcb_model.cpp index a714831ffc..5da97c6409 100644 --- a/pcbnew/exporters/step/step_pcb_model.cpp +++ b/pcbnew/exporters/step/step_pcb_model.cpp @@ -323,6 +323,9 @@ bool STEP_PCB_MODEL::AddCopperPolygonShapes( const SHAPE_POLY_SET* aPolyShapes, { bool success = true; + if( aPolyShapes->IsEmpty() ) + return true; + double z_pos = aOnTop ? m_boardThickness : -m_copperThickness; if( !MakeShapes( aTrack ? m_board_copper_tracks : m_board_copper_zones, *aPolyShapes,