public DXFGeometry(DXFGeometry _other)
        {
            this.Name        = _other.Name;
            this.Coords      = new List <Point3D>(_other.Coords);
            this.Connected   = new List <bool>(_other.Connected);
            this.Width       = new List <float>(_other.Width);
            this.LayerName   = string.Empty;
            this.Color       = _other.Color;
            this.TextContent = new List <string>(_other.TextContent);

            this.csOrigin = new Point3D(_other.csOrigin.X, _other.csOrigin.Y, _other.csOrigin.Z);
            this.csXaxisV = new Vector3D(_other.csXaxisV.X, _other.csXaxisV.Y, _other.csXaxisV.Z);
            this.csYaxisV = new Vector3D(_other.csYaxisV.X, _other.csYaxisV.Y, _other.csYaxisV.Z);
            this.csZaxisV = new Vector3D(_other.csZaxisV.X, _other.csZaxisV.Y, _other.csZaxisV.Z);
        }
예제 #2
0
        public List <DXFGeometry> ConvertToDrawable()
        {
            List <DXFGeometry> geometry = new List <DXFGeometry>();

            if (this.FEntities == null)
            {
                return(geometry);
            }

            int n = this.FEntities.ecEntities.Count;

            for (int i = 0; i < n; i++)
            {
                DXFEntity e = this.FEntities.ecEntities[i];
                Type      t = e.GetType();

                DXFGeometry        eG  = new DXFGeometry();
                List <DXFGeometry> eGs = new List <DXFGeometry>();
                // type deistinction
                if (t == typeof(DXFInsert))
                {
                    DXFInsert ei = e as DXFInsert;
                    eGs = ei.ConvertToDrawables();
                    if (eGs.Count > 0)
                    {
                        geometry.AddRange(eGs);
                    }
                }
                else
                {
                    eG = e.ConvertToDrawable();
                    if (!eG.IsEmpty())
                    {
                        geometry.Add(eG);
                    }
                }
            }
            return(geometry);
        }