Files
envi-code/SourceCode/Code2026/tg_shs/inc/pipewire/PipeStyle6.h
T

100 lines
3.5 KiB
C++
Raw Normal View History

2026-09-28 15:28:50 +08:00
// PipeStyle6.h: interface for the CPipeStyle6 class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PIPESTYLE6_H__4FCAC567_4C1B_4C98_9636_2DA37EC2FEE6__INCLUDED_)
#define AFX_PIPESTYLE6_H__4FCAC567_4C1B_4C98_9636_2DA37EC2FEE6__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "PipeLine.h"
#include <afxtempl.h>
/*============================================================================*
* Copyright(c), 1994-2007, Beijing Tangent Engineering Software Co.Ltd.
* 文 件 名: PipeStyle6.h
* 版 本: 1.0
* 描 述: 地热盘管样式六(7.5起未使用)
* 归属项目: 暖通
* 历史记录:
=============================================================================*/
typedef CArray<CPipeLine*, CPipeLine*> LINEARR;
typedef CArray<AcDbObjectId, AcDbObjectId&> ARCARR;
class CPipeStyle6
{
public:
CPipeStyle6();
// sg modify
// CPipeStyle6(XPoint rectStartPt, XPoint rectEndPt, int nDist, double dbPGAng, int nEntryType);
CPipeStyle6(XPoint rectStartPt, XPoint rectEndPt, int nDist,
double dbPGAng, int nEntryType, const int &nColorIndex = 4);
virtual ~CPipeStyle6();
void SetStartPt(ads_point rectStartPt);
void SetDist(int nDist);
void SetPGAng(double dbPGAng);
void SetEntryType(int nEntryType);
bool DrawPGLine(XExplodeDraw &dc);
XPoint GetEntryPt(int nNum);
protected:
void NormalizeRect(); // 转换矩形到躺倒位置
void GetVirtaulRect(); // 得到虚拟矩形的四个顶点
void GetCenterPt(); // 得到矩形的中心点
void GetDiagAng(); // 得到对角线的锐角
void GetLengthofSide(); // 得到矩形边长
void TransToActualPt(ads_point point, ads_point retPt); // 将虚拟点转换到真实坐标
void TransToVirtualPt(ads_point point, ads_point retPt); // 将真实坐标转换到虚拟点
bool CreateArc(ads_point StartPt, ads_point EndPt, ads_point CenPt, AcDbObjectId& ObjID,XExplodeDraw &dc); // 创建一个圆弧
void GetArcCenterPt(ads_point EndPt, double dbAng, ads_point& actCenPt); // 得到圆弧圆心
bool IsEvenNum(); // 管道数是否是偶数
bool DrawMulti();
void CreateLeftLineArr(int nNum); // 创建1边直线
void CreateTopLineArr(); // 创建2边直线
void CreateRightLineArr(); // 创建3边直线
void CreateBottomLineArr(); // 创建4边直线
void CreateCenterLine(); // 创建中心线
bool CreateArcArr(XExplodeDraw &dc); // 创建圆弧
void CreateOutLine(); // 创建出口管线
protected:
ads_point m_rectStartPt; // 矩形起点
ads_point m_rectEndPt; // 矩形终点
int m_nDist; // 间距
double m_dbPGAng; // 矩形倾斜角
int m_nEntryType; // 入口类型
LINEARR m_LineArr1; // 1边直线数组
LINEARR m_LineArr2; // 2边直线数组
LINEARR m_LineArr3; // 3边直线数组
LINEARR m_LineArr4; // 4边直线数组
ARCARR m_ArcArr; // 圆弧数组
double m_dbCenDist; // 中心线间距
double m_dbArcRadius; // 圆弧半径
int m_nNum; // 一边的盘管数(n)
CPipeLine *m_pCenLine; // 中心线
CPipeLine *m_pOutLine; // 出口管线
ads_point m_CenterPt; // 矩形中心点
double m_dbDiagAng; // 对角线与矩形夹角的锐角
double m_dbDiagDist; // 对角线长度
double m_dbShortDist; // 矩形短边长度
double m_dbLongDist; // 矩形长边长度
double m_dbAssisAng; // 辅助角度(1:0 2:0.5*_PI 3:1.5*_PI 4:0 5:_PI 6:1.5*_PI 7:0.5*_PI 8:_PI)
double m_dbNormAng; // 转换矩形后的角度(一般为0,转换后为0.5*_PI)
ads_point m_ptLT; // 虚拟矩形左上角
ads_point m_ptLB; // 虚拟矩形左下角
ads_point m_ptRT; // 虚拟矩形右上角
ads_point m_ptRB; // 虚拟矩形右下角
int m_nColorInd; // 颜色,sg add
};
#endif // !defined(AFX_PIPESTYLE6_H__4FCAC567_4C1B_4C98_9636_2DA37EC2FEE6__INCLUDED_)