Ejemplo n.º 1
0
 public override void ExportAsDXF(DXFExport ADXFExport)
 {
     ADXFExport.AddName("TEXT", "AcDbText");
     ADXFExport.AddColor(this.data);
     ADXFExport.Add3DPoint(10, this.data.point);
     ADXFExport.AddFloat(40, ADXFExport.MM(this.data.height));
     if (this.data.fScale != 0f)
     {
         ADXFExport.AddFloat(41, this.data.fScale);
     }
     if (this.data.rotation != 0f)
     {
         ADXFExport.AddFloat(50, this.data.rotation);
     }
     if (this.data.flags != 0)
     {
         ADXFExport.AddFloat(51, 15f);
     }
     if (this.data.hAlign != 0 || this.data.vAlign != 0)
     {
         if (this.data.hAlign != 0)
         {
             ADXFExport.AddInt(72, (int)this.data.hAlign);
         }
         ADXFExport.Add3DPoint(11, this.data.point1);
     }
     ADXFExport.current.Add("  1");
     ADXFExport.current.Add(this.data.text);
     ADXFExport.current.Add("100");
     ADXFExport.current.Add("AcDbText");
     if (this.data.vAlign != 0)
     {
         ADXFExport.AddInt(73, (int)this.data.vAlign);
     }
 }
Ejemplo n.º 2
0
 public override void ExportAsDXF(DXFExport ADXFExport)
 {
     ADXFExport.AddName("LINE", "AcDbLine");
     ADXFExport.AddColor(this.data);
     ADXFExport.AddThickness(this.data);
     ADXFExport.Add3DPoint(10, this.data.point);
     ADXFExport.Add3DPoint(11, this.data.point1);
 }
Ejemplo n.º 3
0
 public override void ExportAsDXF(DXFExport ADXFExport)
 {
     ADXFExport.AddName("SOLID", "AcDbTrace");
     ADXFExport.AddColor(this.data);
     ADXFExport.Add3DPoint(10, this.data.point);
     ADXFExport.Add3DPoint(11, this.data.point1);
     ADXFExport.Add3DPoint(12, this.data.point2);
     ADXFExport.Add3DPoint(13, this.data.point3);
 }
Ejemplo n.º 4
0
        public override void ExportAsDXF(DXFExport ADXFExport)
        {
            int i;

            if ((this.data.points.Count - 4) % 3 != 0)
            {
                base.ExportAsDXF(ADXFExport);
                return;
            }
            int   count  = this.data.points.Count - 1 + (int)Math.Floor((double)(this.data.points.Count / 3));
            float single = 1f / (float)count;

            ADXFExport.AddName("SPLINE", "AcDbSpline");
            ADXFExport.AddColor(this.data);
            ADXFExport.AddThickness(this.data);
            ADXFExport.Add3DPoint(210, new DXFPoint(0f, 0f, 1f));
            ADXFExport.AddInt(70, 8);
            ADXFExport.AddInt(71, 3);
            ADXFExport.AddInt(72, count + DXFTables.cnstAmount);
            ADXFExport.AddInt(73, count);
            ADXFExport.AddInt(74, 0);
            ADXFExport.AddFloat(42, 1E-07f);
            ADXFExport.AddFloat(43, 1E-07f);
            int   j       = 0;
            float single1 = 0f;

            while (j < count)
            {
                for (i = 0; i < DXFTables.cnstAmount; i++)
                {
                    ADXFExport.AddFloat(40, single1);
                }
                single1 = single1 + single;
                j       = j + DXFTables.cnstAmount;
            }
            single1 = 1f;
            for (i = 0; i < DXFTables.cnstAmount; i++)
            {
                ADXFExport.AddFloat(40, single1);
            }
            for (j = 0; j < this.data.points.Count; j++)
            {
                ADXFExport.Add3DPoint(10, (DXFPoint)this.data.points[j]);
                if (j % 3 == 0 && j != 0 && j != this.data.points.Count - 1)
                {
                    ADXFExport.Add3DPoint(10, (DXFPoint)this.data.points[j]);
                }
            }
        }
