Gerber place files: do not quote strings (fields, pad name, pad function ...)
Double quotes have no special meaning, so adding them modify the texts
This commit is contained in:
parent
fefb3d96dd
commit
71475a4b56
|
@ -126,7 +126,8 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER
|
||||||
|
|
||||||
brd_plotter.SetLayerSet( LSET( aLayer ) );
|
brd_plotter.SetLayerSet( LSET( aLayer ) );
|
||||||
int cmp_count = 0;
|
int cmp_count = 0;
|
||||||
bool allowUtf8 = true;
|
const bool allowUtf8 = true;
|
||||||
|
const bool quoteOption = false;
|
||||||
|
|
||||||
// Plot components data: position, outlines, pad1 and other pads.
|
// Plot components data: position, outlines, pad1 and other pads.
|
||||||
for( FOOTPRINT* footprint : fp_list )
|
for( FOOTPRINT* footprint : fp_list )
|
||||||
|
@ -136,9 +137,9 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER
|
||||||
metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CMP_POSITION );
|
metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CMP_POSITION );
|
||||||
|
|
||||||
// Add object attribute: component reference to flash (mainly useful for users)
|
// Add object attribute: component reference to flash (mainly useful for users)
|
||||||
// using quoted UTF8 string
|
// using not quoted UTF8 string
|
||||||
wxString ref = ConvertNotAllowedCharsInGerber( footprint->Reference().GetShownText( false ),
|
wxString ref = ConvertNotAllowedCharsInGerber( footprint->Reference().GetShownText( false ),
|
||||||
allowUtf8, true );
|
allowUtf8, quoteOption );
|
||||||
|
|
||||||
metadata.SetCmpReference( ref );
|
metadata.SetCmpReference( ref );
|
||||||
metadata.SetNetAttribType( GBR_NETLIST_METADATA::GBR_NETINFO_CMP );
|
metadata.SetNetAttribType( GBR_NETLIST_METADATA::GBR_NETINFO_CMP );
|
||||||
|
@ -159,15 +160,15 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER
|
||||||
|
|
||||||
// Add component value info:
|
// Add component value info:
|
||||||
pnpAttrib.m_Value = ConvertNotAllowedCharsInGerber( footprint->Value().GetShownText( false ),
|
pnpAttrib.m_Value = ConvertNotAllowedCharsInGerber( footprint->Value().GetShownText( false ),
|
||||||
allowUtf8, true );
|
allowUtf8, quoteOption );
|
||||||
|
|
||||||
// Add component footprint info:
|
// Add component footprint info:
|
||||||
wxString fp_info = From_UTF8( footprint->GetFPID().GetLibItemName().c_str() );
|
wxString fp_info = From_UTF8( footprint->GetFPID().GetLibItemName().c_str() );
|
||||||
pnpAttrib.m_Footprint = ConvertNotAllowedCharsInGerber( fp_info, allowUtf8, true );
|
pnpAttrib.m_Footprint = ConvertNotAllowedCharsInGerber( fp_info, allowUtf8, quoteOption );
|
||||||
|
|
||||||
// Add footprint lib name:
|
// Add footprint lib name:
|
||||||
fp_info = From_UTF8( footprint->GetFPID().GetLibNickname().c_str() );
|
fp_info = From_UTF8( footprint->GetFPID().GetLibNickname().c_str() );
|
||||||
pnpAttrib.m_LibraryName = ConvertNotAllowedCharsInGerber( fp_info, allowUtf8, true );
|
pnpAttrib.m_LibraryName = ConvertNotAllowedCharsInGerber( fp_info, allowUtf8, quoteOption );
|
||||||
|
|
||||||
metadata.m_NetlistMetadata.SetExtraData( pnpAttrib.FormatCmpPnPMetadata() );
|
metadata.m_NetlistMetadata.SetExtraData( pnpAttrib.FormatCmpPnPMetadata() );
|
||||||
|
|
||||||
|
@ -238,8 +239,8 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER
|
||||||
for( PAD* pad1 : pad_key_list )
|
for( PAD* pad1 : pad_key_list )
|
||||||
{
|
{
|
||||||
metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_PAD1_POS );
|
metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_PAD1_POS );
|
||||||
metadata.SetPadName( pad1->GetNumber(), allowUtf8, true );
|
metadata.SetPadName( pad1->GetNumber(), allowUtf8, quoteOption );
|
||||||
metadata.SetPadPinFunction( pad1->GetPinFunction(), allowUtf8, true );
|
metadata.SetPadPinFunction( pad1->GetPinFunction(), allowUtf8, quoteOption );
|
||||||
metadata.SetNetAttribType( GBR_NETLIST_METADATA::GBR_NETINFO_PAD );
|
metadata.SetNetAttribType( GBR_NETLIST_METADATA::GBR_NETINFO_PAD );
|
||||||
|
|
||||||
// Flashes a diamond at pad position:
|
// Flashes a diamond at pad position:
|
||||||
|
@ -274,8 +275,8 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER
|
||||||
if( !pad->IsOnLayer( aLayer ) )
|
if( !pad->IsOnLayer( aLayer ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
metadata.SetPadName( pad->GetNumber(), allowUtf8, true );
|
metadata.SetPadName( pad->GetNumber(), allowUtf8, quoteOption );
|
||||||
metadata.SetPadPinFunction( pad->GetPinFunction(), allowUtf8, true );
|
metadata.SetPadPinFunction( pad->GetPinFunction(), allowUtf8, quoteOption );
|
||||||
|
|
||||||
// Flashes a round, 0 sized round shape at pad position
|
// Flashes a round, 0 sized round shape at pad position
|
||||||
plotter.FlashPadCircle( pad->GetPosition(), other_pads_mark_size, FILLED, &metadata );
|
plotter.FlashPadCircle( pad->GetPosition(), other_pads_mark_size, FILLED, &metadata );
|
||||||
|
|
Loading…
Reference in New Issue