Esempio n. 1
0
        private long method_21(DxfWriter w, PagedMemoryStream binData, long binDataSizeInBits)
        {
            Class724 class724 = (Class724)Class724.smethod_0(Class885.smethod_4(this.dwgVersion_0), (Stream)binData, Encodings.GetEncoding((int)w.Model.Header.DrawingCodePage));

            class724.imethod_47(binDataSizeInBits);
            if (this.uint_0 > 0U)
            {
                this.stream_1.Position = 0L;
                this.method_14((Interface29)class724, this.stream_1, (long)this.uint_0);
                class724.imethod_50((long)this.uint_0);
            }
            class724.imethod_14(this.uint_0 > 0U);
            binDataSizeInBits += (long)this.uint_0;
            return(binDataSizeInBits);
        }
Esempio n. 2
0
        private bool method_24(bool writeToDxf, DxfVersion fileVersion)
        {
            DwgVersion dwgVersion = Class885.smethod_3(fileVersion);

            if (writeToDxf != this.bool_2)
            {
                return(false);
            }
            if (this.dwgVersion_0 == dwgVersion)
            {
                return(true);
            }
            if (this.dwgVersion_0 < dwgVersion)
            {
                return(dwgVersion <= DwgVersion.Dwg1014);
            }
            return(false);
        }
Esempio n. 3
0
        private void method_18(DxfReader r, Class259 objectBuilder)
        {
            this.bool_2 = true;
            DxfVersion version = r.ModelBuilder.Version;

            this.dwgVersion_0 = Class885.smethod_3(version);
            if (this.stream_0 == null)
            {
                this.stream_0 = (Stream) new PagedMemoryStream(1024L, 1024);
            }
            if (this.dwgVersion_0 > DwgVersion.Dwg1018 && this.stream_1 == null)
            {
                this.stream_1 = (Stream) new PagedMemoryStream(1024L, 1024);
            }
            r.method_85();
            Encoding    encoding   = Encodings.GetEncoding((int)r.Model.Header.DrawingCodePage);
            Interface40 nterface40 = (Interface40) new Class725(this.stream_0, encoding, version);

            DxfProxyEntity.Class361 class361 = new DxfProxyEntity.Class361((Interface29) new Class990((Stream)null, nterface40, this.dwgVersion_0 > DwgVersion.Dwg1018 ? (Interface40) new Class728(this.stream_1, encoding, version) : nterface40, nterface40));
            while (r.CurrentGroup.Code != 0)
            {
                switch (Class820.smethod_2(r.CurrentGroup.Code))
                {
                case Enum5.const_8:
                case Enum5.const_9:
                case Enum5.const_14:
                case Enum5.const_15:
                    ulong            handle           = (ulong)r.CurrentGroup.Value;
                    DxfHandledObject dxfHandledObject = new DxfHandledObject();
                    dxfHandledObject.SetHandle(handle);
                    DxfObjectReference dxfObjectReference = new DxfObjectReference((IDxfHandledObject)dxfHandledObject);
                    Struct18           group1             = new Struct18(r.CurrentGroup.Code, (object)dxfObjectReference);
                    class361.imethod_0(group1);
                    r.method_85();
                    continue;

                case Enum5.const_13:
                    int             code    = r.CurrentGroup.Code;
                    WW.Math.Point3D point3D = new WW.Math.Point3D((double)r.CurrentGroup.Value, 0.0, 0.0);
                    r.method_85();
                    if (r.CurrentGroup.Code == code + 10)
                    {
                        point3D.Y = (double)r.CurrentGroup.Value;
                        r.method_85();
                        if (r.CurrentGroup.Code == code + 20)
                        {
                            point3D.Z = (double)r.CurrentGroup.Value;
                            r.method_85();
                        }
                    }
                    Struct18 group2 = new Struct18(code, (object)point3D);
                    class361.imethod_0(group2);
                    continue;

                default:
                    class361.imethod_0(r.CurrentGroup);
                    r.method_85();
                    continue;
                }
            }
        }