Files
envi-code/SourceCode/Code2026/Dimension/WellSerial.h
T

74 lines
2.7 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#pragma once
2026-09-28 15:28:50 +08:00
#include "DbWell.h"
class CWellSerial
{
public:
CWellSerial();
2026-10-04 00:04:20 +08:00
// 设置起点井
2026-09-28 15:28:50 +08:00
void SetStartWell(Entity &ent);
2026-10-04 00:04:20 +08:00
// 设置终点井
2026-09-28 15:28:50 +08:00
void SetEndWell(Entity &ent);
2026-10-04 00:04:20 +08:00
// 设置支路编号类型
2026-09-28 15:28:50 +08:00
void SetSerialType(int nType);
2026-10-04 00:04:20 +08:00
// 设置是否躲避
2026-09-28 15:28:50 +08:00
void SetEvade(bool bEvade);
2026-10-04 00:04:20 +08:00
// 设置主干递增递减
2026-09-28 15:28:50 +08:00
void SetAdd(bool bAdd);
2026-10-04 00:04:20 +08:00
// 设置井编号
2026-09-28 15:28:50 +08:00
void SetWellSerial(const CString &sSerial);
2026-10-04 00:04:20 +08:00
// 进行编号
2026-09-28 15:28:50 +08:00
void UpdateWellSerival();
private:
2026-10-04 00:04:20 +08:00
// 找出终点井
2026-09-28 15:28:50 +08:00
SSearchPipeList* FindEndWell(SSearchPipeList *pList);
2026-10-04 00:04:20 +08:00
// 初始化管网,以便判断井是否已编号
2026-09-28 15:28:50 +08:00
void InitPipeSys(SSearchPipeList *pList, SSearchPipeList *pLstNew);
2026-10-04 00:04:20 +08:00
// 获取当前节点能到达的各个子节点的指针
2026-09-28 15:28:50 +08:00
void CalcNodeNum(SSearchPipeList *pList, int iLen, double dLen, std::vector<SSearchPipeList *> &vecPList);
2026-10-04 00:04:20 +08:00
// 更新编号
2026-09-28 15:28:50 +08:00
void UpdateSerialType0(SSearchPipeList *pEndWell);
void ModifyBranchSeiral0(SSearchPipeList *pList, AcDbObjectId &id);
void UpdateSerialType1(SSearchPipeList *pEndWell);
void ModifyBranchSeiral1(SSearchPipeList *pList, AcDbObjectId &id);
void UpdateSerialType2or3(SSearchPipeList *pEndWell, bool bBraSerial, bool bAdd);
void UpdateSerialType2(SSearchPipeList *pEndWell, bool bBraSerial);
void UpdateSerialType3(SSearchPipeList *pEndWell, bool bBraSerial);
void UpdateSerialType4or5(SSearchPipeList *pEndWell, bool bBraSerial, bool bAdd);
void UpdateSerialType4(SSearchPipeList *pEndWell, bool bBraSerial);
void UpdateSerialType5(SSearchPipeList *pEndWell, bool bBraSerial);
void UpdateSerialType6(SSearchPipeList *pEndWell);
2026-10-04 00:04:20 +08:00
// 获得所有起点到终点所有井(有序存储)
2026-09-28 15:28:50 +08:00
void GetMainWell(SSearchPipeList *pEndWell, std::vector<SSearchPipeList*> &vecWell, std::vector<SSearchPipeList*> &vecPipe);
2026-10-04 00:04:20 +08:00
//设置管线流向
2026-09-28 15:28:50 +08:00
void SetPipeDirection(std::vector<SSearchPipeList *> &vecPipe, std::vector<SSearchPipeList*> &vecWell, bool bBra);
2026-10-04 00:04:20 +08:00
// 修改井编号
2026-09-28 15:28:50 +08:00
void ModifyWellSerial(const AcDbObjectId &idWell);
2026-10-04 00:04:20 +08:00
//判断递增还是递减,重设井编号名字
2026-09-28 15:28:50 +08:00
void ChangeWellSerial();
2026-10-04 00:04:20 +08:00
//判断井编号是否小于1
2026-09-28 15:28:50 +08:00
bool IsLessEqual1();
2026-10-04 00:04:20 +08:00
//检查井是否只有一条分支井 zxl 2011.10.27 add
2026-09-28 15:28:50 +08:00
bool CheckPipeBra(SSearchPipeList *&pListBra);
2026-10-04 00:04:20 +08:00
// 起始井和终止井不是同一图层 zxl 2013.04.25 add
2026-09-28 15:28:50 +08:00
bool CheckWellSys();
2026-10-04 00:04:20 +08:00
// 判断该井是否和起始井是同一系统 zxl 2013.04.25 add
2026-09-28 15:28:50 +08:00
bool IsSameSys(const AcDbObjectId &id);
private:
2026-10-04 00:04:20 +08:00
Entity m_entStartWell; // 起点井
Entity m_entEndWell; // 终点井
int m_nSeriralType; // 支路编号类型
bool m_bAdd; // 主干是否递增
CString m_sWellSerial; // 井编号
bool m_bEvade; // 是否躲避更新
bool m_bUpdateSerial; // 是否更新编号
CString m_sWellLayer; // 类型
2026-09-28 15:28:50 +08:00
};