From e9c0dc1a2b57524259da0799d1d298549a65331a Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 24 Sep 2016 18:37:06 +0200 Subject: [PATCH] Fix a minor issue when creating net attributes in Gerber files for oval pads when they are not horizontal or vertical . --- common/common_plotGERBER_functions.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index 8ce8b432a9..ecdb57eb99 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -688,6 +688,11 @@ void GERBER_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, doub { // TODO: use an aperture macro to declare the rotated pad // + + // Flash a pad anchor, if a netlist attribute is set + if( aData ) + FlashPadCircle( pos, size.x, trace_mode, aData ); + // The pad is reduced to an segment with dy > dx delta = size.y - size.x; x0 = 0; @@ -703,17 +708,14 @@ void GERBER_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, doub metadata = *gbr_metadata; metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CONDUCTOR ); + // Cleat .P attribute, only allowed for flashed items wxString attrname( ".P" ); - metadata.m_NetlistMetadata.ClearAttribute( &attrname ); // not allowed on inner layers + metadata.m_NetlistMetadata.ClearAttribute( &attrname ); } ThickSegment( wxPoint( pos.x + x0, pos.y + y0 ), wxPoint( pos.x + x1, pos.y + y1 ), size.x, trace_mode, &metadata ); - - // Now, flash a pad anchor, if a netlist attribute is set - if( aData ) - FlashPadCircle( pos, size.x, trace_mode, aData ); } else {