Commit 96a77d76 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Pcbnew: Add a min width parameter to plot solder mask layers.

* If this param is set to 0, the previous behavior is used.
* Else the solder mask is plotted as polygon, with shapes near than  this min width value are  merged.
Pcbnew in nanometer version: fix a serious rounding issue due to the fact dialogs were using 4 digits for mantissa.
* This is not enough for nanometer coordinates ( 8 are needed to display a value in inches),
*  so sometimes after closing a dialog, some coordinates were modified, although no new value was entered.
Minor other bug fixed.
parents 31e58d87 703293fa
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -427,6 +427,7 @@ set( BMAPS_MID
    ortho
    ortho
    pad_sketch
    pad_sketch
    pad
    pad
    pad_dimensions
    pads_mask_layers
    pads_mask_layers
    palette
    palette
    part_properties
    part_properties
+84 −0
Original line number Original line Diff line number Diff line

/* Do not modify this file, it was automatically generated by the
 * PNG2cpp CMake script, using a *.png file as input.
 */

#include <bitmaps.h>

static const unsigned char png[] = {
 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
 0xce, 0x00, 0x00, 0x04, 0x35, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x9d, 0x95, 0x5d, 0x6c, 0x14,
 0x55, 0x14, 0x80, 0xf7, 0xa7, 0xdd, 0xba, 0x3f, 0x33, 0x73, 0xa7, 0xdb, 0x9d, 0x69, 0xeb, 0x02,
 0x16, 0x46, 0xda, 0x6d, 0x67, 0xfb, 0x60, 0x25, 0x14, 0xd1, 0x80, 0x82, 0x46, 0x48, 0x94, 0x46,
 0x20, 0x60, 0x10, 0xf4, 0x41, 0x20, 0xfe, 0xbd, 0xc0, 0x83, 0x21, 0x15, 0x53, 0x51, 0xcc, 0x4a,
 0xe5, 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x7e, 0xd2, 0xf7, 0xb4, 0xf7, 0x3d, 0xa9, 0xde, 0xff, 0xad,
 0xb0, 0xc3, 0x77, 0xae, 0xe0, 0x11, 0x4f, 0xa7, 0x4b, 0x70, 0xd1, 0xe4, 0x07, 0xd8, 0x2a, 0x76,
 0x22, 0xf4, 0x03, 0x2d, 0x47, 0x44, 0xfe, 0x7e, 0xca, 0x29, 0xe2, 0x64, 0x05, 0xac, 0xde, 0x74,
 0xa6, 0x2b, 0x91, 0x8d, 0x6c, 0xb3, 0xb7, 0xb1, 0x15, 0xac, 0x46, 0x68, 0x5f, 0x2b, 0x65, 0x13,
 0x73, 0xd9, 0xe6, 0x9a, 0x49, 0xc4, 0xef, 0x19, 0x2d, 0x25, 0xbd, 0x6f, 0x90, 0x30, 0xdb, 0x03,
 0x0d, 0x99, 0xcb, 0x26, 0xe1, 0x67, 0x31, 0xce, 0xac, 0x79, 0x72, 0x89, 0xd2, 0x84, 0x2e, 0x96,
 0x30, 0x9f, 0x91, 0x97, 0x2a, 0xd3, 0x4c, 0x12, 0xca, 0xbf, 0x3d, 0x4e, 0xfc, 0x16, 0xbb, 0x02,
 0x66, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};

const BITMAP_OPAQUE pad_dimensions_xpm[1] = {{ png, sizeof( png ), "pad_dimensions_xpm" }};

//EOF
+247 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   height="48"
   width="48"
   version="1.1"
   id="svg3054"
   inkscape:version="0.48.2 r9819"
   sodipodi:docname="pad.svg">
  <metadata
     id="metadata3081">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <sodipodi:namedview
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1"
     objecttolerance="10"
     gridtolerance="10"
     guidetolerance="10"
     inkscape:pageopacity="0"
     inkscape:pageshadow="2"
     inkscape:window-width="879"
     inkscape:window-height="789"
     id="namedview3079"
     showgrid="false"
     inkscape:zoom="4.9166667"
     inkscape:cx="25.116"
     inkscape:cy="26.510998"
     inkscape:window-x="219"
     inkscape:window-y="76"
     inkscape:window-maximized="0"
     inkscape:current-layer="svg3054" />
  <defs
     id="defs3056">
    <filter
       id="a"
       height="1.2769"
       width="1.2769"
       color-interpolation-filters="sRGB"
       y="-.13847"
       x="-.13847">
      <feGaussianBlur
         stdDeviation="0.11539203"
         id="feGaussianBlur3059" />
    </filter>
    <filter
       color-interpolation-filters="sRGB"
       inkscape:collect="always"
       id="filter3879">
      <feGaussianBlur
         inkscape:collect="always"
         stdDeviation="0.24369333"
         id="feGaussianBlur3881" />
    </filter>
    <marker
       id="h"
       refY="0"
       refX="0"
       overflow="visible"
       orient="auto"
       style="overflow:visible">
      <path
         d="M 8.7186,4.0337 -2.2074,0.016 8.7186,-4.0017 c -1.7455,2.3721 -1.7354,5.6175 -6e-7,8.0354 z"
         transform="scale(0.6,0.6)"
         id="path10"
         inkscape:connector-curvature="0"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
    </marker>
    <marker
       id="g"
       refY="0"
       refX="0"
       overflow="visible"
       orient="auto"
       style="overflow:visible">
      <path
         d="M 8.7186,4.0337 -2.2074,0.016 8.7186,-4.0017 c -1.7455,2.3721 -1.7354,5.6175 -6e-7,8.0354 z"
         transform="scale(-0.6,-0.6)"
         id="path13"
         inkscape:connector-curvature="0"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
    </marker>
    <filter
       color-interpolation-filters="sRGB"
       inkscape:collect="always"
       id="filter3879-1">
      <feGaussianBlur
         inkscape:collect="always"
         stdDeviation="0.24369333"
         id="feGaussianBlur3881-7" />
    </filter>
    <marker
       id="h-4"
       refY="0"
       refX="0"
       overflow="visible"
       orient="auto"
       style="overflow:visible">
      <path
         d="M 8.7186,4.0337 -2.2074,0.016 8.7186,-4.0017 c -1.7455,2.3721 -1.7354,5.6175 -6e-7,8.0354 z"
         transform="scale(0.6,0.6)"
         id="path10-0"
         inkscape:connector-curvature="0"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
    </marker>
    <marker
       id="g-9"
       refY="0"
       refX="0"
       overflow="visible"
       orient="auto"
       style="overflow:visible">
      <path
         d="M 8.7186,4.0337 -2.2074,0.016 8.7186,-4.0017 c -1.7455,2.3721 -1.7354,5.6175 -6e-7,8.0354 z"
         transform="scale(-0.6,-0.6)"
         id="path13-4"
         inkscape:connector-curvature="0"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
    </marker>
    <marker
       id="marker4760"
       refY="0"
       refX="0"
       overflow="visible"
       orient="auto"
       style="overflow:visible">
      <path
         d="M 8.7186,4.0337 -2.2074,0.016 8.7186,-4.0017 c -1.7455,2.3721 -1.7354,5.6175 -6e-7,8.0354 z"
         transform="scale(0.6,0.6)"
         id="path4762"
         inkscape:connector-curvature="0"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
    </marker>
    <marker
       id="marker4764"
       refY="0"
       refX="0"
       overflow="visible"
       orient="auto"
       style="overflow:visible">
      <path
         d="M 8.7186,4.0337 -2.2074,0.016 8.7186,-4.0017 c -1.7455,2.3721 -1.7354,5.6175 -6e-7,8.0354 z"
         transform="scale(-0.6,-0.6)"
         id="path4766"
         inkscape:connector-curvature="0"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
    </marker>
  </defs>
  <g
     transform="matrix(1.286,0,0,1.2826,58.06922,-14.528373)"
     id="g3061">
    <g
       transform="matrix(11.8,0,0,11.536,-260.89,-12.073)"
       id="g3063"
       style="opacity:0.71875;filter:url(#a)">
      <path
         d="m -15.125,8.9375 a 0.90625,0.9375 0 1 1 -1.8125,0 0.90625,0.9375 0 1 1 1.8125,0 z"
         transform="matrix(1.1034,0,-2.1667e-7,1.0667,37.69,-5.5333)"
         id="path3065"
         inkscape:connector-curvature="0"
         style="fill-rule:evenodd" />
    </g>
    <path
       d="m -15.125,8.9375 a 0.90625,0.9375 0 1 1 -1.8125,0 0.90625,0.9375 0 1 1 1.8125,0 z"
       transform="matrix(9.1879,0,-1.8041e-6,8.7704,119.31,-46.412)"
       id="path3067"
       inkscape:connector-curvature="0"
       style="fill:none;stroke:#16bf11;stroke-width:0.79392999" />
    <g
       transform="matrix(4.6582,0,0,4.6768,-121.15,13.266)"
       id="g3069"
       style="fill:#ffffff">
      <path
         d="m -15.125,8.9375 a 0.90625,0.9375 0 1 1 -1.8125,0 0.90625,0.9375 0 1 1 1.8125,0 z"
         transform="matrix(1.1034,0,-2.1667e-7,1.0667,37.69,-5.5333)"
         id="path3071"
         inkscape:connector-curvature="0"
         style="fill:#ffffff;fill-rule:evenodd" />
    </g>
  </g>
  <g
     transform="matrix(3.3534,0,0,2.4765,-1.5227797,14.344627)"
     id="g3073">
    <rect
       height="16"
       width="16"
       y="0"
       x="0"
       id="rect3075"
       style="fill-opacity:0" />
  </g>
  <path
     d="m 30.69521,26.522581 a 8.707635,8.658066 0 0 1 -17.41527,0 8.707635,8.658066 0 1 1 17.41527,0 z"
     id="path3077"
     inkscape:connector-curvature="0"
     style="fill:none;stroke:#ff0c0c;stroke-width:6.90841627;stroke-linejoin:round" />
  <g
     id="g4856"
     transform="matrix(1,0,0,1.1269296,0,-3.477462)">
    <path
       d="M 8.3115104,8.2557245 36.075414,8.1934141"
       id="path44"
       style="fill:none;stroke:#000000;stroke-width:1.75850904px;marker-start:url(#h);marker-end:url(#g)"
       inkscape:connector-curvature="0" />
    <rect
       height="24.035736"
       width="3.0803609"
       y="3.3610315"
       x="3.8921013"
       id="rect46"
       style="fill:#2c2cff;fill-opacity:1" />
    <rect
       transform="scale(-1,1)"
       height="23.291401"
       width="3.0848782"
       y="3.3610315"
       x="-40.90612"
       id="rect48"
       style="fill:#2c2cff;fill-opacity:1" />
  </g>
  <g
     id="g50"
     transform="matrix(1.6262979,0,0,1.2104957,-29.057051,-8.38233)">
    <rect
       style="fill-opacity:0"
       id="rect52"
       x="0"
       y="0"
       width="16"
       height="16" />
  </g>
</svg>
+49 −10
Original line number Original line Diff line number Diff line
@@ -65,7 +65,15 @@ double To_User_Unit( EDA_UNITS_T aUnit, double aValue )
    }
    }
}
}



