diff --git a/common/pcb.keywords b/common/pcb.keywords index 57b2526938..8000e090b7 100644 --- a/common/pcb.keywords +++ b/common/pcb.keywords @@ -76,6 +76,8 @@ dielectric_constraints dimension diff_pair_width diff_pair_gap +dimension_precision +dimension_units drawings drill edge diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index c31d7628cd..a42c9ef2b0 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -634,6 +634,9 @@ void PCB_IO::formatDefaults( const BOARD_DESIGN_SETTINGS& aSettings, int aNestLe aSettings.m_TextItalic[ LAYER_CLASS_OTHERS ] ? " italic" : "", aSettings.m_TextUpright[ LAYER_CLASS_OTHERS ] ? " keep_upright" : "" ); + m_out->Print( aNestLevel+1, "(dimension_units %d)\n", aSettings.m_DimensionUnits ); + m_out->Print( aNestLevel+1, "(dimension_precision %d)\n", aSettings.m_DimensionPrecision ); + m_out->Print( aNestLevel, ")\n" ); } diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 826e710fe8..45009fb680 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -1725,6 +1725,16 @@ void PCB_PARSER::parseDefaults( BOARD_DESIGN_SETTINGS& designSettings ) parseDefaultTextDims( designSettings, LAYER_CLASS_OTHERS ); break; + case T_dimension_units: + designSettings.m_DimensionUnits = parseInt( "dimension units" ); + NeedRIGHT(); + break; + + case T_dimension_precision: + designSettings.m_DimensionPrecision = parseInt( "dimension precision" ); + NeedRIGHT(); + break; + default: Unexpected( CurText() ); }