diff --git a/common/render_settings.cpp b/common/render_settings.cpp index ad4c876749..ebff636d6f 100644 --- a/common/render_settings.cpp +++ b/common/render_settings.cpp @@ -50,24 +50,28 @@ RENDER_SETTINGS::~RENDER_SETTINGS() } -constexpr double visualCorrection = 0.8; +#if 0 +constexpr double correction = 0.8; // Looks best visually +#else +constexpr double correction = 1.0; // Matches ISO 128-2 +#endif double RENDER_SETTINGS::GetDashLength( int aLineWidth ) const { - return std::max( m_dashLengthRatio - visualCorrection, 1.0 ) * aLineWidth; + return std::max( m_dashLengthRatio - correction, 1.0 ) * aLineWidth; } double RENDER_SETTINGS::GetDotLength( int aLineWidth ) const { - return ( 1.0 - visualCorrection ) * aLineWidth; + return ( 1.0 - correction ) * aLineWidth; } double RENDER_SETTINGS::GetGapLength( int aLineWidth ) const { - return std::max( m_gapLengthRatio + visualCorrection, 1.0 ) * aLineWidth; + return std::max( m_gapLengthRatio + correction, 1.0 ) * aLineWidth; } diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 3bb8524138..1774f8c0e5 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -86,8 +86,8 @@ SCH_RENDER_SETTINGS::SCH_RENDER_SETTINGS() : m_JunctionSize( DEFAULT_JUNCTION_DIAM * IU_PER_MILS ) { SetDefaultPenWidth( DEFAULT_LINE_WIDTH_MILS * IU_PER_MILS ); - SetDashLengthRatio( 5 ); - SetGapLengthRatio( 3 ); + SetDashLengthRatio( 12 ); // From ISO 128-2 + SetGapLengthRatio( 3 ); // From ISO 128-2 m_minPenWidth = ADVANCED_CFG::GetCfg().m_MinPlotPenWidth * IU_PER_MM; } diff --git a/eeschema/schematic_settings.cpp b/eeschema/schematic_settings.cpp index 4f43374dad..248b5ad751 100644 --- a/eeschema/schematic_settings.cpp +++ b/eeschema/schematic_settings.cpp @@ -50,7 +50,7 @@ SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::strin m_IntersheetRefsFormatShort( false ), m_IntersheetRefsPrefix( DEFAULT_IREF_PREFIX ), m_IntersheetRefsSuffix( DEFAULT_IREF_SUFFIX ), - m_DashedLineDashRatio( 5.0 ), + m_DashedLineDashRatio( 12.0 ), m_DashedLineGapRatio( 3.0 ), m_SpiceAdjustPassiveValues( false ), m_NgspiceSimulatorSettings( nullptr ) @@ -92,10 +92,10 @@ SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::strin &m_IntersheetRefsSuffix, defaultIntersheetsRefSuffix ) ); m_params.emplace_back( new PARAM( "drawing.dashed_lines_dash_length_ratio", - &m_DashedLineDashRatio, 5.0 ) ); + &m_DashedLineDashRatio, 12.0 ) ); // Default from ISO 128-2 m_params.emplace_back( new PARAM( "drawing.dashed_lines_gap_length_ratio", - &m_DashedLineGapRatio, 3.0 ) ); + &m_DashedLineGapRatio, 3.0 ) ); // Default from ISO 128-2 m_params.emplace_back( new PARAM_SCALED( "drawing.default_line_thickness", &m_DefaultLineWidth, Mils2iu( defaultLineThickness ), Mils2iu( 5 ), Mils2iu( 1000 ), diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 364e77cfed..d91699215a 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -82,8 +82,8 @@ PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() for( unsigned int i = 0; i < arrayDim( m_sketchMode ); ++i ) m_sketchMode[i] = false; - SetDashLengthRatio( 5 ); - SetGapLengthRatio( 3 ); + SetDashLengthRatio( 12 ); // From ISO 128-2 + SetGapLengthRatio( 3 ); // From ISO 128-2 update(); } diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index 6f45783c13..618e46eed2 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -96,8 +96,8 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() m_includeGerberNetlistInfo = true; m_createGerberJobFile = true; m_gerberPrecision = gbrDefaultPrecision; - m_dashedLineDashRatio = 5.0; - m_dashedLineGapRatio = 3.0; + m_dashedLineDashRatio = 12.0; // From ISO 128-2 + m_dashedLineGapRatio = 3.0; // From ISO 128-2 // we used 0.1mils for SVG step before, but nm precision is more accurate, so we use nm m_svgPrecision = SVG_PRECISION_DEFAULT;