/* Convert a value to a string using double notation.
 * For readability, the mantissa has 0, 1, 3 or 4 digits, depending on units
 * for unit = inch the mantissa has 3 digits (Eeschema) or 4 digits
 * for unit = mil the mantissa has 0 digits (Eeschema) or 1 digits
 * for unit = mm the mantissa has 3 digits (Eeschema) or 4 digits
 * Should be used only to display info in status,
 * but not in dialogs, because 4 digits only
 * could truncate the actual value
 */
wxString CoordinateToString( int aValue, bool aConvertToMils )
wxString CoordinateToString( int aValue, bool aConvertToMils )
{
{
    return LengthDoubleToString( (double) aValue, aConvertToMils );
    return LengthDoubleToString( (double) aValue, aConvertToMils );
@@ -86,7 +94,6 @@ wxString LengthDoubleToString( double aValue, bool aConvertToMils )
#else
#else
            format = wxT( "%.1f" );
            format = wxT( "%.1f" );
#endif
#endif
            if( aConvertToMils )
            value *= 1000;
            value *= 1000;
        }
        }
        else
        else
@@ -118,17 +125,49 @@ wxString LengthDoubleToString( double aValue, bool aConvertToMils )
}
}




/* Convert a value to a string using double notation.
 * For readability, the mantissa has 3 or more digits (max 8 digits),
 * the trailing 0 are removed if the mantissa has more than 3 digits
 * and some trailing 0
 * This function should be used to display values in dialogs because a value
 * entered in mm (for instance 2.0 mm) could need up to 8 digits mantissa
 * if displayed in inch to avoid truncation or rounding made just by the printf function.
 * otherwise the actual value is rounded when read from dialog and converted
 * in internal units, and therefore modified.
 */
wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol )
wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol )
{
{
    wxString StringValue;
    wxString stringValue;
    double   value_to_print;
    double   value_to_print;


    value_to_print = To_User_Unit( aUnit, aValue );
    value_to_print = To_User_Unit( aUnit, aValue );


#if defined( PCBNEW )
#if defined( EESCHEMA )
    StringValue.Printf( wxT( "%.4f" ), value_to_print );
    stringValue.Printf( wxT( "%.3f" ), value_to_print );
#else
 #if defined( USE_PCBNEW_NANOMETRES )
    stringValue.Printf( wxT( "%.8f" ), value_to_print );
 #else
 #else
    StringValue.Printf( wxT( "%.3f" ), value_to_print );
    stringValue.Printf( wxT( "%.4f" ), value_to_print );
 #endif

    // Strip trailing zeros. However, keep at least 3 digits in mantissa
    // For readability
    struct lconv * lc = localeconv();
    char sep = lc->decimal_point[0];
    unsigned sep_pos = stringValue.Find( sep );

    if( sep_pos > 0 )
    {
        // We want to keep at least 3 digits after the separator
        unsigned min_len = sep_pos + 4;

        while( stringValue.Len() > min_len )
            if( stringValue.Last() == '0' )
                stringValue.RemoveLast();
            else
                break;
    }
#endif
#endif


    if( aAddUnitSymbol )
    if( aAddUnitSymbol )
@@ -136,11 +175,11 @@ wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymb
        switch( aUnit )
        switch( aUnit )
        {
        {
        case INCHES:
        case INCHES:
            StringValue += _( " \"" );
            stringValue += _( " \"" );
            break;
            break;


        case MILLIMETRES:
        case MILLIMETRES:
            StringValue += _( " mm" );
            stringValue += _( " mm" );
            break;
            break;


        case UNSCALED_UNITS:
        case UNSCALED_UNITS:
@@ -148,7 +187,7 @@ wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymb
        }
        }
    }
    }


    return StringValue;
    return stringValue;
}
}




+1 −0
Original line number Original line Diff line number Diff line
@@ -119,6 +119,7 @@ pads
pad_drill
pad_drill
pad_size
pad_size
pad_to_mask_clearance
pad_to_mask_clearance
solder_mask_min_width
pad_to_paste_clearance
pad_to_paste_clearance
pad_to_paste_clearance_ratio
pad_to_paste_clearance_ratio
page
page
Loading