Beispiel #1
0
        private static void readSeq(string line, StreamReader sr, Part part)
        {
            if (line.StartsWith("BorderSequence"))
            {
                part.Border = BorderSeq.LoadSeq(line);
            }
            else if (line.StartsWith("VdrillSequence"))
            {
                part.Vdrillings.Add(VdrillSeq.LoadSeq(line));
            }
            else if (line.StartsWith("HDrillSequence"))
            {
                part.Hdrillings.Add(HdrillSeq.LoadSeq(line));
            }
            else if (line.StartsWith("RouteSetMillSequence"))
            {
                RouteSeq rs = new RouteSeq(line);
                while (((line = sr.ReadLine()) != null) &&
                       (line.StartsWith("RouteSequence")))
                {
                    rs.AddRoute(line);
                }
                part.Routes.Add(rs);

                if (line != null)
                {
                    readSeq(line, sr, part);
                }
            }
            else if (line.StartsWith("EndSequence"))
            {
                return;
            }
        }
Beispiel #2
0
        public static BorderSeq LoadSeq(string Line)
        {
            BorderSeq border = new BorderSeq();
            var       pars   = Line.Split(',');

            border.PanelWidth            = float.Parse(pars[1]);
            border.PanelLength           = float.Parse(pars[2]);
            border.PanelThickness        = float.Parse(pars[3]);
            border.RunField              = pars[4];
            border.CurrentFace           = pars[5];
            border.PreviousFace          = pars[6];
            border.CurrentZoneName       = pars[7];
            border.FieldOffsetX          = pars[8];
            border.FieldOffsetY          = pars[9];
            border.FieldOffsetZ          = pars[10];
            border.JobName               = pars[11];
            border.ItemNumber            = pars[12];
            border.FileName              = pars[13];
            border.Face6FileName         = pars[14];
            border.Description           = pars[15];
            border.PartQty               = int.Parse(pars[16]);
            border.CutPartWidth          = float.Parse(pars[17]);
            border.CutPartLength         = float.Parse(pars[18]);
            border.MaterialName          = pars[19];
            border.MaterialCode          = pars[20];
            border.Edge1                 = pars[21];
            border.Edge2                 = pars[23];
            border.Edge3                 = pars[22];
            border.Edge4                 = pars[24];
            border.PartComments          = pars[25];
            border.ProductDescription    = pars[26];
            border.ProductQty            = pars[27];
            border.ProductWidth          = pars[28];
            border.ProductHeight         = pars[29];
            border.ProductDescription    = pars[30];
            border.ProductComments       = pars[31];
            border.PerfectGrain          = pars[32];
            border.GrainFlag             = pars[33];
            border.PartCounter           = pars[34];
            border.FoundHdrill           = bool.Parse(pars[35]);
            border.FoundVdrill           = bool.Parse(pars[36]);
            border.FoundVdrillFace6      = bool.Parse(pars[37]);
            border.FoundRouting          = bool.Parse(pars[38]);
            border.FoundRoutingFace6     = bool.Parse(pars[39]);
            border.FoundSawing           = bool.Parse(pars[40]);
            border.FoundSawingFace6      = bool.Parse(pars[41]);
            border.FoundFace6Program     = bool.Parse(pars[42]);
            border.FoundNesting          = bool.Parse(pars[43]);
            border.FirstPassDepth        = pars[44];
            border.SpoilBoardPenetration = pars[45];
            border.BasePoint             = pars[46];
            border.MachinePoint          = string.IsNullOrEmpty(pars[47]) ? "1" : pars[47];
            //border.MfgDataPath = pars[48];
            //border.MaterialType = pars[49];
            //border.EdgeFileNames1 = pars[50];
            //border.EdgeFileNames2 = pars[51];
            //border.EdgeFileNames3 = pars[52];
            //border.EdgeFileNames4 = pars[53];
            //border.EdgeBarCodes1 = pars[54];
            //border.EdgeBarCodes2 = pars[55];
            //border.EdgeBarCodes3 = pars[56];
            //border.EdgeBarCodes4 = pars[57];
            //border.A58 = pars[58];
            //border.A59 = pars[59];
            //border.A60 = pars[60];
            //border.A61 = pars[61];
            //border.A62 = pars[62];
            //border.A63 = pars[63];
            //border.A64 = pars[64];
            //border.A65 = pars[65];
            //border.A66 = pars[66];
            //border.A67 = pars[67];
            //border.A68 = pars[68];
            border.Face5Only   = border.FileName != "" & border.Face6FileName == "";
            border.Face6Only   = border.FileName == "" & !border.FoundRouting & !border.FoundSawing & !border.FoundVdrill;
            border.DoubleFace5 = border.FileName != "" & border.Face6FileName != "";
            border.DoubleFace6 =
                border.FileName == ""
                & border.Face6FileName != ""
                & (border.FoundVdrill | border.FoundRouting | border.FoundSawing);
            return(border);
        }