Files
envi-code/SourceCode/Code2026/tg_shs/inc/pipewire/PipeStyle5.h
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

106 lines
4.1 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// PipeStyle5.h: interface for the CPipeStyle5 class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PIPESTYLE5_H__89EAB804_C135_48ED_9CD7_7162FFF941EF__INCLUDED_)
#define AFX_PIPESTYLE5_H__89EAB804_C135_48ED_9CD7_7162FFF941EF__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.
* 文 件 名: PipeStyle5.h
* 版 本: 1.0
* 描 述: 地热盘管样式五(7.5起未使用)
* 归属项目: 暖通
* 历史记录:
=============================================================================*/
typedef CArray<CPipeLine*, CPipeLine*> LINEARR;
typedef CArray<AcDbObjectId, AcDbObjectId&> ARCARR;
class CPipeStyle5
{
public:
CPipeStyle5();
// sg modify
// CPipeStyle5(XPoint rectStartPt, XPoint rectEndPt, int nDist, double dbPGAng, int nEntryType);
CPipeStyle5(XPoint rectStartPt, XPoint rectEndPt, int nDist,
double dbPGAng, int nEntryType, const int &nColorIndex = 4);
virtual ~CPipeStyle5();
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(int nNum); // 管道数是否是偶数
bool DrawSingle(XExplodeDraw &dc);
bool DrawMulti();
void CreateLeftLineArr(); // 创建1边直线
void CreateTopLineArr(); // 创建2边直线
void CreateRightLineArr(); // 创建3边直线
void CreateBottomLeftLineArr(); // 创建4边左侧直线
void CreateBottomRightLineArr(); // 创建4边右侧直线
void CreateCenterLineArr(); // 创建中心线
void CreateEndLineArr(); // 创建连接4L、4R各直线端点的直线数组
bool CreateArcArr(XExplodeDraw &dc); // 创建圆弧
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_LineArr4L; // 4边左侧直线数组
LINEARR m_LineArr4R; // 4边右侧直线数组
LINEARR m_EndLineLArr; // 连接4L各直线端点的直线数组
LINEARR m_EndLineRArr; // 连接4R各直线端点的直线数组
LINEARR m_CenLineArr; // 中间直线数组
ARCARR m_ArcArr; // 圆弧数组
double m_dbCenDist; // 中心线间距
double m_dbArcRadius; // 圆弧半径
int m_nNum; // 一边的盘管数(n)
ads_point m_CenterPt; // 矩形中心点
double m_dbDiagAng; // 对角线与矩形夹角的锐角
double m_dbDiagDist; // 对角线长度
double m_dbShortDist; // 矩形短边长度
double m_dbLongDist; // 矩形长边长度
double m_dbAssisAng; // 辅助角度(1:0 2:0 3:_PI 4:_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_PIPESTYLE5_H__89EAB804_C135_48ED_9CD7_7162FFF941EF__INCLUDED_)