Пример #1
0
        private CodeValuePair HandleMLine()
        {
            var codeValue = GetPair();

            var mLine   = new MLine();
            var segment = new VertexSegment();

            while (!Ended)
            {
                switch (codeValue.Code)
                {
                case 0:
                    MLines.Add(mLine);

                    return(codeValue);

                case 11:

                    segment.Coordinate.X = codeValue.GetDouble();
                    break;

                case 21:

                    segment.Coordinate.Y = codeValue.GetDouble();
                    break;

                case 31:

                    segment.Coordinate.Z = codeValue.GetDouble();
                    mLine.Vertices.Add(segment);

                    segment = new VertexSegment();
                    break;

                default:

                    mLine.ParseCode(codeValue);
                    break;
                }

                codeValue = GetPair();
            }

            return(codeValue);
        }