Example #1
0
        public int GetNewCad(string Path)
        {
            int gerberW = 0;
            int gerberH = 0;

            if (this.Gerber is GerberFile)
            {
                gerberW = this.Gerber.OrgGerberImage.Width;
                gerberH = this.Gerber.OrgGerberImage.Height;
            }
            CadFile cad = CadFile.GetNewCadFile(this.ID, Path, this.DPI, gerberW, gerberH);

            if (cad == null)
            {
                return(-1);
            }
            else
            {
                this.Cad.Add(cad);
                return(0);
            }
        }