Ejemplo n.º 5
0
        public override void ExportAsDXF(DXFExport ADXFExport)
        {
            DXFPoint dXFPoint = new DXFPoint();

            if ((this.boundaries != null || this.boundaryType != HatchBoundaryType.hbtPolyPolyline) &&
                (this.boundaries.Count != 0 || this.boundaryType != HatchBoundaryType.hbtPolyPolyline))
            {
                dXFPoint.X = 0f;
                dXFPoint.Y = 0f;
                float aDXFExport = 0.05f;
                if (!DXFExport.use01MM)
                {
                    aDXFExport = aDXFExport * ADXFExport.fOffset;
                }
                ADXFExport.AddName(DXFTables.sHatchEntity, "AcDbHatch");
                ADXFExport.AddColor(this.data);
                ADXFExport.Add3DPoint(10, dXFPoint);
                ADXFExport.AddFloat(30, 0f);
                ADXFExport.AddFloat(210, 0f);
                ADXFExport.AddFloat(220, 0f);
                ADXFExport.AddFloat(230, 1f);
                ADXFExport.AddString(2, this.patternName);
                ADXFExport.AddInt(70, this.data.flags);
                ADXFExport.AddInt(71, 0);
                this.AddBoundaryPathData(ADXFExport);
                ADXFExport.AddInt(75, 0);
                ADXFExport.AddInt(76, 1);
                if (this.data.flags == 0)
                {
                    this.AddPatternData(aDXFExport, ADXFExport);
                }
                ADXFExport.AddInt(98, 1);
                ADXFExport.AddPoint(10, dXFPoint);
            }
        }
Ejemplo n.º 6
0
 public override void ExportAsDXF(DXFExport ADXFExport)
 {
     if (!this.ellipse)
     {
         ADXFExport.AddName("CIRCLE", "AcDbCircle");
         ADXFExport.AddColor(this.data);
         ADXFExport.AddThickness(this.data);
         ADXFExport.Add3DPoint(10, this.data.point);
         ADXFExport.AddFloat(40, ADXFExport.MM(this.data.radius));
         return;
     }
     ADXFExport.AddName("ELLIPSE", "AcDbEllipse");
     ADXFExport.AddColor(this.data);
     ADXFExport.AddThickness(this.data);
     ADXFExport.Add3DPoint(10, this.data.point);
     ADXFExport.Add3DPoint(11, this.data.point1);
     ADXFExport.AddFloat(40, this.data.radius);
 }
Ejemplo n.º 7
0
        public override void ExportAsDXF(DXFExport ADXFExport)
        {
            switch (this.type)
            {
            case ArcType.atCircle:
            {
                ADXFExport.AddName("ARC", "AcDbCircle");
                ADXFExport.AddColor(this.data);
                ADXFExport.AddThickness(this.data);
                ADXFExport.Add3DPoint(10, this.data.point);
                ADXFExport.AddFloat(40, ADXFExport.MM(this.data.radius));
                ADXFExport.current.Add("100");
                ADXFExport.current.Add("AcDbArc");
                ADXFExport.AddFloat(50, this.data.startAngle);
                ADXFExport.AddFloat(51, this.data.endAngle);
                return;
            }

            case ArcType.atEllipse:
            {
                ADXFExport.AddName("ELLIPSE", "AcDbEllipse");
                ADXFExport.AddColor(this.data);
                ADXFExport.AddThickness(this.data);
                ADXFExport.Add3DPoint(10, this.data.point);
                ADXFExport.Add3DPoint(11, this.data.point1);
                ADXFExport.AddFloat(40, this.data.radius);
                if (Math.Abs((float)(this.data.startAngle - this.data.endAngle)) > DXFExport.accuracy)
                {
                    ADXFExport.AddFloat(41, this.data.startAngle);
                    ADXFExport.AddFloat(42, this.data.endAngle);
                }
                return;
            }

            default:
            {
                return;
            }
            }
        }
