Пример #1
0
 public PcbPadStyle(PcbPadShape shape, PcbUnits units, double dim1, double dim2, double drill = 0)
 {
     Shape      = shape;
     Units      = units;
     Dimension1 = dim1;
     Dimension2 = dim2;
     Drill      = drill;
 }
Пример #2
0
        /// <summary>
        /// {0} = X or outer dimension (overall diameter etc), {1} = Y or hole diameter
        /// </summary>
        /// <param name="shape">Supported: CircularTH, RectangularSMT, SquareTH.</param>
        /// <returns>Format string</returns>
        public string this[PcbPadShape shape]
        {
            get
            {
                switch (shape)
                {
                case PcbPadShape.CircularTH:
                    return("C-{0:F0}-{1:F0}");

                case PcbPadShape.RectangularSMT:
                    return("{0:F0}X{1:F0}");

                case PcbPadShape.RectangularTH:
                    return("S-{0:F0}-{1:F0}");

                case PcbPadShape.CircularSMT:
                    return("CSMT-{0:F0}");

                default:
                    throw new ArgumentException("Bad pad shape.");
                }
            }
        }