From 9c50a9fa4ad5ddda80f1c716b07dc042e56efcdd Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 15 Jul 2022 17:42:31 +0200 Subject: [PATCH] FP_SHAPE in pads: always specify fill mode for shapes that can be filled or not. From Master branch --- pcbnew/plugins/kicad/pcb_plugin.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pcbnew/plugins/kicad/pcb_plugin.cpp b/pcbnew/plugins/kicad/pcb_plugin.cpp index 3aed58ebc1..6cc0f614b7 100644 --- a/pcbnew/plugins/kicad/pcb_plugin.cpp +++ b/pcbnew/plugins/kicad/pcb_plugin.cpp @@ -1726,8 +1726,17 @@ void PCB_PLUGIN::format( const PAD* aPad, int aNestLevel ) const m_out->Print( 0, " (width %s)", FormatInternalUnits( primitive->GetWidth() ).c_str() ); - if( primitive->IsFilled() ) - m_out->Print( 0, " (fill yes)" ); + // The filled flag represents if a solid fill is present on circles, + // rectangles and polygons + if( ( primitive->GetShape() == SHAPE_T::POLY ) + || ( primitive->GetShape() == SHAPE_T::RECT ) + || ( primitive->GetShape() == SHAPE_T::CIRCLE ) ) + { + if( primitive->IsFilled() ) + m_out->Print( 0, " (fill yes)" ); + else + m_out->Print( 0, " (fill none)" ); + } m_out->Print( 0, ")" ); }