Esempio n. 1
0
        public void AddNewAperture(int level, int number, GerberApertureType type, double[] parameter)
        {
            GerberApertureInfo newAperture;

            // Next check to see if this aperture is already in the list.
            foreach (GerberApertureInfo aperture in apertureList)
            {
                if ((aperture.Number == number) && (aperture.Level == level))
                {
                    //Debug.WriteLine("Aperture {0} int level {1} is already in the list.", number, level);
                    return;
                }
            }

            // This aperture number is unique.  Therefore, add it to the list.
            //Debug.WriteLine("    Adding type {0} to aperture list ", type);

            newAperture = new GerberApertureInfo();
            // Set member elements.
            newAperture.Level        = level;
            newAperture.Number       = number;
            newAperture.ApertureType = type;
            for (int i = 0; i < 5; i++)
            {
                newAperture.Parameters[i] = parameter[i];
            }

            apertureList.Add(newAperture);
            return;
        }
Esempio n. 2
0
        public void AddNewDList(int number)
        {
            GerberApertureInfo newDCode;

            // Look to see if this is already in list.
            foreach (GerberApertureInfo dCode in dCodeList)
            {
                if (dCode.Number == number)
                {
                    //Debug.WriteLine("    Code {0} already exists in D List.", number);
                    return;
                }
            }

            // This aperture number is unique.  Therefore, add it to the list.
            //Debug.WriteLine("    Adding code {0} to D List", number);
            newDCode = new GerberApertureInfo();
            // Set member elements.
            newDCode.Number = number;
            newDCode.Count  = 0;
            dCodeList.Add(newDCode);
            return;
        }