From 5b44e80355d63e104326d87497f8fa1e9149c653 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 3 May 2018 18:27:02 +0200 Subject: [PATCH] Fix incorrect gerber job file syntax, when a board has inner layers. --- pcbnew/exporters/gerber_jobfile_writer.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pcbnew/exporters/gerber_jobfile_writer.cpp b/pcbnew/exporters/gerber_jobfile_writer.cpp index b10104d025..a475d46732 100644 --- a/pcbnew/exporters/gerber_jobfile_writer.cpp +++ b/pcbnew/exporters/gerber_jobfile_writer.cpp @@ -541,19 +541,17 @@ void GERBER_JOBFILE_WRITER::addJSONDesignRules() minclearanceOuter*m_conversionUnits ) ); removeJSONSepararator(); // remove the last separator - closeBlock(); + + if( !hasInnerLayers ) + closeBlock(); + else + closeBlockWithSep(); if( hasInnerLayers ) { - closeBlockWithSep(); - openBlock(); addJSONObject( "\"Layers\": \"Inner\",\n" ); - - addJSONObject( "\"Values\":\n" ); - openBlock(); - addJSONObject( wxString::Format( "\"PadToPad\": %.3f,\n", minPadClearanceInner*m_conversionUnits ) ); addJSONObject( wxString::Format( "\"PadToTrack\": %.3f,\n", minPadClearanceInner*m_conversionUnits ) ); addJSONObject( wxString::Format( "\"TrackToTrack\": %.3f,\n", minclearance_track2track*m_conversionUnits ) );