189 lines
7.5 KiB
C++
189 lines
7.5 KiB
C++
#ifndef __DBIDENTITY_H
|
|
#define __DBIDENTITY_H
|
|
|
|
#include "AirState.h"
|
|
/*============================================================================*
|
|
* Copyright(c), 1994-2007, Beijing Tangent Engineering Software Co.Ltd.
|
|
* 文 件 名: DbIDEntity.h
|
|
* 版 本: 1.0
|
|
* 作 者: lzh
|
|
* 创建时间: 2007-12-13
|
|
* 描 述: 焓湿图
|
|
* 归属项目: 暖通
|
|
* 历史记录:
|
|
=============================================================================*/
|
|
|
|
class PS_EXP TDbIDEntity : public TDbEntity
|
|
{
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbIDEntity);
|
|
private:
|
|
static const Adesk::UInt8 g_nVersion;
|
|
|
|
public:
|
|
TDbIDEntity(AcGePoint3d pt);
|
|
TDbIDEntity();
|
|
|
|
protected:
|
|
//{{AFX_ARX_DATA(TDbIDEntity)
|
|
//}}AFX_ARX_DATA
|
|
AcGePoint3d m_ptInsert;
|
|
double m_dbB;
|
|
protected:
|
|
//颜色
|
|
Adesk::UInt16 m_FrameColor; //边框颜色
|
|
Adesk::UInt16 m_DColor;//干球温度颜色
|
|
Adesk::UInt16 m_HRColor;//含湿量颜色
|
|
Adesk::UInt16 m_RHColor;//相对湿度颜色
|
|
Adesk::UInt16 m_EColor;//焓线颜色
|
|
Adesk::UInt16 m_TextColor;//标注文字颜色
|
|
Adesk::UInt16 m_HWColor;//热湿比线颜色
|
|
Adesk::UInt16 m_WPColor;//水蒸气分压力颜色
|
|
//间隔
|
|
double m_dbInterval_D;//温度间隔
|
|
double m_dbInterval_HR;//含湿量间隔
|
|
double m_dbInterval_E;//焓间隔
|
|
double m_dbInterval_RH;//相对湿度线间隔
|
|
//是否绘制
|
|
BOOL m_bFrame;
|
|
BOOL m_bD;
|
|
BOOL m_bHR;
|
|
BOOL m_bRH;
|
|
BOOL m_bE;
|
|
BOOL m_bHW;//是否绘制热湿比
|
|
|
|
AcDbHardPointerId m_IdLabelStyle;
|
|
|
|
protected:
|
|
Adesk::UInt8 m_nSpare;
|
|
double m_dbSpare;
|
|
XString m_szSpare;
|
|
XString m_szCity;
|
|
|
|
|
|
private:
|
|
//--------------------------------------------------------------------------
|
|
Adesk::Boolean PLine(AcDbPolyline& PLine,AcGePoint3dArray ptAr,Adesk::UInt16 color,double dbWidth = 0)const;
|
|
//绘制pline线
|
|
Adesk::Boolean DrawPLine(XExplodeDraw &dc,AcGePoint3dArray ptAr,Adesk::UInt16 color,double dbWidth = 0)const;
|
|
//绘制线
|
|
Adesk::Boolean DrawLine(XExplodeDraw &dc,AcGePoint3d pt1,AcGePoint3d pt2,Adesk::UInt16 color,double dbWidth = 0)const;
|
|
//--------------------------------------------------------------------------
|
|
protected:
|
|
Acad::ErrorStatus DrawFrame(XExplodeDraw &dc) const;//绘制边框
|
|
Acad::ErrorStatus DrawRH100Line(XExplodeDraw &dc) const;//绘制100%相对湿度线
|
|
Acad::ErrorStatus DrawHRLine(XExplodeDraw &dc)const;//绘制含湿量线
|
|
Acad::ErrorStatus DrawDLine(XExplodeDraw &dc)const;//绘制等温线
|
|
Acad::ErrorStatus DrawRHLine(XExplodeDraw &dc)const;//绘制相对湿度线
|
|
Acad::ErrorStatus DrawELine(XExplodeDraw &dc)const;//绘制等焓线
|
|
Acad::ErrorStatus DrawTitle(XExplodeDraw &dc)const;//绘制标题
|
|
Acad::ErrorStatus DrawWPLine(XExplodeDraw &dc)const;//绘制水蒸气分压力
|
|
Acad::ErrorStatus DrawHWLine(XExplodeDraw &dc)const;//热湿比刻度
|
|
//--------------------------------------------------------------------------
|
|
double GetNear15D()const;
|
|
public:
|
|
void GetMarginPoints(AcGePoint3dArray &ptAr);
|
|
public:
|
|
AcGePoint3d GetPoint(CAirState As)const;
|
|
CAirState GetDot(AcGePoint3d pt);
|
|
BOOL IsRightAirStateDot(AcGePoint3d pt);
|
|
BOOL IsRightAirStateDot(CAirState As);
|
|
//--------------------------------------------------------------------------
|
|
public:
|
|
void SetBasePoint(AcGePoint3d pt);
|
|
void GetInsertPoint(AcGePoint3d& pt){pt = m_ptInsert;};
|
|
void GetAcGePoint3d(AcGePoint3d& Basept,AcGePoint3d& LeftBottom,AcGePoint3d& RightTop)const;
|
|
double GetFrameWidth();
|
|
double GetFrameHeight();
|
|
|
|
double GetB(){return m_dbB;};
|
|
void SetB(double dbB){m_dbB = dbB; recordGraphicsModified();};
|
|
|
|
Adesk::UInt16 GetFrameColor(){return m_FrameColor;};
|
|
void SetFrameColor(Adesk::UInt16 color){m_FrameColor = color; recordGraphicsModified();};
|
|
|
|
Adesk::UInt16 GetDColor(){return m_DColor;};
|
|
void SetDColor(Adesk::UInt16 color){m_DColor = color; recordGraphicsModified();};
|
|
|
|
|
|
Adesk::UInt16 GetHRColor(){return m_HRColor;};
|
|
void SetHRColor(Adesk::UInt16 color){m_HRColor = color; recordGraphicsModified();};
|
|
|
|
Adesk::UInt16 GetRHColor(){return m_RHColor;};
|
|
void SetRHColor(Adesk::UInt16 color){m_RHColor = color; recordGraphicsModified();};
|
|
|
|
Adesk::UInt16 GetEColor(){return m_EColor;};
|
|
void SetEColor(Adesk::UInt16 color){m_EColor = color; recordGraphicsModified();};
|
|
|
|
Adesk::UInt16 GetTextColor(){return m_TextColor;};
|
|
void SetTextColor(Adesk::UInt16 color){m_TextColor = color; recordGraphicsModified();};
|
|
|
|
Adesk::UInt16 GetHWColor(){return m_HWColor;};
|
|
void SetHWColor(Adesk::UInt16 color){m_HWColor = color; recordGraphicsModified();};
|
|
|
|
Adesk::UInt16 GetWPColor(){return m_WPColor;};
|
|
void SetWPColor(Adesk::UInt16 color){m_WPColor = color; recordGraphicsModified();};
|
|
|
|
double GetInterval_D(){return m_dbInterval_D;};
|
|
void SetInterval_D(double dbInterval_D){m_dbInterval_D = dbInterval_D; recordGraphicsModified();};
|
|
|
|
double GetInterval_HR(){return m_dbInterval_HR;};
|
|
void SetInterval_HR(double dbInterval_HR){m_dbInterval_HR = dbInterval_HR; recordGraphicsModified();};
|
|
|
|
double GetInterval_RH(){return m_dbInterval_RH;};
|
|
void SetInterval_RH(double dbInterval_RH){m_dbInterval_RH = dbInterval_RH; recordGraphicsModified();};
|
|
|
|
double GetInterval_E(){return m_dbInterval_E;};
|
|
void SetInterval_E(double dbInterval_E){m_dbInterval_E = dbInterval_E; recordGraphicsModified();};
|
|
|
|
BOOL GetIsDrawFrame(){return m_bFrame;};
|
|
void SetIsDrawFrame(BOOL bFrame){m_bFrame = bFrame;recordGraphicsModified();};
|
|
BOOL GetIsDrawD(){return m_bD;};
|
|
void SetIsDrawD(BOOL bD){m_bD = bD;recordGraphicsModified();};
|
|
BOOL GetIsDrawHR(){return m_bHR;};
|
|
void SetIsDrawHR(BOOL bHR){m_bHR = bHR;recordGraphicsModified();};
|
|
BOOL GetIsDrawRH(){return m_bRH;};
|
|
void SetIsDrawRH(BOOL bRH){m_bRH = bRH;recordGraphicsModified();};
|
|
BOOL GetIsDrawE(){return m_bE;};
|
|
void SetIsDrawE(BOOL bE){m_bE = bE;recordGraphicsModified();};
|
|
BOOL GetIsDrawHW(){return m_bHW;};
|
|
void SetIsDrawHW(BOOL bHW){m_bHW = bHW;recordGraphicsModified();};
|
|
|
|
void SetTextStyleObjectId(AcDbObjectId Id){m_IdLabelStyle = Id;};
|
|
|
|
void SetCityName(CString szCityName){m_szCity = szCityName;};
|
|
XString GetCityName(){return m_szCity;};
|
|
|
|
public: // Override TDbEntity
|
|
virtual void CopyPropertiesFrom(AcDbEntity *pSrc, unsigned gMatchFlag);
|
|
virtual void GetTips(DList<TObjInfoUnit> &) const; //取动态属性显示数据
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &dc) const;
|
|
virtual Acad::ErrorStatus ExplodeOrDraw3d(XExplodeDraw &dc) const{return ExplodeOrDraw2d(dc);};
|
|
|
|
virtual int GetFirstVersion() const { return 7; }
|
|
|
|
public: // Override AcDbEntity
|
|
virtual Acad::ErrorStatus copyFrom(const AcRxObject* pSrc);
|
|
virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
|
|
virtual void subList() const;
|
|
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
virtual Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray& gripPoints,
|
|
AcDbIntArray& osnapModes,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Acad::ErrorStatus subGetOsnapPoints(AcDb::OsnapMode osnapMode,
|
|
INT_PTR gsSelectionMark,
|
|
const AcGePoint3d& pickPoint,
|
|
const AcGePoint3d& lastPoint,
|
|
const AcGeMatrix3d& viewXform,
|
|
AcGePoint3dArray& snapPoints,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
|
|
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* pFiler) const;
|
|
virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler* pFiler);
|
|
virtual Acad::ErrorStatus GetGripText(int idx, CString &cs) const;
|
|
};
|
|
|
|
|
|
|
|
#endif // !defined(ARX__TDBIDENTITY_H__20071212_140331)
|