Exemple #1
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfGeoData dxfGeoData = (DxfGeoData)from;

            this.int_0 = dxfGeoData.int_0;
            this.designCoordinatesType_0 = dxfGeoData.designCoordinatesType_0;
            this.HostBlock               = Class906.smethod_0(cloneContext, dxfGeoData.HostBlock, false);
            this.point3D_0               = dxfGeoData.point3D_0;
            this.point3D_1               = dxfGeoData.point3D_1;
            this.vector2D_0              = dxfGeoData.vector2D_0;
            this.vector2D_1              = dxfGeoData.vector2D_1;
            this.unitsValue_0            = dxfGeoData.unitsValue_0;
            this.unitsValue_1            = dxfGeoData.unitsValue_1;
            this.vector3D_0              = dxfGeoData.vector3D_0;
            this.scaleEstimationMethod_0 = dxfGeoData.scaleEstimationMethod_0;
            this.bool_0   = dxfGeoData.bool_0;
            this.double_0 = dxfGeoData.double_0;
            this.double_1 = dxfGeoData.double_1;
            this.double_2 = dxfGeoData.double_2;
            this.string_0 = dxfGeoData.string_0;
            this.string_1 = dxfGeoData.string_1;
            this.string_2 = dxfGeoData.string_2;
            this.string_3 = dxfGeoData.string_3;
            this.string_4 = dxfGeoData.string_4;
            this.list_0.Clear();
            foreach (GeoMeshPoint geoMeshPoint in dxfGeoData.list_0)
            {
                this.list_0.Add(new GeoMeshPoint(geoMeshPoint.Source, geoMeshPoint.Destination));
            }
            this.list_1.Clear();
            foreach (GeoMeshFace geoMeshFace in dxfGeoData.list_1)
            {
                this.list_1.Add(new GeoMeshFace(geoMeshFace.FaceIndex1, geoMeshFace.FaceIndex2, geoMeshFace.FaceIndex3));
            }
        }
