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
|
}
|
|
|
|
}
|
}
|