Gerber job file: fix a bug that prevent writing dielectric constants for impedance controlled boards.

This commit is contained in:
jean-pierre charras 2021-09-26 16:10:17 +02:00
parent 5bf042fcc1
commit 5853f0890e
2 changed files with 8 additions and 2 deletions

View File

@ -476,6 +476,9 @@ bool BOARD_STACKUP::SynchronizeWithBoard( BOARD_DESIGN_SETTINGS* aSettings )
}
}
// Transfert layer settings:
*this = stackup;
// Transfer other stackup settings from aSettings
const BOARD_STACKUP& source_stackup = aSettings->GetStackupDescriptor();
m_HasDielectricConstrains = source_stackup.m_HasDielectricConstrains;
@ -484,8 +487,6 @@ bool BOARD_STACKUP::SynchronizeWithBoard( BOARD_DESIGN_SETTINGS* aSettings )
m_EdgePlating = source_stackup.m_EdgePlating;
m_FinishType = source_stackup.m_FinishType;
*this = stackup;
return change;
}

View File

@ -50,6 +50,7 @@
#include <reporter.h>
#include <wildcards_and_files_ext.h>
GERBER_JOBFILE_WRITER::GERBER_JOBFILE_WRITER( BOARD* aPcb, REPORTER* aReporter )
{
m_pcb = aPcb;
@ -287,6 +288,9 @@ void GERBER_JOBFILE_WRITER::addJSONGeneralSpecs()
if( !brd_stackup.m_FinishType.IsEmpty() )
m_json["GeneralSpecs"]["Finish"] = brd_stackup.m_FinishType;
if( brd_stackup.m_HasDielectricConstrains )
m_json["GeneralSpecs"]["ImpedanceControlled"] = true;
if( brd_stackup.m_CastellatedPads )
m_json["GeneralSpecs"]["Castellated"] = true;
@ -666,6 +670,7 @@ void GERBER_JOBFILE_WRITER::addJSONMaterialStackup()
// These constrains are only written if the board has impedance controlled tracks.
// If the board is not impedance controlled, they are useless.
// Do not add constrains that create more expensive boards.
if( brd_stackup.m_HasDielectricConstrains )
{
// Generate Epsilon R if > 1.0 (value <= 1.0 means not specified: it is not