Example #1
0
        private void method_16(
            DxfReader r,
            Class285 objectBuilder,
            ref Interface30 binaryDataReader,
            ref Interface30 stringDataReader,
            ref long graphicsDataSizeInBytes,
            ref PagedMemoryStream graphicsData,
            ref Stream currentStream)
        {
            string subclass = (string)r.CurrentGroup.Value;

            r.method_85();
            this.stream_0 = (Stream)null;
            this.stream_1 = (Stream)null;
            while (!r.method_92(subclass))
            {
                if (!this.method_17(r, objectBuilder, ref graphicsDataSizeInBytes, ref graphicsData, ref currentStream))
                {
                    r.method_85();
                }
            }
            if (this.stream_0 != null)
            {
                this.stream_0.Position = 0L;
                binaryDataReader       = Class444.Create(r.ModelBuilder.Version, this.stream_0);
            }
            if (this.stream_1 == null)
            {
                return;
            }
            this.stream_1.Position = 0L;
            stringDataReader       = Class444.Create(r.ModelBuilder.Version, this.stream_1);
        }
Example #2
0
        public void Read(DxfReader r)
        {
            if (r.CurrentGroup.Code != 0)
            {
                throw new Exception("Unexpected group code " + (object)r.CurrentGroup.Code + ".");
            }
            if (r.CurrentGroup.Value as string != "ACDSRECORD")
            {
                throw new Exception("Unexpected group value " + r.CurrentGroup.Value + ".");
            }
            r.method_85();
            while (r.CurrentGroup.Code != 0 && (r.CurrentGroup.Code != 101 && r.CurrentGroup != Struct18.struct18_0))
            {
                switch (r.CurrentGroup.Code)
                {
                case 2:
                    Class496 class496 = new Class496();
                    class496.Read(r);
                    this.list_0.Add(class496);
                    continue;

                case 90:
                    this.uint_0 = (uint)(int)r.CurrentGroup.Value;
                    r.method_85();
                    continue;

                default:
                    r.method_85();
                    continue;
                }
            }
        }
Example #3
0
        internal override void Read(DxfReader r, Class259 objectBuilder)
        {
            base.Read(r, objectBuilder);
            if (r.CurrentGroup.Code != 100 || (string)r.CurrentGroup.Value != "AcDbObjectContextData")
            {
                throw new DxfException("Expected subclass marker.");
            }
            r.method_85();
            while (!r.method_92("AcDbObjectContextData"))
            {
                switch (r.CurrentGroup.Code)
                {
                case 70:
                    this.Version = (short)r.CurrentGroup.Value;
                    break;

                case 290:
                    this.IsDefault = (bool)r.CurrentGroup.Value;
                    break;

                default:
                    throw new DxfException("Unexpected group code.");
                }
                r.method_85();
            }
        }
Example #4
0
 internal void method_5(DxfReader r, Class259 objectBuilder)
 {
     r.method_85();
     while (r.CurrentGroup.Code != 0 && r.CurrentGroup.Code != 100)
     {
         if (!this.method_6(r, objectBuilder))
         {
             r.method_85();
         }
     }
 }
 internal override void Read(DxfReader r, Class259 objectBuilder)
 {
     r.method_67((Class265)objectBuilder, false);
     r.method_85();
     if (r.CurrentGroup.Code != 330)
     {
         throw new DxfException("Expected GC 330 here.");
     }
     ((Class266)objectBuilder).Dependency = (ulong)r.CurrentGroup.Value;
     r.method_85();
 }
Example #6
0
 private void method_9(DxfReader r, Class259 objectBuilder)
 {
     r.method_91(this.AcClass);
     r.method_85();
     while (!r.method_92(this.AcClass))
     {
         if (!this.method_10(r, objectBuilder))
         {
             r.method_85();
         }
     }
 }
Example #7
0
 private void method_8(DxfReader r, Class259 objectBuilder)
 {
     r.method_91("AcDbScale");
     r.method_85();
     while (!r.method_92("AcDbScale"))
     {
         if (!this.method_9(r, objectBuilder))
         {
             r.method_85();
         }
     }
 }
Example #8
0
 private void method_12(DxfReader r, Class259 objectBuilder)
 {
     r.method_91("AcDbGeoData");
     r.method_85();
     while (!r.method_92("AcDbGeoData"))
     {
         if (!this.method_13(r, objectBuilder))
         {
             r.method_85();
         }
     }
 }
