Example #1
0
 protected DxfDimensionBase(DxfDimensionBase other)
     : base(other)
 {
     this.Version = other.Version;
     this.BlockName = other.BlockName;
     this.DefinitionPoint1 = other.DefinitionPoint1;
     this.TextMidPoint = other.TextMidPoint;
     this.DimensionType = other.DimensionType;
     this.AttachmentPoint = other.AttachmentPoint;
     this.TextLineSpacingStyle = other.TextLineSpacingStyle;
     this.TextLineSpacingFactor = other.TextLineSpacingFactor;
     this.ActualMeasurement = other.ActualMeasurement;
     this.Text = other.Text;
     this.TextRotationAngle = other.TextRotationAngle;
     this.HorizontalDirectionAngle = other.HorizontalDirectionAngle;
     this.Normal = other.Normal;
     this.DimensionStyleName = other.DimensionStyleName;
 }
 protected DxfDimensionBase(DxfDimensionBase other)
     : base(other)
 {
     this.Version               = other.Version;
     this.BlockName             = other.BlockName;
     this.DefinitionPoint1      = other.DefinitionPoint1;
     this.TextMidPoint          = other.TextMidPoint;
     this.DimensionType         = other.DimensionType;
     this.AttachmentPoint       = other.AttachmentPoint;
     this.TextLineSpacingStyle  = other.TextLineSpacingStyle;
     this.TextLineSpacingFactor = other.TextLineSpacingFactor;
     this.ActualMeasurement     = other.ActualMeasurement;
     this.Text = other.Text;
     this.TextRotationAngle        = other.TextRotationAngle;
     this.HorizontalDirectionAngle = other.HorizontalDirectionAngle;
     this.Normal             = other.Normal;
     this.DimensionStyleName = other.DimensionStyleName;
 }
        protected override DxfEntity PostParse()
        {
            DxfDimensionBase newDimension = null;

            switch (DimensionType)
            {
            case DxfDimensionType.Aligned:
                newDimension = new DxfAlignedDimension(this);
                break;

            case DxfDimensionType.RotatedHorizontalOrVertical:
                newDimension = new DxfRotatedDimension(this);
                break;

            case DxfDimensionType.Radius:
                newDimension = new DxfRadialDimension(this);
                break;

            case DxfDimensionType.Diameter:
                newDimension = new DxfDiameterDimension(this);
                break;

            case DxfDimensionType.AngularThreePoint:
                newDimension = new DxfAngularThreePointDimension(this);
                break;

            case DxfDimensionType.Ordinate:
                newDimension = new DxfOrdinateDimension(this);
                break;
            }

            if (newDimension != null)
            {
                foreach (var pair in ExcessCodePairs)
                {
                    newDimension.TrySetPair(pair);
                }
            }

            return(newDimension);
        }
 internal DxfAngularThreePointDimension(DxfDimensionBase other)
     : base(other)
 {
 }
Example #5
0
 internal DxfRadialDimension(DxfDimensionBase other)
     : base(other)
 {
 }
        internal static DxfEntity FromBuffer(DxfCodePairBufferReader buffer)
        {
            var first = buffer.Peek();

            buffer.Advance();
            DxfEntity entity;

            switch (first.StringValue)
            {
            case "3DFACE":
                entity = new Dxf3DFace();
                break;

            case "3DSOLID":
                entity = new Dxf3DSolid();
                break;

            case "ACAD_PROXY_ENTITY":
                entity = new DxfProxyEntity();
                break;

            case "ARC":
                entity = new DxfArc();
                break;

            case "ARCALIGNEDTEXT":
                entity = new DxfArcAlignedText();
                break;

            case "ATTDEF":
                entity = new DxfAttributeDefinition();
                break;

            case "ATTRIB":
                entity = new DxfAttribute();
                break;

            case "BODY":
                entity = new DxfBody();
                break;

            case "CIRCLE":
                entity = new DxfCircle();
                break;

            case "DIMENSION":
                entity = new DxfDimensionBase();
                break;

            case "ELLIPSE":
                entity = new DxfEllipse();
                break;

            case "HELIX":
                entity = new DxfHelix();
                break;

            case "IMAGE":
                entity = new DxfImage();
                break;

            case "INSERT":
                entity = new DxfInsert();
                break;

            case "LEADER":
                entity = new DxfLeader();
                break;

            case "LIGHT":
                entity = new DxfLight();
                break;

            case "LINE":
            case "3DLINE":
                entity = new DxfLine();
                break;

            case "LWPOLYLINE":
                entity = new DxfLwPolyline();
                break;

            case "MLINE":
                entity = new DxfMLine();
                break;

            case "MTEXT":
                entity = new DxfMText();
                break;

            case "OLEFRAME":
                entity = new DxfOleFrame();
                break;

            case "OLE2FRAME":
                entity = new DxfOle2Frame();
                break;

            case "POINT":
                entity = new DxfModelPoint();
                break;

            case "POLYLINE":
                entity = new DxfPolyline();
                break;

            case "RAY":
                entity = new DxfRay();
                break;

            case "REGION":
                entity = new DxfRegion();
                break;

            case "RTEXT":
                entity = new DxfRText();
                break;

            case "SECTION":
                entity = new DxfEntitySection();
                break;

            case "SEQEND":
                entity = new DxfSeqend();
                break;

            case "SHAPE":
                entity = new DxfShape();
                break;

            case "SOLID":
                entity = new DxfSolid();
                break;

            case "SPLINE":
                entity = new DxfSpline();
                break;

            case "TEXT":
                entity = new DxfText();
                break;

            case "TOLERANCE":
                entity = new DxfTolerance();
                break;

            case "TRACE":
                entity = new DxfTrace();
                break;

            case "UNDERLAY":
                entity = new DxfUnderlay();
                break;

            case "DGNUNDERLAY":
                entity = new DxfDgnUnderlay();
                break;

            case "DWFUNDERLAY":
                entity = new DxfDwfUnderlay();
                break;

            case "PDFUNDERLAY":
                entity = new DxfPdfUnderlay();
                break;

            case "VERTEX":
                entity = new DxfVertex();
                break;

            case "WIPEOUT":
                entity = new DxfWipeout();
                break;

            case "XLINE":
                entity = new DxfXLine();
                break;

            default:
                SwallowEntity(buffer);
                entity = null;
                break;
            }

            if (entity != null)
            {
                entity = entity.PopulateFromBuffer(buffer);
            }

            return(entity);
        }
