mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-20 11:21:41 +00:00
Pcbnew: dimension suppress zeros by default
Per ASME-Y14.5-2009 section 2.3, trailing zeroes are not used for metric dimensions, which are probably most common. Unit suffixes are also not used in every dimension when specified as a global default, which is also common (usally in the fab notes). This appears to be common defaults in other EDA software. This is also compatible with ISO 129-1 section 4.3. In Pcbnew, this is only the default until the user sets it in the board settings, so existing designs will always keep their set values.
This commit is contained in:
parent
2f2f445043
commit
7fe69c8ac5
@ -124,8 +124,8 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
|
||||
|
||||
m_DimensionPrecision = DIM_PRECISION::X_XXXX;
|
||||
m_DimensionUnitsMode = DIM_UNITS_MODE::AUTOMATIC;
|
||||
m_DimensionUnitsFormat = DIM_UNITS_FORMAT::BARE_SUFFIX;
|
||||
m_DimensionSuppressZeroes = false;
|
||||
m_DimensionUnitsFormat = DIM_UNITS_FORMAT::NO_SUFFIX;
|
||||
m_DimensionSuppressZeroes = true;
|
||||
m_DimensionTextPosition = DIM_TEXT_POSITION::OUTSIDE;
|
||||
m_DimensionKeepTextAligned = true;
|
||||
m_DimensionArrowLength = pcbIUScale.MilsToIU( DEFAULT_DIMENSION_ARROW_LENGTH );
|
||||
@ -799,11 +799,11 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
|
||||
&m_DimensionPrecision, DIM_PRECISION::X_XXXX, DIM_PRECISION::X, DIM_PRECISION::V_VVVVV ) );
|
||||
|
||||
m_params.emplace_back( new PARAM_ENUM<DIM_UNITS_FORMAT>( "defaults.dimensions.units_format",
|
||||
&m_DimensionUnitsFormat, DIM_UNITS_FORMAT::BARE_SUFFIX, DIM_UNITS_FORMAT::NO_SUFFIX,
|
||||
&m_DimensionUnitsFormat, DIM_UNITS_FORMAT::NO_SUFFIX, DIM_UNITS_FORMAT::NO_SUFFIX,
|
||||
DIM_UNITS_FORMAT::PAREN_SUFFIX ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "defaults.dimensions.suppress_zeroes",
|
||||
&m_DimensionSuppressZeroes, false ) );
|
||||
&m_DimensionSuppressZeroes, true ) );
|
||||
|
||||
// NOTE: excluding DIM_TEXT_POSITION::MANUAL from the valid range here
|
||||
m_params.emplace_back( new PARAM_ENUM<DIM_TEXT_POSITION>( "defaults.dimensions.text_position",
|
||||
|
@ -25,12 +25,14 @@
|
||||
#include <lset.h>
|
||||
#include <pgm_base.h>
|
||||
#include <eda_text.h>
|
||||
#include <pcb_dimension.h>
|
||||
#include <settings/common_settings.h>
|
||||
#include <settings/json_settings_internals.h>
|
||||
#include <settings/parameters.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <wx/config.h>
|
||||
#include <base_units.h>
|
||||
|
||||
#include <wx/config.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user