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

161 lines
7.3 KiB
C++

#ifndef _THIMPHVACEQUIPMENT_H__
#define _THIMPHVACEQUIPMENT_H__
#if _MSC_VER > 1000
#pragma once
#endif
#include "TImpSpecEquipment.h"
class THImpHvacEquipment : public TImpSpecEquipment
{
public:
THImpHvacEquipment();
virtual ~THImpHvacEquipment();
// 接口描述对象
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 BOOL SetInterfaceRelation(const AcGePoint3d& ptConnect,const AcDbObjectId& idConnect);
//移除接口关联关系
virtual BOOL RemoveInterfaceRelation(const AcGePoint3d& ptConnect,const AcDbObjectId& idConnect);
// 接口更改通知
virtual BOOL NotifyInterfaceToModify(const TInterfaceModifyMsg& iModiMsg,TInterfaceModifyMsgs& iModiMsgs);
// 夹点移动消息处理
BOOL OnMoveGripPointMsgNotify(const TInterfaceModifyMsg& iModiMsg, TInterfaceModifyMsgs& iModiMsgs);
// 获取2维显示的所有曲线
virtual BOOL MakeCurves(TComplexCurve& cplCurve) const;
// 获取2维边界内显示的曲线
virtual BOOL GetCurvesInSide(TComplexCurve& compCurve) const;
// 获取2维显示的边界pl线
virtual AcDbPolyline* MakePolyCurve() const;
// 获取2维边界围城的面
virtual BOOL MakePolyCurveFaces(AcDbVoidPtrArray& arFaces);
// 获取对象类型名称 [es. 弯头--> TCH_EELBOW]
virtual void GetKindName(CString& sName);
//自身边界
virtual BOOL GetGeomExtentsEdge(TComplexCurve& crLoop);
// 解释夹点
virtual TDb::Position ExplainGripIndex(int nIndex) const;
// 夹点提示
virtual Acad::ErrorStatus GetGripText(int i, CString &cs) const;
// 对象查询
virtual void GetTips(CMapStringToString& mapLable2Tip) const;
//获取三维的壳对象
virtual int GetXBaseShell(TXShell& xShell);
//获取体的范围方块
virtual int GetBodyBox(AcDbExtents& ext) const;
// add by hh 2010-12-27 导出XML
// virtual CString GetXml() const;
virtual CString GetXml(const AcGeMatrix3d& mat) const;
// add by hh 2011-09-28 取得图块中所有图元的的几何数据
virtual BOOL GetBlockComplexCurve(TComplexCurve& curve) const;
// 判断是否接口线
virtual BOOL IsInterfaceLine(AcDbEntity* pEnt, AcGeMatrix3d* pMat = NULL) const;
// 自定义设备图块可能包含一些图块,这些图块中有些实体无法提取图元,则递归遍历这些图块,找到块中所有无法提取图元的实体,稍后单独绘制Lixl add 2011-12-14
// idBlock 自定义设备图块
// arVoidPtr 返回的实体指针数组
// bFlag TRUE 获得自定义设备图块包含的这些图块中无法提取图元的实体指针到arVoidPtr
// FLASE 获得自定义设备图块包含的这些图块中可以提取图元的实体指针到arVoidPtr
void GetEntFromBlock(AcDbBlockReference* pBlockRef, AcDbVoidPtrArray& arVoidPtr, BOOL bFlag) const;
void DrawNotSupplyBlock(AcDbObjectId idBlock, XExplodeDraw& mode) const;
// add by hh 2014-08-06 支持设备与水管遮挡
virtual Acad::ErrorStatus GetClipBoundary(TGGePoly2D& poly)const;
virtual bool IsMeClip() const;
virtual bool IsClipMe(const TEntityBase* pEnt=NULL)const;//ok是否被裁剪
public:
//{{AFX_ARX_METHODS(TImpSpecEquipment)
virtual Acad::ErrorStatus ExplodeOrDrawBlock2d(XExplodeDraw &mode) const;
virtual Acad::ErrorStatus ExplodeOrDrawText2d(XExplodeDraw &mode) const;
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &mode) const;
virtual Acad::ErrorStatus ExplodeOrDraw3d(XExplodeDraw &mode) const;
virtual void list() const;
virtual Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform);
virtual Acad::ErrorStatus moveGripPointsAt(const AcDbIntArray& indices,
const AcGeVector3d& offset);
virtual Acad::ErrorStatus moveStretchPointsAt(const AcDbIntArray& indices,
const AcGeVector3d& offset);
Acad::ErrorStatus getStretchPoints(AcGePoint3dArray& stretchPoints) const;
virtual Acad::ErrorStatus intersectWith(const AcDbEntity* pEnt,
AcDb::Intersect intType,
const AcGePlane& projPlane,
AcGePoint3dArray& points,
INT_PTR thisGsMarker = 0,
INT_PTR otherGsMarker = 0) const;
virtual Acad::ErrorStatus intersectWith(const AcDbEntity* pEnt,
AcDb::Intersect intType,
AcGePoint3dArray& points,
INT_PTR thisGsMarker = 0,
INT_PTR otherGsMarker = 0) const;
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 Acad::ErrorStatus getGeomExtents(AcDbExtents& extents) const;
virtual Acad::ErrorStatus getClassID(CLSID* pClsid) const;
virtual Acad::ErrorStatus explode(AcDbVoidPtrArray& entitySet) const;
virtual BOOL OPMInfo(LPCTSTR pszName, TDb::OPMInfo* pInfo);
//virtual AecObjectEditMethod GetEditMethod() const;
//}}AFX_ARX_METHODS
private:
Acad::ErrorStatus Draw2dBox(XExplodeDraw &mode) const;
BOOL GetBoxPts(AcGePoint3dArray &arPts) const;
AcGeVector3d GetNormal() const;
Acad::ErrorStatus InserBlockCen(XExplodeDraw &mode,AcDbObjectId idBlock) const;
Acad::ErrorStatus InserBlockHand(XExplodeDraw &mode) const;
BOOL GetInterfaceSizeData(int nIndex, TInterface& pipeInterface) const;
//得到接口的位置信息接口nIndex需要-1因为第一个接口为设备位置点。
BOOL GetInterFaceLocal(AcGePoint3dArray& arpts) const;
BOOL SetInterFaceLocal(const AcGeMatrix3d& xform) const;
BOOL SetInterFaceLocal(const AcGeScale3d& scale3d) const;
BOOL GetInterFaceLocal(int nIndex, int &nType) const;
BOOL GetInterFaceLocal(int nIndex, CString &sName) const;
BOOL GetInterFaceLocal(int nIndex, AcGePoint3d &pt) const;
BOOL GetInterFaceLocal(int nIndex, AcGeVector3d &vt) const;
BOOL GetInterFaceLocal(int nIndex, double &dWidth, double &dHeight) const;
BOOL GetIFIndexFormPt(int &nIndex, const AcGePoint3d &pt) const;
//为移动设备接口,接口线跟着走所设
BOOL GetInterfaceFromXdata(const int& nIndex, const AcGeVector3d& vtOff) const;
void GetFourConer(AcGePoint3dArray &arrPt) const;
// 取得设备相对于原始图块的变换矩阵
BOOL GetEquTransMatrix(const AcDbObjectId& idBlock, AcGeMatrix3d& mat) const;
// AcDbPolyline* m_pOutLine; // 保存外轮廓线 实时取得的话,效率实在太低
AcDbObjectIdArray m_arUserBlk; // 保存包含用户自定义设备中无法提取图元(如: 文字,填充等)的图块的数组,单独绘制
};
#endif //_THImpHvacEquipment_H__