diff --git a/common/plotters/GERBER_plotter.cpp b/common/plotters/GERBER_plotter.cpp index c1c2fa540a..06b3065f48 100644 --- a/common/plotters/GERBER_plotter.cpp +++ b/common/plotters/GERBER_plotter.cpp @@ -754,31 +754,12 @@ void GERBER_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, doub // The pad is reduced to an segment with dy > dx int delta = size.y - size.x; - int x0 = 0; - int y0 = -delta / 2; - int x1 = 0; - int y1 = delta / 2; - RotatePoint( &x0, &y0, orient ); - RotatePoint( &x1, &y1, orient ); - GBR_METADATA metadata; + wxPoint p0( 0, -delta / 2 ); + wxPoint p1( 0, delta / 2 ); + RotatePoint( &p0.x, &p0.y, orient ); + RotatePoint( &p1.x, &p1.y, orient ); - if( gbr_metadata ) - { - metadata = *gbr_metadata; - - // If the pad is drawn on a copper layer, - // set attribute to GBR_APERTURE_ATTRIB_CONDUCTOR - if( metadata.IsCopper() ) - metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CONDUCTOR ); - - // Clear .P attribute, only allowed for flashed items - wxString attrname( ".P" ); - 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 ); + ThickSegment( pos + p0, pos + p1, size.x, trace_mode, gbr_metadata ); } else sketchOval( pos, size, orient, -1 ); diff --git a/gerbview/readgerb.cpp b/gerbview/readgerb.cpp index 23265ab06b..48e097baaf 100644 --- a/gerbview/readgerb.cpp +++ b/gerbview/readgerb.cpp @@ -74,6 +74,7 @@ bool GERBVIEW_FRAME::Read_GERBER_File( const wxString& GERBER_FullFileName ) dlg.ShowModal(); } +#if 0 // Outdated warning /* if the gerber file is only a RS274D file * (i.e. without any aperture information, but with items), warn the user: */ @@ -84,6 +85,7 @@ bool GERBVIEW_FRAME::Read_GERBER_File( const wxString& GERBER_FullFileName ) "Therefore the size of items is undefined"); wxMessageBox( msg ); } +#endif auto canvas = GetGalCanvas(); diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index f7b421031f..f6b931e1bb 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -739,9 +739,7 @@ void BRDITEMS_PLOTTER::PlotDrawSegment( DRAWSEGMENT* aSeg ) GBR_METADATA gbr_metadata; - bool isOnCopperLayer = ( m_layerMask & LSET::AllCuMask() ).any(); - - if( isOnCopperLayer && aSeg->GetLayer() == Edge_Cuts ) // can happens when plotting copper layers + if( aSeg->GetLayer() == Edge_Cuts ) { gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_EDGECUT ); }