From 8a56d3e2b9764f391e0544bce7960e042b2ab603 Mon Sep 17 00:00:00 2001 From: John Beard <john.j.beard@gmail.com> Date: Mon, 25 Nov 2024 09:52:41 +0800 Subject: [PATCH] Fabmaster: handle circular zone cutouts --- pcbnew/pcb_io/fabmaster/import_fabmaster.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pcbnew/pcb_io/fabmaster/import_fabmaster.cpp b/pcbnew/pcb_io/fabmaster/import_fabmaster.cpp index f17cda02d3..8bdc2b1e21 100644 --- a/pcbnew/pcb_io/fabmaster/import_fabmaster.cpp +++ b/pcbnew/pcb_io/fabmaster/import_fabmaster.cpp @@ -2865,11 +2865,17 @@ bool FABMASTER::loadZone( BOARD* aBoard, const std::unique_ptr<FABMASTER::TRACE> zone_outline->Append( src->end_x, src->end_y, 0, hole_idx ); } - else if( seg->shape == GR_SHAPE_ARC ) + else if( seg->shape == GR_SHAPE_ARC || seg->shape == GR_SHAPE_CIRCLE ) { + /* Even if it says "circle", it's actually an arc, it's just closed */ const GRAPHIC_ARC* src = static_cast<const GRAPHIC_ARC*>( seg.get() ); zone_outline->Hole( 0, hole_idx ).Append( src->result ); } + else + { + wxASSERT_MSG( false, + wxString::Format( "Invalid shape type %d in zone outline", seg->shape ) ); + } } if( zone_outline->Outline( 0 ).PointCount() >= 3 )