Exemple #2
0
        private bool method_13(DxfReader r, Class259 objectBuilder)
        {
            switch (r.CurrentGroup.Code)
            {
            case 10:
                this.point3D_0.X = (double)r.CurrentGroup.Value;
                goto case 93;

            case 11:
                this.point3D_1.X = (double)r.CurrentGroup.Value;
                goto case 93;

            case 12:
                this.vector2D_0.X = (double)r.CurrentGroup.Value;
                goto case 93;

            case 13:
                this.list_0.Add(new GeoMeshPoint(new WW.Math.Point2D((double)r.CurrentGroup.Value, 0.0), WW.Math.Point2D.Zero));
                goto case 93;

            case 14:
                if (this.list_0.Count > 0)
                {
                    GeoMeshPoint geoMeshPoint = this.list_0[this.list_0.Count - 1];
                    geoMeshPoint.Destination = new WW.Math.Point2D((double)r.CurrentGroup.Value, geoMeshPoint.Destination.Y);
                    goto case 93;
                }
                else
                {
                    this.list_0.Add(new GeoMeshPoint(WW.Math.Point2D.Zero, new WW.Math.Point2D((double)r.CurrentGroup.Value, 0.0)));
                    goto case 93;
                }

            case 20:
                this.point3D_0.Y = (double)r.CurrentGroup.Value;
                goto case 93;

            case 21:
                this.point3D_1.Y = (double)r.CurrentGroup.Value;
                goto case 93;

            case 22:
                this.vector2D_0.Y = (double)r.CurrentGroup.Value;
                goto case 93;

            case 23:
                if (this.list_0.Count > 0)
                {
                    GeoMeshPoint geoMeshPoint = this.list_0[this.list_0.Count - 1];
                    geoMeshPoint.Source = new WW.Math.Point2D(geoMeshPoint.Source.X, (double)r.CurrentGroup.Value);
                    goto case 93;
                }
                else
                {
                    this.list_0.Add(new GeoMeshPoint(new WW.Math.Point2D(0.0, (double)r.CurrentGroup.Value), WW.Math.Point2D.Zero));
                    goto case 93;
                }

            case 24:
                if (this.list_0.Count > 0)
                {
                    GeoMeshPoint geoMeshPoint = this.list_0[this.list_0.Count - 1];
                    geoMeshPoint.Destination = new WW.Math.Point2D(geoMeshPoint.Destination.X, (double)r.CurrentGroup.Value);
                    goto case 93;
                }
                else
                {
                    this.list_0.Add(new GeoMeshPoint(WW.Math.Point2D.Zero, new WW.Math.Point2D(0.0, (double)r.CurrentGroup.Value)));
                    goto case 93;
                }

            case 30:
                this.point3D_0.Z = (double)r.CurrentGroup.Value;
                goto case 93;

            case 31:
                this.point3D_1.Z = (double)r.CurrentGroup.Value;
                goto case 93;

            case 40:
                this.vector2D_1.X = (double)r.CurrentGroup.Value;
                goto case 93;

            case 41:
                this.vector2D_1.Y = (double)r.CurrentGroup.Value;
                goto case 93;

            case 70:
                this.designCoordinatesType_0 = (DesignCoordinatesType)(short)r.CurrentGroup.Value;
                goto case 93;

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

            case 91:
                this.unitsValue_0 = (UnitsValue)r.CurrentGroup.Value;
                goto case 93;

            case 92:
                this.unitsValue_1 = (UnitsValue)r.CurrentGroup.Value;
                goto case 93;

            case 93:
            case 96:
                r.method_85();
                return(true);

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

            case 97:
                this.list_1.Add(new GeoMeshFace()
                {
                    FaceIndex1 = (int)r.CurrentGroup.Value
                });
                goto case 93;

            case 98:
                if (this.list_1.Count > 0)
                {
                    this.list_1[this.list_1.Count - 1].FaceIndex2 = (int)r.CurrentGroup.Value;
                    goto case 93;
                }
                else
                {
                    this.list_1.Add(new GeoMeshFace()
                    {
                        FaceIndex2 = (int)r.CurrentGroup.Value
                    });
                    goto case 93;
                }

            case 99:
                if (this.list_1.Count > 0)
                {
                    this.list_1[this.list_1.Count - 1].FaceIndex3 = (int)r.CurrentGroup.Value;
                    goto case 93;
                }
                else
                {
                    this.list_1.Add(new GeoMeshFace()
                    {
                        FaceIndex3 = (int)r.CurrentGroup.Value
                    });
                    goto case 93;
                }

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

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

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

            case 210:
                this.vector3D_0.X = (double)r.CurrentGroup.Value;
                goto case 93;

            case 220:
                this.vector3D_0.Y = (double)r.CurrentGroup.Value;
                goto case 93;

            case 230:
                this.vector3D_0.Z = (double)r.CurrentGroup.Value;
                goto case 93;

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

            case 301:
            case 303:
                this.string_0 += ((string)r.CurrentGroup.Value).Replace("^J", "\n");
                goto case 93;

            case 302:
                this.GeoRssTag = (string)r.CurrentGroup.Value;
                goto case 93;

            case 305:
                this.ObservationFromTag = (string)r.CurrentGroup.Value;
                goto case 93;

            case 306:
                this.ObservationToTag = (string)r.CurrentGroup.Value;
                goto case 93;

            case 307:
                this.ObservationCoverageTag = (string)r.CurrentGroup.Value;
                goto case 93;

            case 330:
                r.ModelBuilder.method_10((ulong)r.CurrentGroup.Value, (System.Action <DxfObjectReference>)(o => this.dxfObjectReference_3 = o));
                goto case 93;

            default:
                return(this.method_6(r, objectBuilder));
            }
        }
