Gerber, Dialog plot: add option to disable Aperture Macro use.

Some broken Gerber readers cannot handle Aperture Macros without errors
although this feature exists since the beginning of RS274X format.
This commit is contained in:
jean-pierre charras
2020-10-10 16:42:21 +02:00
parent 1df13ce32b
commit 213a74cbe6
10 changed files with 162 additions and 39 deletions
+10
View File
@@ -98,6 +98,7 @@ static bool setDouble( double* aTarget, double aValue, double aMin, double aMax
PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
{
m_useGerberProtelExtensions = false;
m_gerberDisableApertMacros = false;
m_useGerberX2format = true;
m_includeGerberNetlistInfo = true;
m_createGerberJobFile = true;
@@ -176,6 +177,9 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,
aFormatter->Print( aNestLevel+1, "(%s 0x%s)\n", getTokenName( T_layerselection ),
m_layerSelection.FmtHex().c_str() );
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_disableapertmacros ),
m_gerberDisableApertMacros ? trueStr : falseStr );
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ),
m_useGerberProtelExtensions ? trueStr : falseStr );
@@ -262,6 +266,8 @@ bool PCB_PLOT_PARAMS::IsSameAs( const PCB_PLOT_PARAMS &aPcbPlotParams, bool aCom
return false;
if( m_useGerberProtelExtensions != aPcbPlotParams.m_useGerberProtelExtensions )
return false;
if( m_gerberDisableApertMacros != aPcbPlotParams.m_gerberDisableApertMacros )
return false;
if( m_useGerberX2format != aPcbPlotParams.m_useGerberX2format )
return false;
if( m_includeGerberNetlistInfo != aPcbPlotParams.m_includeGerberNetlistInfo )
@@ -419,6 +425,10 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams )
}
break;
case T_disableapertmacros:
aPcbPlotParams->m_gerberDisableApertMacros = parseBool();
break;
case T_usegerberextensions:
aPcbPlotParams->m_useGerberProtelExtensions = parseBool();
break;