Example #9
0
 internal override void Read(DxfReader r, Class259 objectBuilder)
 {
     base.Read(r, objectBuilder);
     if (r.CurrentGroup.Code != 100 || (string)r.CurrentGroup.Value != "AcDbAnnotScaleObjectContextData")
     {
         throw new DxfException("Expected subclass marker.");
     }
     r.method_85();
     if (r.CurrentGroup.Code != 340)
     {
         throw new DxfException("Expected GC 340 here.");
     }
     ((DxfAnnotationScaleObjectContextData.Class310)objectBuilder).ScaleHandle = (ulong)r.CurrentGroup.Value;
     r.method_85();
 }
Example #10
0
        internal override void Read(DxfReader r, Class259 objectBuilder)
        {
            while (r.CurrentGroup.Code != 0)
            {
                if (r.CurrentGroup.Code != 100)
                {
                    throw new DxfException("Expected subclass marker.");
                }
                switch ((string)r.CurrentGroup.Value)
                {
                case "AcDbGeoData":
                    if (r.ModelBuilder.Version > DxfVersion.Dxf21)
                    {
                        this.method_12(r, objectBuilder);
                        continue;
                    }
                    this.method_8(r, objectBuilder);
                    continue;

                default:
                    r.method_85();
                    continue;
                }
            }
        }
            internal override void Read(DxfReader r, Class259 objectBuilder)
            {
                base.Read(r, objectBuilder);
                while (!r.method_92("AcDbDiametricDimensionObjectContextData"))
                {
                    switch (r.CurrentGroup.Code)
                    {
                    case 11:
                        this.point3D_0.X = (double)r.CurrentGroup.Value;
                        break;

                    case 12:
                        this.point3D_1.X = (double)r.CurrentGroup.Value;
                        break;

                    case 21:
                        this.point3D_0.Y = (double)r.CurrentGroup.Value;
                        break;

                    case 22:
                        this.point3D_1.Y = (double)r.CurrentGroup.Value;
                        break;

                    case 31:
                        this.point3D_0.Z = (double)r.CurrentGroup.Value;
                        break;

                    case 32:
                        this.point3D_1.Z = (double)r.CurrentGroup.Value;
                        break;
                    }
                    r.method_85();
                }
            }
Example #12
0
        protected virtual bool vmethod_0(DxfReader r)
        {
            Struct18 currentGroup = r.CurrentGroup;
            bool     flag         = true;

            switch (currentGroup.Code)
            {
            case 2:
                this.string_0 = (string)currentGroup.Value;
                break;

            case 280:
                this.enum26_0 = (Enum26)currentGroup.Value;
                break;

            default:
                flag = false;
                break;
            }
            if (flag)
            {
                r.method_85();
            }
            return(flag);
        }
Example #13
0
        private void method_13(DxfReader r, DxfDataTable.Class273 objectBuilder)
        {
            r.method_91("AcDbField");
            r.method_85();
            DxfDataColumn currentColumn = (DxfDataColumn)null;
            int           columnIndex   = -1;
            int           rowIndex      = -1;

            while (!r.method_92("AcDbField"))
            {
                if (!this.method_14(r, objectBuilder, ref currentColumn, ref columnIndex, ref rowIndex))
                {
                    r.method_85();
                }
            }
        }
        internal void method_9(DxfReader r, string subclass)
        {
            while (!r.method_92(subclass))
            {
                switch (r.CurrentGroup.Code)
                {
                case 140:
                    this.Value = (double)r.CurrentGroup.Value;
                    break;

                case 305:
                    this.Name = (string)r.CurrentGroup.Value;
                    break;

                case 306:
                    this.Description = (string)r.CurrentGroup.Value;
                    break;

                case 307:
                    this.ValueSet = r.method_37((short)96, (short)141, (short)175, (short)307);
                    break;
                }
                r.method_85();
            }
        }