Ejemplo n.º 8
0
 public override void ExportAsDXF(DXFExport ADXFExport)
 {
     ADXFExport.AddName("MTEXT", "AcDbMText");
     ADXFExport.AddColor(this.data);
     ADXFExport.Add3DPoint(10, this.data.point);
     ADXFExport.AddFloat(40, ADXFExport.MM(this.data.height));
     if (this.data.rotation != 0f)
     {
         ADXFExport.AddFloat(50, this.data.rotation);
     }
     if (this.data.hAlign != 0)
     {
         ADXFExport.AddInt(71, this.data.hAlign + 1);
     }
     ADXFExport.current.Add("  1");
     ADXFExport.current.Add(this.data.text);
 }
Ejemplo n.º 9
0
        private void AddBoundaryPathData(DXFExport ADXFExport)
        {
            switch (this.boundaryType)
            {
            case HatchBoundaryType.hbtPolyPolyline:
            {
                ADXFExport.AddInt(91, this.boundaries.Count);
                for (int i = 0; i < this.boundaries.Count; i++)
                {
                    ADXFExport.AddInt(92, 1);
                    ADXFExport.AddInt(93, ((ArrayList)this.boundaries[i]).Count);
                    for (int j = 1; j < ((ArrayList)this.boundaries[i]).Count; j++)
                    {
                        ADXFExport.AddInt(72, 1);
                        ADXFExport.Add3DPoint(10, (DXFPoint)((ArrayList)this.boundaries[i])[j - 1]);
                        ADXFExport.Add3DPoint(11, (DXFPoint)((ArrayList)this.boundaries[i])[j]);
                    }
                    ADXFExport.AddInt(72, 1);
                    ADXFExport.Add3DPoint(10,
                                          (DXFPoint)((ArrayList)this.boundaries[i])[((ArrayList)this.boundaries[i]).Count - 1]);
                    ADXFExport.Add3DPoint(11, (DXFPoint)((ArrayList)this.boundaries[i])[0]);
                    ADXFExport.AddInt(97, 0);
                }
                return;
            }

            case HatchBoundaryType.hbtCircle:
            {
                ADXFExport.AddInt(91, 1);
                ADXFExport.AddInt(92, 1);
                ADXFExport.AddInt(93, 1);
                ADXFExport.AddInt(72, 2);
                ADXFExport.Add3DPoint(10, this.data.point);
                ADXFExport.AddFloat(40, ADXFExport.MM(this.data.radius));
                ADXFExport.AddFloat(50, this.data.startAngle);
                ADXFExport.AddFloat(51, this.data.endAngle);
                ADXFExport.AddInt(73, 1);
                ADXFExport.AddInt(97, 0);
                return;
            }

            case HatchBoundaryType.hbtEllipse:
            {
                ADXFExport.AddInt(91, 1);
                ADXFExport.AddInt(92, 1);
                ADXFExport.AddInt(93, 1);
                ADXFExport.AddInt(72, 3);
                ADXFExport.Add3DPoint(10, this.data.point);
                ADXFExport.Add3DPoint(11, this.data.point1);
                ADXFExport.AddFloat(40, this.data.radius);
                ADXFExport.AddFloat(50, this.data.startAngle);
                ADXFExport.AddFloat(51, this.data.endAngle);
                ADXFExport.AddInt(73, 1);
                ADXFExport.AddInt(97, 0);
                return;
            }

            default:
            {
                return;
            }
            }
        }
Ejemplo n.º 10
0
 public override void ExportAsDXF(DXFExport ADXFExport)
 {
     ADXFExport.AddName("POINT", "AcDbPoint");
     ADXFExport.AddColor(this.data);
     ADXFExport.Add3DPoint(10, this.data.point);
 }