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

142 lines
5.3 KiB
C++

#ifndef __THIMPHVACEGROUP_H__
#define __THIMPHVACEGROUP_H__
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TImpSpecEquipment.h"
// 空气机组实现类
class TDbHvacEquipment;
class THImpHvacEGroup : public TImpSpecEquipment
{
public:
THImpHvacEGroup();
virtual ~THImpHvacEGroup();
public:
virtual void GetKindName(CString& sName);
virtual BOOL SetInterfaceRelation(const AcGePoint3d& ptConnect,const AcDbObjectId& idConnect);
virtual BOOL RemoveInterfaceRelation(const AcGePoint3d& ptConnect,const AcDbObjectId& idConnect);
virtual BOOL GetInterface(int nIndex,TInterface& pipeInterface) const;
virtual BOOL GetInterface(const AcGePoint3d& ptCon,TInterface& pipeInterface) const;
virtual BOOL HasInterface(const AcGePoint3d& ptCon,const AcGeVector3d& vtDir);
virtual int GetInterfaceCount() const;
virtual void list() const;
virtual TDb::Position ExplainGripIndex(int nIndex) const;
virtual Acad::ErrorStatus getClassID(CLSID* pClsid) const;
virtual Acad::ErrorStatus GetGripText(int i, CString &cs) const;
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &mode) const;
virtual Acad::ErrorStatus ExplodeOrDraw3d(XExplodeDraw &mode) const;
virtual Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform);
virtual Acad::ErrorStatus moveGripPointsAt(const AcDbIntArray& indices,
const AcGeVector3d& offset);
virtual Acad::ErrorStatus getOsnapPoints(AcDb::OsnapMode osnapMode, INT_PTR gsSelectionMark,
const AcGePoint3d& pickPoint, const AcGePoint3d& lastPoint,
const AcGeMatrix3d& viewXform, AcGePoint3dArray& snapPoints,
AcDbIntArray& geomIds) const;
virtual Acad::ErrorStatus getGripPoints(AcGePoint3dArray& gripPoints, AcDbIntArray& osnapModes,
AcDbIntArray& geomIds) const;
// 接口更改通知
virtual BOOL NotifyInterfaceToModify(const TInterfaceModifyMsg& iModiMsg,TInterfaceModifyMsgs& iModiMsgs);
// 夹点移动消息处理
BOOL OnMoveGripPointMsgNotify(const TInterfaceModifyMsg& iModiMsg, TInterfaceModifyMsgs& iModiMsgs);
//获取三维的壳对象
virtual int GetXBaseShell(TXShell& xShell);
//获取体的范围方块
virtual int GetBodyBox(AcDbExtents& ext) const;
// 根据参数名称获得实体的OPM信息,pszName:参数名称(XMap key值)
virtual BOOL OPMInfo(LPCTSTR pszName, TDb::OPMInfo* pInfo);
// 目前技术问题,暂不支持
// virtual void SetSubText(long i,CString sText);
// add by hh 2010-12-27 导出XML
// virtual CString GetXml() const;
virtual CString GetXml(const AcGeMatrix3d& mat) const;
private:
BOOL GetSeg2DId(int iIdx, AcDbObjectId &id) const;
double GetTotalWidth() const;
double GetTotalThick() const;
BOOL GetInterFaceLocal(int nIndex, AcGeVector3d &vt) const;
// 通过接口索引获得夹点命令码
int GetCmdType(int iIdx) const;
// 将接口索引拆分成子箱体的索引及子箱体接口索引
// 参数输入接口索引也输出子箱体接口索引, 返回值为子箱体索引
int ConvertToEquIndex(int &iIdx) const;
// 通过接口位置点来获得接口索引值
BOOL GetIFIndexFormPt(int &nIndex, const AcGePoint3d &pt) const;
// 通过接口索引来获得接口位置点
BOOL GetIFPoint(int iIdx, AcGePoint3d &pt) const;
// 通过子箱体索引,获得子箱体的基点
BOOL GetEquBasePoint(int iIndex, AcGePoint3d &ptBase) const;
// 绘制侧视图标注
void MakeSideViewDim(XExplodeDraw &mode) const;
// 将一段汉字拆分成单字,填充到CString数组中(用于竖向显示箱体段名称)
BOOL GetSubText(CString &sText, CStringArray &arText) const;
// 绘制模板文字,目前模版文字分离实体,单独布置为多行文字
void MakeTemplateText(XExplodeDraw &mode) const;
// 绘制俯视图
void MakePlanform2D(XExplodeDraw &mode) const;
// 绘制侧视图的简图画法中的 箱体外框
void MakeDiagramCurve(XExplodeDraw &mode) const;
// 绘制侧视图的简图画法中的 箱体名称
void MakeDiagramText(XExplodeDraw &mode) const;
// 获取简图画法中箱体外框的关键点:arPts为输出参数,pMap为输入参数(子箱体的map数据)
// dOffset输入参数(用于绘制立式底层被遮挡的子箱体外框),bNor输入参数(用于通知子箱体是否被遮挡)
void GetBoxPts(AcGePoint3dArray &arPts, TDbXDataMap *pMap, double dOffset = 0.0, BOOL bNor = TRUE) const;
// 获取子箱体外框的线段数据
void MakeBoxCurve(TComplexCurve &cplCurve, AcGePoint3dArray &arPts) const;
// 绘制子箱体:pMap为输入参数(子箱体的map数据)
// dOffset输入参数(用于绘制立式底层被遮挡的子箱体外框),bNor输入参数(用于通知子箱体是否被遮挡)
void DrawBox(XExplodeDraw &mode, TDbXDataMap *pMap, double dOffset = 0.0, BOOL bNor = TRUE) const;
// 获得机组总长
double GetTotalLen() const;
// 创建绘制用的TDbMText
TDbMText* CreateMText(TDbXDataMap *pMap) const;
// 创建绘制用的标注实体
AcDbAlignedDimension* CreateDimension(AcGePoint3d xLinePt1, AcGePoint3d xLinePt2, AcGePoint3d dimLinePt) const;
//为移动设备接口,获取其他控制接口
void GetOtherCtrlGrip(AcGePoint3dArray &arrPt ) const;
// 获取角点吸附点
void GetConerOsnapPt(AcGePoint3dArray &arrPt) const;
private:
// 用于子箱体的侧面绘制及其他部分功能
TDbHvacEquipment *m_pHvacEquipment;
};
#endif // !defined(__THIMPHVACEGROUP_H__)