Example #15
0
        private bool method_9(DxfReader r, Class259 objectBuilder)
        {
            switch (r.CurrentGroup.Code)
            {
            case 70:
                r.method_85();
                return(true);

            case 140:
                this.double_0 = (double)r.CurrentGroup.Value;
                goto case 70;

            case 141:
                this.double_1 = (double)r.CurrentGroup.Value;
                goto case 70;

            case 290:
                this.bool_1 = (bool)r.CurrentGroup.Value;
                goto case 70;

            case 300:
                this.Name = (string)r.CurrentGroup.Value;
                if (this.string_0 == "")
                {
                    throw new DxfException("Invalid scale name");
                }
                goto case 70;

            default:
                return(this.method_6(r, objectBuilder));
            }
        }
Example #16
0
        private bool method_10(DxfReader r, Class259 objectBuilder)
        {
            switch (r.CurrentGroup.Code)
            {
            case 70:
                this.ImageDisplayFrameFlag = (ImageDisplayFrameFlag)r.CurrentGroup.Value;
                break;

            case 71:
                this.ImageDisplayQuality = (ImageDisplayQuality)r.CurrentGroup.Value;
                break;

            case 72:
                this.ImageInsertionUnits = (ImageInsertionUnits)r.CurrentGroup.Value;
                break;

            case 90:
                this.int_0 = (int)r.CurrentGroup.Value;
                break;

            default:
                return(this.method_6(r, objectBuilder));
            }
            r.method_85();
            return(true);
        }
 internal override void vmethod_11(DxfReader r, Class259 objectBuilder)
 {
     while (!r.method_92("AcDbMTextAttributeObjectContextData"))
     {
         if (this.method_8(r.CurrentGroup) || r.CurrentGroup.Code != 101)
         {
             r.method_85();
         }
         else
         {
             r.method_85();
             this.dxfMTextObjectContextData_0 = new DxfMTextObjectContextData();
             this.dxfMTextObjectContextData_0.Read(r, objectBuilder);
             break;
         }
     }
 }
Example #18
0
 internal virtual void vmethod_11(DxfReader r, Class259 objectBuilder)
 {
     while (!r.method_92("AcDbTextObjectContextData"))
     {
         this.method_8(r.CurrentGroup);
         r.method_85();
     }
 }
Example #19
0
 public void Read(DxfReader r)
 {
     if (r.CurrentGroup.Code != 2)
     {
         throw new Exception("Expected group code 2.");
     }
     if (!this.vmethod_0(r))
     {
         r.method_85();
     }
     while (r.CurrentGroup.Code != 0 && (r.CurrentGroup.Code != 2 && (r.CurrentGroup.Code != 101 && r.CurrentGroup != Struct18.struct18_0)))
     {
         if (!this.vmethod_0(r))
         {
             r.method_85();
         }
     }
 }
Example #20
0
 private bool method_9(DxfReader r, Class259 objectBuilder)
 {
     if (r.CurrentGroup.Code != 70)
     {
         return(this.method_6(r, objectBuilder));
     }
     this.short_0 = (short)r.CurrentGroup.Value;
     r.method_85();
     return(true);
 }
Example #21
0
 private void method_10(DxfReader r, Class259 objectBuilder)
 {
     while (!r.method_92("AcDbGeoData") && r.CurrentGroup.Code != 4)
     {
         if (!this.method_11(r, objectBuilder))
         {
             r.method_85();
         }
     }
 }
