Gerber plot: minor fixes in TO object attributes.
Gerbview: remove a outdated warning about RS274D format.
This commit is contained in:
parent
26d0863921
commit
e04d82e940
|
@ -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 );
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue