From 4d89061d4c69906a7bf1735e27b724b09e370472 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Sun, 10 Oct 2021 16:25:19 +0100 Subject: [PATCH] Support footprint arcs in convert to polygon Fixes https://gitlab.com/kicad/code/kicad/issues/9352 --- pcbnew/tools/convert_tool.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pcbnew/tools/convert_tool.cpp b/pcbnew/tools/convert_tool.cpp index d3fadb3291..31949c7de0 100644 --- a/pcbnew/tools/convert_tool.cpp +++ b/pcbnew/tools/convert_tool.cpp @@ -306,9 +306,9 @@ SHAPE_POLY_SET CONVERT_TOOL::makePolysFromSegs( const std::deque& aIt auto insert = [&]( EDA_ITEM* aItem, VECTOR2I aAnchor, bool aDirection ) { - if( aItem->Type() == PCB_ARC_T || - ( aItem->Type() == PCB_SHAPE_T && - static_cast( aItem )->GetShape() == SHAPE_T::ARC ) ) + if( aItem->Type() == PCB_ARC_T + || ( ( aItem->Type() == PCB_SHAPE_T || aItem->Type() == PCB_FP_SHAPE_T ) + && static_cast( aItem )->GetShape() == SHAPE_T::ARC ) ) { SHAPE_ARC arc; @@ -376,9 +376,9 @@ SHAPE_POLY_SET CONVERT_TOOL::makePolysFromSegs( const std::deque& aIt // Start with the first object and walk "right" // Note if the first object is an arc, we don't need to insert its first point here, the // whole arc will be inserted at anchor B inside process() - if( !( candidate->Type() == PCB_ARC_T || - ( candidate->Type() == PCB_SHAPE_T && - static_cast( candidate )->GetShape() == SHAPE_T::ARC ) ) ) + if( !( candidate->Type() == PCB_ARC_T + || ( ( candidate->Type() == PCB_SHAPE_T || candidate->Type() == PCB_FP_SHAPE_T ) + && static_cast( candidate )->GetShape() == SHAPE_T::ARC ) ) ) { insert( candidate, anchors->A, true ); }