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

235 lines
7.5 KiB
C++

// DbWell.h: interface for the TDbWell class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DBWELL_H__3BBE3EAC_CAF0_4759_B2A5_EBD4009553F2__INCLUDED_)
#define AFX_DBWELL_H__3BBE3EAC_CAF0_4759_B2A5_EBD4009553F2__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"
#include "DbPipeLabel.h"
#include "DbConfluenceArea.h"
class PS_EXP TDbWell : public TDbEquipment, public TLabelStyle
{
DECLARE_TENTBASE();
ACRX_DECLARE_MEMBERS(TDbWell);
private:
static const Adesk::UInt8 g_nVersion;
public:
TDbWell();
protected:
XString m_sWellName; // 井编号
XPoint m_ptLabel; // 标注点
double m_nEleDown; // 井底标高
double m_nEleUp; // 地面标高
double m_nWellDn; // 井直径
BOOL m_bDrawLabel; // 是否显示标注
AcDbHardPointerId m_idLabelLayer;// 标注文字图层
BOOL m_bDrawProperty; // 在管线中点位置显示标高属性 Not Database Resident
bool m_bIsModify; // 是否更新管底标注位置 zxl 2013.09.29 add
public:
void SetLabelLocation(const XPoint &pt) {// 标注位置
assertWriteEnabled();
m_ptLabel = pt;
}
XPoint GetLabelLocation() const {
return m_ptLabel;
}
const TCHAR* GetWellName() const {
return (const TCHAR*)m_sWellName;
}
void SetWellName(const TCHAR *szLab) {
assertWriteEnabled();
m_sWellName=szLab;
m_bIsModify = true;
}
double GetWellEleUp() const {
return m_nEleUp;
}
void SetWellEleUp(double nEleUp) {
assertWriteEnabled();
m_nEleUp = nEleUp;
}
double GetWellEleDown() const {
return m_nEleDown;
}
void SetWellEleDown(double nEleDown) {
assertWriteEnabled();
m_nEleDown = nEleDown;
}
double GetWellDn() const {
return m_nWellDn;
}
void SetWellDn(double nWellDn) {
assertWriteEnabled();
m_nWellDn = nWellDn;
}
BOOL IsDropWell() const {
if(m_dDang > 0.6)
return TRUE;
else
return FALSE;
}
void SetDropWell(BOOL bFlag) {
assertWriteEnabled();
if(bFlag)
m_dDang = 1.0;
else
m_dDang = 0;
}
BOOL IsDrawLabel() const {
return m_bDrawLabel;
}
void EnableDrawLabel(BOOL bFlag, double nScale = 1.2) {
assertWriteEnabled();
m_bDrawLabel = bFlag;
if(m_bDrawLabel && !m_ptLabel)
InitLabelLocation(nScale);
}
AcDbObjectId GetLabelLayer() const {
return m_idLabelLayer;
}
void SetLabelLayer(const AcDbObjectId& id) {
assertWriteEnabled();
m_idLabelLayer = id;
}
void DrawPropertyText(BOOL bDraw) {
m_bDrawProperty=bDraw;
}
BOOL IsShowPropertyText() const {
return m_bDrawProperty;
}
//cet 2011.8.25 add 增加井编号标注角度
double GetDimAngle() const
{
assertReadEnabled();
const TEntityFields &fd = GetFields();
double dAngle = 0.0;
fd.GFD(_T("WELL_DIMANGLE"), dAngle);
return dAngle;
}
void SetDimAngle(double dAngle)
{
assertWriteEnabled();
TEntityFields &fd = Fields();
fd.SFD(_T("WELL_DIMANGLE"), dAngle);
}
void SetWellModify()
{
m_bIsModify = true;
}
//zxl 2013.12.11 add
AcDbObjectId GetSpaceId() const
{
assertReadEnabled();
const TEntityFields &fd = GetFields();
AcDbSoftPointerId id = NULL;
fd.GFD(_T("ID_SPACE"), id);
return (AcDbObjectId)id;
}
void SetSpaceId(AcDbSoftPointerId id)
{
assertWriteEnabled();
TEntityFields &fd = Fields();
fd.SFD(_T("ID_SPACE"), (AcDbSoftPointerId)id);
}
// zxl 2014.02.11 add 是否更新井上的汇流面积和井底标注,对速度有要求时可设置为false,仅对本次操作有效
void SetUpdatable(BOOL bUpdata)
{
assertWriteEnabled();
TEntityFields &fd = Fields();
fd.SFD(_T("UPDATA"), bUpdata);
}
BOOL GetUpdatable()
{
assertReadEnabled();
const TEntityFields &fd = GetFields();
BOOL bRet = true;
fd.GFD(_T("UPDATA"), bRet);
return bRet;
}
void SetPipeEndEle(AcDbObjectId id, const TCHAR* szEle);
public: // Override TDbEntity
virtual double GetWidth(const TDbPipePrototype* pPipe=NULL) const;
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 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 TSubText* HitTestText(XPoint pt)const {return NULL;};
virtual int GetFirstVersion()const{return 7;}
virtual CString GetXml(const AcGeMatrix3d& mat) const; // cet 2012.7.20 add
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;
virtual Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray& gripPoints,
AcDbIntArray& osnapModes,
AcDbIntArray& geomIds) const;
virtual Acad::ErrorStatus subGetStretchPoints(AcGePoint3dArray & stretchPoints) const;
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
const AcGeVector3d& offset);
virtual Acad::ErrorStatus subMoveStretchPointsAt(const AcDbIntArray& indices,
const AcGeVector3d& offset);
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
virtual Acad::ErrorStatus subClose();//zxl 2013.07.23 add
virtual Acad::ErrorStatus subIntersectWith(const AcDbEntity* pEnt,
AcDb::Intersect intType,
AcGePoint3dArray& points,
INT_PTR thisGsMarker = 0,
INT_PTR otherGsMarker = 0) const;
virtual Acad::ErrorStatus subIntersectWith(const AcDbEntity* pEnt,
AcDb::Intersect intType,
const AcGePlane& projPlane,
AcGePoint3dArray& points,
INT_PTR thisGsMarker = 0,
INT_PTR otherGsMarker = 0) const;
private:
Acad::ErrorStatus MoveGSPointsAt(const AcDbIntArray& indices,const AcGeVector3d& offset, bool bGripMove = true);
void InitLabelLocation(double nScale = 1.2);
Acad::ErrorStatus DrawLabelText(XExplodeDraw &dc) const;
//zxl 2013.07.23 add 井大小或位置变化时,调整井标注位置
void ModifyWellDimPos(const AcDbObjectId &idPipe);
// zxl 2013.06.07 add 根据管线 获取当前井标注位置
XPoint GetWellDimPosByPipe(const AcDbObjectId &idPipe);
};
#endif // !defined(AFX_DBWELL_H__3BBE3EAC_CAF0_4759_B2A5_EBD4009553F2__INCLUDED_)