230 lines
7.4 KiB
C++
230 lines
7.4 KiB
C++
// DbPump.h: interface for the TDbPump class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_DBPUMP_H__B50AFD27_FC38_4A9B_8485_175E0B471477__INCLUDED_)
|
|
#define AFX_DBPUMP_H__B50AFD27_FC38_4A9B_8485_175E0B471477__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
/*============================================================================*
|
|
* Copyright(c), 1994-2007, Beijing Tangent Engineering Software Co.Ltd.
|
|
* 作 者: 沈睿
|
|
* 创建时间: 大约在冬季
|
|
* 描 述: 水泵
|
|
* 归属项目: 给排水
|
|
* 历史记录: 2008-6-26 补头文件注释
|
|
=============================================================================*/
|
|
|
|
#include "DbEquipment.h"
|
|
|
|
class PS_EXP TDbPump : public TDbEquipment
|
|
{
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbPump);
|
|
|
|
private:
|
|
|
|
static const Adesk::UInt8 g_nVersion;
|
|
|
|
public:
|
|
|
|
TDbPump();
|
|
|
|
protected:
|
|
|
|
double m_nQ; // 流量
|
|
double m_nRaise; // 扬程
|
|
double m_nPower; // 功率 //改为进水管高度
|
|
double m_nLength; // 基座长
|
|
double m_nWidth; // 基座宽
|
|
double m_nHeight; // 基座高
|
|
XString m_sSpec; // 型号
|
|
XString m_sBlockFront; // 正剖面图块
|
|
XString m_sBlockLeft; // 左剖面图块
|
|
XString m_sSpare; // 备用
|
|
double m_nSpare; // 备用 //改为出水管高度
|
|
|
|
public:
|
|
|
|
const TCHAR* GetPumpSpec() const {
|
|
return (const TCHAR*)m_sSpec;
|
|
}
|
|
void SetPumpSpec(const TCHAR *szSpec) {
|
|
assertWriteEnabled();
|
|
m_sSpec=szSpec;
|
|
}
|
|
const TCHAR* GetBlockFront() const {
|
|
return (const TCHAR*)m_sBlockFront;
|
|
}
|
|
void SetBlockFront(const TCHAR *szBlockFront) {
|
|
assertWriteEnabled();
|
|
m_sBlockFront = szBlockFront;
|
|
}
|
|
const TCHAR* GetBlockLeft() const {
|
|
return (const TCHAR*)m_sBlockLeft;
|
|
}
|
|
void SetBlockLeft(const TCHAR *szBlockLeft) {
|
|
assertWriteEnabled();
|
|
m_sBlockLeft = szBlockLeft;
|
|
}
|
|
const TCHAR* GetSpare() const {
|
|
return (const TCHAR*)m_sSpare;
|
|
}
|
|
void SetSpare(const TCHAR *szSpare) {
|
|
assertWriteEnabled();
|
|
m_sSpare = szSpare;
|
|
}
|
|
double GetPumpSpare() const {
|
|
return m_nSpare;
|
|
}
|
|
void SetPumpSpare(double nSpare) {
|
|
assertWriteEnabled();
|
|
m_nSpare = nSpare;
|
|
}
|
|
double GetPumpQ() const {
|
|
return m_nQ;
|
|
}
|
|
void SetPumpQ(double nQ) {
|
|
assertWriteEnabled();
|
|
m_nQ = nQ;
|
|
}
|
|
double GetPumpRaise() const {
|
|
return m_nRaise;
|
|
}
|
|
void SetPumpRaise(double nRaise) {
|
|
assertWriteEnabled();
|
|
m_nRaise = nRaise;
|
|
}
|
|
double GetInPipeEle() const {
|
|
return m_nPower;
|
|
}
|
|
void SetInPipeEle(double nEle) {
|
|
assertWriteEnabled();
|
|
m_nPower = nEle;
|
|
}
|
|
double GetOutPipeEle() const {
|
|
return m_nSpare;
|
|
}
|
|
void SetOutPipeEle(double nEle) {
|
|
assertWriteEnabled();
|
|
m_nSpare = nEle;
|
|
}
|
|
double GetPumpLength() const {
|
|
return m_nLength;
|
|
}
|
|
void SetPumpLength(double nLength) {
|
|
assertWriteEnabled();
|
|
m_nLength = nLength;
|
|
}
|
|
double GetPumpWidth() const {
|
|
return m_nWidth;
|
|
}
|
|
void SetPumpWidth(double nWidth) {
|
|
assertWriteEnabled();
|
|
m_nWidth = nWidth;
|
|
}
|
|
double GetPumpHeight() const {
|
|
return m_nHeight;
|
|
}
|
|
void SetPumpHeight(double nHeight) {
|
|
assertWriteEnabled();
|
|
m_nHeight = nHeight;
|
|
}
|
|
|
|
public: // Override TDbEntity
|
|
|
|
virtual Acad::ErrorStatus GetGripText(int idx, CString &cs) const;
|
|
virtual void CopyPropertiesFrom(AcDbEntity *pSrc, unsigned gMatchFlag);
|
|
virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &dc) const;
|
|
virtual Acad::ErrorStatus ExplodeOrDraw3d(XExplodeDraw &dc) const;
|
|
virtual double GetWidth(const TDbPipePrototype* pPipe=NULL) const;
|
|
virtual void GetTips(DList<TObjInfoUnit> &) const; //取动态属性显示数据
|
|
virtual void UpdateLinkage(const XPoint &ptAt, TPipeSys::SysType st,
|
|
const DList<AcDbObjectId> &idPipes);
|
|
virtual BOOL CanLinkSide(const AcDbObjectId &idPipe, int nPos) const;
|
|
virtual int GetFirstVersion()const{return 7;}
|
|
|
|
public: // Override AcDbEntity
|
|
|
|
Acad::ErrorStatus subGetOsnapPoints(AcDb::OsnapMode osnapMode,
|
|
INT_PTR gsSelectionMark,
|
|
const AcGePoint3d& ptPick,
|
|
const AcGePoint3d& lastPoint,
|
|
const AcGeMatrix3d& viewXform,
|
|
AcGePoint3dArray& snapPoints,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler*);
|
|
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler*) const;
|
|
virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler*);
|
|
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler*) const;
|
|
|
|
public:
|
|
|
|
// cet 2009.12.11 add
|
|
virtual Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray& gripPoints,
|
|
AcDbIntArray& osnapModes,
|
|
AcDbIntArray& geomIds) const;
|
|
// cet 2009.12.11 add
|
|
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
// cet 2009.12.11 add
|
|
// 查找
|
|
TPipeInterface* FindInterface(XString sName);
|
|
// cet 2009.12.13 add
|
|
// 绘制管线接口
|
|
void DrawPipeInterface(XExplodeDraw &dc) const;
|
|
void UpdateInterface();
|
|
|
|
// virtual Acad::ErrorStatus getGripPoints(AcGePoint3dArray& gripPoints,
|
|
// AcDbIntArray& osnapModes,
|
|
// AcDbIntArray& geomIds) const;
|
|
// virtual Acad::ErrorStatus moveGripPointsAt(const AcDbIntArray& indices,
|
|
// const AcGeVector3d& offset);
|
|
// virtual Acad::ErrorStatus getStretchPoints(AcGePoint3dArray & stretchPoints) const;
|
|
// virtual Acad::ErrorStatus moveStretchPointsAt(const AcDbIntArray& indices,
|
|
// const AcGeVector3d& offset);
|
|
// virtual Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform);
|
|
|
|
public:
|
|
|
|
// cet 2011.1.20 add 剖面
|
|
virtual bool GetSection(const AcDbFace &face, const AcGeVector3d& vtPlaneSecDir,
|
|
std::vector<TObjSectionRecord> §ionRecords,
|
|
AcDbVoidPtrArray& arFillPtrs) const;
|
|
|
|
private:
|
|
|
|
// cet 2009.12.11 add
|
|
Acad::ErrorStatus MoveGSPointsAt(const AcDbIntArray& indices, const AcGeVector3d& offset);
|
|
// cet 2009.12.11 add
|
|
// 得到炸碎的实体
|
|
void GetExplodeCurves(const AcDbObjectId &id,AcArray<XCurveSegment, AcArrayObjectCopyReallocator<XCurveSegment> > &arCurves) const;
|
|
// cet 2009.12.11 add
|
|
void GetExplodeCurves(AcDbEntity *pEnt,AcArray<XCurveSegment, AcArrayObjectCopyReallocator<XCurveSegment> > &arCurves) const;
|
|
// cet 2009.12.11 add
|
|
// 判断是否连接
|
|
BOOL CheckIsConnect(const XPoint &pt,const AcArray<XCurveSegment, AcArrayObjectCopyReallocator<XCurveSegment> > &arSegs,const XLine &line,XPoint &ptCon) const;
|
|
// cet 2009.12.11 add
|
|
// 得到空闲的接口序号
|
|
int GetFreeInterfaceIndex() const;
|
|
// cet 2009.12.11 add
|
|
// 是否找到接口
|
|
bool FindInterfaceByPt(const AcGePoint3d &pt);
|
|
// cet 2009.12.17 add
|
|
// 绘制两条直线以表示管线已接入水泵的二维图形中垂直经过其边线中点
|
|
void draw2Line(XExplodeDraw &dc) const;
|
|
// cet 2009.12.18 add
|
|
// 获取水泵二维图块四条边的中点
|
|
void GetBlk2dBorderMidPt(AcGePoint3dArray &arptResult) const;
|
|
// cet 2009.12.18 add
|
|
// 获取水泵二维图块中的大圆
|
|
AcDbCircle* GetExplodeCircle() const;
|
|
|
|
};
|
|
|
|
#endif // !defined(AFX_DBPUMP_H__B50AFD27_FC38_4A9B_8485_175E0B471477__INCLUDED_)
|