// SSearchPipeList.h: interface for the SSearchPipeList class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_SSEARCHPIPELIST_H__C5693932_4B07_4994_B306_71DAE68AB9EF__INCLUDED_) #define AFX_SSEARCHPIPELIST_H__C5693932_4B07_4994_B306_71DAE68AB9EF__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class SSearchPipeList { public: SSearchPipeList(){m_ID = NULL; m_iDn = 0; m_nDang = 0; m_nI = 0; m_nV = 0; m_csName = _T(""), m_iType = 0; m_iNum = 0; m_bNeedCale = FALSE; m_nLength = 0; m_pPrevious = NULL;m_nStartPress=0;m_nLost=0;m_nPipeQ=0;m_nSpare=0;}; AcDbObjectId m_ID; int m_iNum; int m_iType; //0:管 1:节点 2:喷头 3:井 4:化粪池 int m_iDn; //管径 int m_iSpare; //保留 BOOL m_bNeedCale; CString m_csName; //0:管段名称 1/2:节点名称 double m_nLength; //管长 double m_nPipeQ; //管段流量 double m_nDang; //当量长度 double m_nStartPress; //起点压力 double m_nI; //水力坡降 mH2O/m double m_nV; //流速 m/s double m_nLost; //沿程损失 double m_nSpare; //保留 TEntityFields fd; //扩展数据 SSearchPipeList *m_pPrevious; DList m_lstNode; }; TELAPI double GetPipeGradient(Entity ent); TELAPI BOOL SearchSprinkPipeSys(Entity ent, AcDbObjectId idFront, SSearchPipeList *pListAll, PickSet &ssAll); TELAPI void GetAllPipeAndNodeByPipe(AcDbObjectId pipeId, AcDbObjectId idFront, PickSet &ss); TELAPI void GetAllPipeAndNodeByNode(AcDbObjectId nodeId, AcDbObjectId idFront, PickSet &ss); TELAPI int GetNodeType(Entity ent); TELAPI BOOL GetEquipNameById(AcDbObjectId id, CString &csBlkName, CString &csDesName, int &iItem); TELAPI BOOL IsPool(AcDbObjectId idNode); TELAPI BOOL IsSprinkler(AcDbObjectId idNode); TELAPI BOOL IsPlanHydrant(AcDbObjectId idNode); TELAPI BOOL IsHydrant(Entity ent); TELAPI BOOL IsHydrant(AcDbObjectId idNode); TELAPI BOOL IsSprinkler(Entity ent); TELAPI BOOL IsSysSprinkler(AcDbObjectId idNode); TELAPI BOOL IsEquipment(AcDbObjectId id); TELAPI BOOL IsValve(AcDbObjectId id); TELAPI BOOL IsPipeLabel(AcDbObjectId id); TELAPI BOOL IsWell(AcDbObjectId id); TELAPI CString I2Str(double i); TELAPI CString GetWellName(Entity ent); TELAPI CString GetWellName(AcDbObjectId id); TELAPI CString GetEquipBlkName(Entity ent); TELAPI Entity GetEquipmentByPt(XPoint &pt, int nSnap = 0.2*DocGetPScale(), const TCHAR* szLayer = _T("*")); TELAPI BOOL IsAppandEquip(DList &lstNode, AcDbObjectId id); TELAPI double GetValBetween2(double n1, double n2, double nRange1, double nRange2, double nFactor); //给排水搜索计算 TELAPI BOOL DoDimSerialNumber(AcDbObjectId id, int idx); TELAPI void DoDimPipeSerialNumber(SSearchPipeList *pListAll); TELAPI int GetAncestorSerial(SSearchPipeList *pListLast); TELAPI int GetFirstAncestorSerial(SSearchPipeList *pListLast); TELAPI void CalcPipeLength2(SSearchPipeList *pListAll, SSearchPipeList *pListFront); TELAPI void CalcPipeLength(SSearchPipeList *pListAll); TELAPI SSearchPipeList *GetNextDimNode2(SSearchPipeList *pListAll, SSearchPipeList *pDisadvantage); TELAPI int DoSerialNumber2(SSearchPipeList *pListLast, int idx); TELAPI BOOL CalcLstPipeLength(SSearchPipeList *pListAll, SSearchPipeList *pListFront, PickSet &ss); TELAPI SSearchPipeList *GetPipeNodeByName(SSearchPipeList *pListAll, CString csName, SSearchPipeList *pNode); #endif // !defined(AFX_SSEARCHPIPELIST_H__C5693932_4B07_4994_B306_71DAE68AB9EF__INCLUDED_)