Example #22
0
            internal void Read(DxfReader r)
            {
                bool flag1 = false;
                bool flag2 = true;

                do
                {
                    switch (r.CurrentGroup.Code)
                    {
                    case 43:
                        this.point2D_0.X = (double)r.CurrentGroup.Value;
                        goto case 79;

                    case 44:
                        this.point2D_0.Y = (double)r.CurrentGroup.Value;
                        goto case 79;

                    case 45:
                        this.vector2D_0.X = (double)r.CurrentGroup.Value;
                        goto case 79;

                    case 46:
                        this.vector2D_0.Y = (double)r.CurrentGroup.Value;
                        goto case 79;

                    case 49:
                        this.DashLengths.Add((double)r.CurrentGroup.Value);
                        goto case 79;

                    case 53:
                        if (flag1)
                        {
                            flag2 = false;
                            goto case 79;
                        }
                        else
                        {
                            this.double_0 = (double)r.CurrentGroup.Value * (System.Math.PI / 180.0);
                            flag1         = true;
                            goto case 79;
                        }

                    case 79:
                        if (flag2)
                        {
                            r.method_85();
                        }
                        continue;

                    default:
                        flag2 = false;
                        goto case 79;
                    }
                }while (flag2);
            }
        internal override void Read(DxfReader r, Class259 objectBuilder)
        {
            base.Read(r, objectBuilder);
            while (!r.method_92("AcDbBlockAngularConstraintParameter"))
            {
                switch (r.CurrentGroup.Code)
                {
                case 140:
                    this.Value = (double)r.CurrentGroup.Value;
                    break;

                case 290:
                    this.Unknown1 = (bool)r.CurrentGroup.Value;
                    break;

                case 305:
                    this.Name = (string)r.CurrentGroup.Value;
                    break;

                case 306:
                    this.Description = (string)r.CurrentGroup.Value;
                    break;

                case 307:
                    this.ValueSet = r.method_37((short)96, (short)141, (short)175, (short)307);
                    break;

                case 1011:
                    this.point3D_2.X = (double)r.CurrentGroup.Value;
                    break;

                case 1012:
                    this.point3D_3.X = (double)r.CurrentGroup.Value;
                    break;

                case 1021:
                    this.point3D_2.Y = (double)r.CurrentGroup.Value;
                    break;

                case 1022:
                    this.point3D_3.Y = (double)r.CurrentGroup.Value;
                    break;

                case 1031:
                    this.point3D_2.Z = (double)r.CurrentGroup.Value;
                    break;

                case 1032:
                    this.point3D_3.Z = (double)r.CurrentGroup.Value;
                    break;
                }
                r.method_85();
            }
        }
Example #24
0
            public void Read(out Class741 dataStore, DxfReader r)
            {
                dataStore       = new Class741(false);
                this.class741_0 = dataStore;
                while (r.CurrentGroup != Class824.struct18_1 && r.CurrentGroup != Struct18.struct18_0)
                {
                    if (r.CurrentGroup.Code == 0)
                    {
                        switch ((string)r.CurrentGroup.Value)
                        {
                        case "ACDSSCHEMA":
                            Class48 class48 = new Class48();
                            class48.Read(r);
                            dataStore.Schemas.Add(class48);
                            continue;

                        case "ACDSRECORD":
                            Class1027 class1027 = new Class1027();
                            class1027.Read(r);
                            if (class1027.Columns.Count == 2 && class1027.Columns[0].Name == "AcDbDs::ID" && class1027.Columns[1].Name == "ASM_Data")
                            {
                                Class496 column1 = class1027.Columns[0];
                                Class496 column2 = class1027.Columns[1];
                                ulong    handle  = (ulong)column1.Data.Value;
                                Stream   data    = (Stream)column2.Data.Value;
                                dataStore.Add(Enum53.const_2, handle, data);
                                continue;
                            }
                            continue;

                        default:
                            r.method_85();
                            continue;
                        }
                    }
                    else
                    {
                        r.method_85();
                    }
                }
            }
Example #25
0
        public void Read(DxfReader r)
        {
            if (r.CurrentGroup.Code != 101 || (string)r.CurrentGroup.Value != "ACDSRECORD")
            {
                throw new Exception();
            }
            r.method_85();
            while (r.CurrentGroup.Code != 0 && (r.CurrentGroup.Code != 2 && (r.CurrentGroup.Code != 101 && r.CurrentGroup != Struct18.struct18_0)))
            {
                switch (r.CurrentGroup.Code)
                {
                case 1:
                    this.string_0 = (string)r.CurrentGroup.Value;
                    break;

                case 95:
                    this.int_0 = (int)r.CurrentGroup.Value;
                    break;
                }
                r.method_85();
            }
        }
Example #26
0
        internal override void Read(DxfReader r, Class259 objectBuilder)
        {
            base.Read(r, objectBuilder);
            if (r.CurrentGroup.Code != 100 || (string)r.CurrentGroup.Value != "AcDbHatchViewContextData")
            {
                throw new DxfException("Expected subclass marker.");
            }
            r.method_85();
            while (!r.method_92("AcDbHatchViewContextData"))
            {
                switch (r.CurrentGroup.Code)
                {
                case 10:
                    this.vector3D_1.X = (double)r.CurrentGroup.Value;
                    break;

                case 20:
                    this.vector3D_1.Y = (double)r.CurrentGroup.Value;
                    break;

                case 30:
                    this.vector3D_1.Z = (double)r.CurrentGroup.Value;
                    break;

                case 51:
                    this.double_1 = (double)r.CurrentGroup.Value;
                    break;

                case 290:
                    this.bool_1 = (bool)r.CurrentGroup.Value;
                    break;

                case 330:
                    ((DxfHatchViewContextData.Class312)objectBuilder).ViewportHandle = (ulong)r.CurrentGroup.Value;
                    break;
                }
                r.method_85();
            }
        }