Exemple #3
0
        internal override void Read(Class434 or, Class259 ob)
        {
            base.Read(or, ob);
            Interface30 objectBitStream = or.ObjectBitStream;

            this.int_0 = objectBitStream.imethod_11();
            or.Builder.method_10(objectBitStream.imethod_32(true), (System.Action <DxfObjectReference>)(o => this.dxfObjectReference_3 = o));
            this.designCoordinatesType_0 = (DesignCoordinatesType)objectBitStream.imethod_14();
            switch (this.int_0)
            {
            case 1:
                this.point3D_1    = objectBitStream.imethod_39();
                this.unitsValue_0 = (UnitsValue)objectBitStream.imethod_11();
                this.unitsValue_1 = this.unitsValue_0;
                this.point3D_0    = objectBitStream.imethod_39();
                objectBitStream.imethod_39();
                this.vector3D_0 = objectBitStream.imethod_51();
                this.vector2D_0 = Vector2D.FromAngle(System.Math.PI / 2.0 - objectBitStream.imethod_8());
                objectBitStream.imethod_39();
                this.string_0     = objectBitStream.ReadString();
                this.string_1     = objectBitStream.ReadString();
                this.vector2D_1.X = objectBitStream.imethod_8();
                this.vector2D_1.Y = this.vector2D_1.X;
                objectBitStream.ReadString();
                objectBitStream.ReadString();
                break;

            case 2:
            case 3:
                this.point3D_0               = objectBitStream.imethod_39();
                this.point3D_1               = objectBitStream.imethod_39();
                this.vector2D_1.X            = objectBitStream.imethod_8();
                this.unitsValue_0            = (UnitsValue)objectBitStream.imethod_11();
                this.vector2D_1.Y            = objectBitStream.imethod_8();
                this.unitsValue_1            = (UnitsValue)objectBitStream.imethod_11();
                this.vector3D_0              = objectBitStream.imethod_51();
                this.vector2D_0              = objectBitStream.imethod_50();
                this.scaleEstimationMethod_0 = (ScaleEstimationMethod)objectBitStream.imethod_11();
                this.double_0 = objectBitStream.imethod_8();
                this.bool_0   = objectBitStream.imethod_6();
                this.double_1 = objectBitStream.imethod_8();
                this.double_2 = objectBitStream.imethod_8();
                this.string_0 = objectBitStream.ReadString();
                this.string_1 = objectBitStream.ReadString();
                break;
            }
            this.string_2 = objectBitStream.ReadString();
            this.string_3 = objectBitStream.ReadString();
            this.string_4 = objectBitStream.ReadString();
            int num1 = objectBitStream.imethod_11();

            for (int index = 0; index < num1; ++index)
            {
                this.list_0.Add(new GeoMeshPoint(objectBitStream.imethod_38(), objectBitStream.imethod_38()));
            }
            int num2 = objectBitStream.imethod_11();

            for (int index = 0; index < num2; ++index)
            {
                this.list_1.Add(new GeoMeshFace(objectBitStream.imethod_11(), objectBitStream.imethod_11(), objectBitStream.imethod_11()));
            }
            if (this.int_0 != 1 || !objectBitStream.imethod_6())
            {
                return;
            }
            objectBitStream.imethod_6();
            objectBitStream.imethod_38();
            objectBitStream.imethod_38();
            objectBitStream.imethod_11();
            objectBitStream.imethod_11();
            objectBitStream.imethod_38();
            objectBitStream.imethod_38();
            objectBitStream.imethod_6();
            objectBitStream.imethod_8();
            objectBitStream.imethod_8();
            this.scaleEstimationMethod_0 = (ScaleEstimationMethod)objectBitStream.imethod_11();
            this.double_0 = objectBitStream.imethod_8();
            this.bool_0   = objectBitStream.imethod_6();
            this.double_1 = objectBitStream.imethod_8();
            this.double_2 = objectBitStream.imethod_8();
        }