Example #7
0
 internal DxfOrdinateDimension(DxfDimensionBase other)
     : base(other)
 {
 }
 internal DxfRotatedDimension(DxfDimensionBase other)
     : base(other)
 {
 }
 internal DxfDiameterDimension(DxfDimensionBase other)
     : base(other)
 {
 }
 internal DxfAlignedDimension(DxfDimensionBase other)
     : base(other)
 {
 }
Example #11
0
 internal DxfAlignedDimension(DxfDimensionBase other)
     : base(other)
 {
 }
 internal DxfRadialDimension(DxfDimensionBase other)
     : base(other)
 {
 }
 internal DxfAngularDimension(DxfDimensionBase other)
     : base(other)
 {
 }
 internal DxfDiameterDimension(DxfDimensionBase other)
     : base(other)
 {
 }
 internal DxfOrdinateDimension(DxfDimensionBase other)
     : base(other)
 {
 }
Example #16
0
 internal DxfAngularThreePointDimension(DxfDimensionBase other)
     : base(other)
 {
 }
Example #17
0
 internal DxfRotatedDimension(DxfDimensionBase other)
     : base(other)
 {
 }
Example #18
0
        internal static DxfEntity FromBuffer(DxfCodePairBufferReader buffer)
        {
            var first = buffer.Peek();
            buffer.Advance();
            DxfEntity entity;
            switch (first.StringValue)
            {
                case "3DFACE":
                    entity = new Dxf3DFace();
                    break;
                case "3DSOLID":
                    entity = new Dxf3DSolid();
                    break;
                case "ACAD_PROXY_ENTITY":
                    entity = new DxfProxyEntity();
                    break;
                case "ARC":
                    entity = new DxfArc();
                    break;
                case "ARCALIGNEDTEXT":
                    entity = new DxfArcAlignedText();
                    break;
                case "ATTDEF":
                    entity = new DxfAttributeDefinition();
                    break;
                case "ATTRIB":
                    entity = new DxfAttribute();
                    break;
                case "BODY":
                    entity = new DxfBody();
                    break;
                case "CIRCLE":
                    entity = new DxfCircle();
                    break;
                case "DIMENSION":
                    entity = new DxfDimensionBase();
                    break;
                case "ELLIPSE":
                    entity = new DxfEllipse();
                    break;
                case "HELIX":
                    entity = new DxfHelix();
                    break;
                case "IMAGE":
                    entity = new DxfImage();
                    break;
                case "INSERT":
                    entity = new DxfInsert();
                    break;
                case "LEADER":
                    entity = new DxfLeader();
                    break;
                case "LIGHT":
                    entity = new DxfLight();
                    break;
                case "LINE":
                case "3DLINE":
                    entity = new DxfLine();
                    break;
                case "LWPOLYLINE":
                    entity = new DxfLwPolyline();
                    break;
                case "MLINE":
                    entity = new DxfMLine();
                    break;
                case "MLEADERSTYLE":
                    entity = new DxfMLeaderStyle();
                    break;
                case "MTEXT":
                    entity = new DxfMText();
                    break;
                case "OLEFRAME":
                    entity = new DxfOleFrame();
                    break;
                case "OLE2FRAME":
                    entity = new DxfOle2Frame();
                    break;
                case "POINT":
                    entity = new DxfModelPoint();
                    break;
                case "POLYLINE":
                    entity = new DxfPolyline();
                    break;
                case "RAY":
                    entity = new DxfRay();
                    break;
                case "REGION":
                    entity = new DxfRegion();
                    break;
                case "RTEXT":
                    entity = new DxfRText();
                    break;
                case "SECTION":
                    entity = new DxfEntitySection();
                    break;
                case "SEQEND":
                    entity = new DxfSeqend();
                    break;
                case "SHAPE":
                    entity = new DxfShape();
                    break;
                case "SOLID":
                    entity = new DxfSolid();
                    break;
                case "SPLINE":
                    entity = new DxfSpline();
                    break;
                case "SUN":
                    entity = new DxfSun();
                    break;
                case "TEXT":
                    entity = new DxfText();
                    break;
                case "TOLERANCE":
                    entity = new DxfTolerance();
                    break;
                case "TRACE":
                    entity = new DxfTrace();
                    break;
                case "UNDERLAY":
                    entity = new DxfUnderlay();
                    break;
                case "DGNUNDERLAY":
                    entity = new DxfDgnUnderlay();
                    break;
                case "DWFUNDERLAY":
                    entity = new DxfDwfUnderlay();
                    break;
                case "PDFUNDERLAY":
                    entity = new DxfPdfUnderlay();
                    break;
                case "VERTEX":
                    entity = new DxfVertex();
                    break;
                case "WIPEOUT":
                    entity = new DxfWipeout();
                    break;
                case "XLINE":
                    entity = new DxfXLine();
                    break;
                default:
                    SwallowEntity(buffer);
                    entity = null;
                    break;
            }

            if (entity != null)
            {
                entity = entity.PopulateFromBuffer(buffer);
            }

            return entity;
        }