Example #27
0
        public void Read(DxfReader r)
        {
            if (r.CurrentGroup.Code != 0 || r.CurrentGroup.Value as string != "ACDSSCHEMA")
            {
                throw new Exception("Unexpected group.");
            }
            r.method_85();
            while (r.CurrentGroup.Code != 0 && (r.CurrentGroup.Code != 2 && r.CurrentGroup != Struct18.struct18_0))
            {
                switch (r.CurrentGroup.Code)
                {
                case 1:
                    this.Name = (string)r.CurrentGroup.Value;
                    r.method_85();
                    continue;

                case 2:
                    Class986 class986 = new Class986();
                    class986.Read(r);
                    this.list_2.Add(class986);
                    continue;

                case 90:
                    this.uint_0 = (uint)(int)r.CurrentGroup.Value;
                    r.method_85();
                    continue;

                case 101:
                    Class360 class360 = new Class360();
                    class360.Read(r);
                    this.list_1.Add(class360);
                    continue;

                default:
                    r.method_85();
                    continue;
                }
            }
        }
Example #28
0
        public void Read(DxfReader r)
        {
            if (r.CurrentGroup.Code != 2)
            {
                throw new Exception();
            }
            this.string_0 = (string)r.CurrentGroup.Value;
            r.method_85();
            while (r.CurrentGroup.Code != 0 && (r.CurrentGroup.Code != 2 && (r.CurrentGroup.Code != 101 && r.CurrentGroup != Struct18.struct18_0)))
            {
                switch (r.CurrentGroup.Code)
                {
                case 91:
                    this.enum52_0 = (Enum52)r.CurrentGroup.Value;
                    break;

                case 280:
                    this.uint_2 = (uint)(byte)r.CurrentGroup.Value;
                    break;
                }
                r.method_85();
            }
        }
Example #29
0
        private bool method_11(DxfReader r, Class259 objectBuilder)
        {
            switch (r.CurrentGroup.Code)
            {
            case 14:
                this.point3D_1.Y = (double)r.CurrentGroup.Value;
                goto case 15;

            case 15:
            case 16:
            case 17:
            case 25:
            case 26:
            case 27:
            case 54:
            case 93:
            case 94:
            case 140:
            case 293:
                r.method_85();
                return(true);

            case 24:
                this.point3D_1.X = (double)r.CurrentGroup.Value;
                goto case 15;

            case 95:
                this.scaleEstimationMethod_0 = (ScaleEstimationMethod)r.CurrentGroup.Value;
                goto case 15;

            case 141:
                this.double_0 = (double)r.CurrentGroup.Value;
                goto case 15;

            case 142:
                this.double_1 = (double)r.CurrentGroup.Value;
                goto case 15;

            case 143:
                this.double_2 = (double)r.CurrentGroup.Value;
                goto case 15;

            case 294:
                this.bool_0 = (bool)r.CurrentGroup.Value;
                goto case 15;

            default:
                return(this.method_6(r, objectBuilder));
            }
        }
Example #30
0
        internal static void smethod_1(DxfReader r, Class259 objectBuilder)
        {
            string str = (string)r.CurrentGroup.Value;

            if (str == "{ACAD_REACTORS")
            {
                r.method_85();
                while (r.CurrentGroup != Class824.struct18_30)
                {
                    if (r.CurrentGroup.Code == 330)
                    {
                        objectBuilder.method_0((ulong)r.CurrentGroup.Value);
                    }
                    r.method_85();
                }
            }
            else if (str == "{ACAD_XDICTIONARY")
            {
                r.method_85();
                while (r.CurrentGroup != Class824.struct18_30)
                {
                    if (r.CurrentGroup.Code == 360)
                    {
                        objectBuilder.ExtensionDictionaryHandle = (ulong)r.CurrentGroup.Value;
                    }
                    r.method_85();
                }
            }
            else
            {
                while (r.CurrentGroup != Class824.struct18_30)
                {
                    r.method_85();
                }
            }
        }