tx
2025-04-09 fa7510e1ed63df0366787fa4ed1b3db6426d2b46
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
using WW.Cad.Base;
using WW.Cad.Drawing;
using WW.Cad.Drawing.GDI;
using WW.Cad.IO;
using WW.Cad.Model;
using WW.Math;
using WW.Cad.Model.Entities;
using WW.Actions;
using WW.Cad.Model.Tables;
using WW.Cad.Model.Objects;
 
namespace TProduct.PumpGraph.Dxf
{
    public partial class ZlpFeatChart1
    {
        //
        private void InitialDiagramSize()
        {
            _diagramLeftBottomPt = new Point2D(0, 0);
 
            double diagramHeight = 480;//Y轴长度
            double diagramLength = 850;//X轴长度
 
            _diagramRightBottomPt.X = _diagramLeftBottomPt.X + diagramLength;
            _diagramRightBottomPt.Y = _diagramLeftBottomPt.Y;
 
            _diagramLeftTopPt.X = _diagramLeftBottomPt.X;
            _diagramLeftTopPt.Y = _diagramLeftBottomPt.Y + diagramHeight;
 
            _diagramRightTopPt.X = _diagramRightBottomPt.X;
            _diagramRightTopPt.Y = _diagramLeftBottomPt.Y + diagramHeight;
 
            DxfLine lineBottom = new DxfLine(_diagramLeftBottomPt, _diagramRightBottomPt);
            lineBottom.LineWeight = 2;
            DxfLine lineLeft = new DxfLine(_diagramLeftBottomPt, _diagramLeftTopPt);
            lineLeft.LineWeight = 2;
            DxfLine lineTop = new DxfLine(_diagramLeftTopPt, _diagramRightTopPt);
            lineTop.LineWeight = 2;
            DxfLine lineRight = new DxfLine(_diagramRightBottomPt, _diagramRightTopPt);
            lineRight.LineWeight = 2;
            _dxfFileModel.Entities.Add(lineBottom);
            _dxfFileModel.Entities.Add(lineLeft);
            _dxfFileModel.Entities.Add(lineTop);
            _dxfFileModel.Entities.Add(lineRight);
 
 
 
            #region 绘制图框
            //if (_isCreataePageBorder)
            //{
            //    double A4BorderWidth = 210;
            //    double A4BorderHeight = 297;
 
            //Point2D _a4BorderXStartPt;
            //Point2D _a4BorderXEndPt;
            //Point2D _a4BorderYEndPt;
 
            //_a4BorderXStartPt = new Point2D(0, 0);
            //_a4BorderXEndPt.X = _a4BorderXStartPt.X + A4BorderWidth;
            //_a4BorderXEndPt.Y = _a4BorderXStartPt.Y;
            //_a4BorderYEndPt.X = _a4BorderXStartPt.X;
            //_a4BorderYEndPt.Y = _a4BorderXStartPt.Y + A4BorderHeight;
            //    //DxfLine lineBottom = new DxfLine(_a4BorderXStartPt, _a4BorderXEndPt);
            //    //DxfLine lineLeft = new DxfLine(_a4BorderXStartPt, _a4BorderYEndPt);
            //    //DxfLine lineTop = new DxfLine(_a4BorderYEndPt, new Point2D(_a4BorderYEndPt.X + A4BorderWidth, _a4BorderYEndPt.Y));
            //    //DxfLine lineRight = new DxfLine(_a4BorderXEndPt, new Point2D(_a4BorderXEndPt.X, _a4BorderXEndPt.Y + A4BorderHeight));
            //    //_dxfFileModel.Entities.Add(lineBottom);
            //    //_dxfFileModel.Entities.Add(lineLeft);
            //    //_dxfFileModel.Entities.Add(lineTop);
            //    //_dxfFileModel.Entities.Add(lineRight);
            //} 
            #endregion
        }
 
 
 
    }
}