616 lines
21 KiB
C++
616 lines
21 KiB
C++
// TDbDuctNode.h: interface for the TDbDuctNode class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_TDBDUCTNODE_H__22245068_0EEB_40E2_8AA8_3B4170FE7C5F__INCLUDED_)
|
|
#define AFX_TDBDUCTNODE_H__22245068_0EEB_40E2_8AA8_3B4170FE7C5F__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#include "PipeTools.h"
|
|
#include "NodePrototype.h"
|
|
#include "DuctNodeData.h"
|
|
#include "DuctIFaceMakeUp.h"
|
|
|
|
|
|
/*============================================================================*
|
|
* Copyright(c), 1994-2007, Beijing Tangent Engineering Software Co.Ltd.
|
|
* 文 件 名: TDbDuctNode.h
|
|
* 版 本: 2.0
|
|
* 作 者: sg
|
|
* 创建时间:
|
|
* 描 述: 风管中各种连接件自定义实体基类
|
|
* 归属项目: 暖通
|
|
* 历史记录: 1. 2008-1-16 sg modify
|
|
* 备 注: 弯头、扣弯、变径、乙字弯、天圆地方、三通、四通、一般堵头等实体基类
|
|
该类从TDbPipeNode(连接)、TDuctNodeData(计算)共同派生
|
|
=============================================================================*/
|
|
|
|
class PS_EXP TDbDuctNode: public TDbPipeNode, public TDuctNodeData
|
|
{
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbDuctNode);
|
|
|
|
private:
|
|
static const Adesk::UInt8 g_nVersion;
|
|
|
|
public:
|
|
enum DuctNodeType { // 连接件类型,根据接口数量判断
|
|
kStem = 0, // 一般堵头——1接口
|
|
kElbow = 1, // 弯头——2接口
|
|
kKouElbow = 2, // 扣弯——2接口
|
|
kYiZiElbow = 3, // 乙字弯——2接口
|
|
kTapered = 4, // 变径——2接口
|
|
kTianYuanDiFang = 5, // 天圆地方——2接口
|
|
k3Corner = 6, // 三通——3接口
|
|
k4Corner = 7, // 四通——4接口
|
|
kOther = 8, // 接口数量未知,未来扩充使用
|
|
kSoft = 9, // 软接口
|
|
kFlange = 10, // 法兰——2接口,8.0新添加
|
|
kTaoDong = 11, // 掏洞三通——2接口,7.6新添加
|
|
};
|
|
|
|
enum FlangeLinkType { // 节点与管线的连接方式
|
|
kSingleFlange = 0, // 单线法兰
|
|
kBothFlange = 1, // 双线法兰
|
|
kTrebleFlange = 2, // 三线法兰
|
|
kBothLine = 3, // 双竖线
|
|
kSingleLine= 4, // 焊接
|
|
};
|
|
|
|
public: // 构造函数
|
|
TDbDuctNode();
|
|
virtual ~TDbDuctNode();
|
|
|
|
|
|
protected:
|
|
DuctNodeType m_nType; // 连接件类型
|
|
XPoint m_ptLocation; // 自身位置点
|
|
Adesk::UInt8 m_nMain; // 主风管标号,在m_lstInterface中的顺序号
|
|
|
|
// 系统绘制方式,1为单线,2为双线(有中心线),3为双线(不含有中心线),4为系统图
|
|
Adesk::UInt8 m_nSysDrawMod;
|
|
|
|
// 风管接口链表,顺序与m_lstInterface一致
|
|
DList<TDuctIFaceMakeup> m_lstDuctIFace;
|
|
|
|
//////////////////节点的绘制参数,从TPSConfig中读取//////////////////
|
|
Adesk::UInt8 m_nDrawMod; // 绘制样式;变径、天圆地方的长度计算方式
|
|
double m_dDrawParam; // 曲率半径;变径、天圆地方、乙字弯的角度
|
|
double m_dDrawParam2; // 乙字弯的曲率半径;变径、天圆地方的用户输入长度;
|
|
// 三通、四通角度
|
|
|
|
//////////////////法兰的绘制参数,从TPSConfig中读取//////////////////
|
|
FlangeLinkType m_nLinkType; // 节点与管线的连接方式
|
|
|
|
//////////////////////////////三通、弯头特殊参数/////////////////////
|
|
BOOL m_bValue; // 三通是否有调节阀门
|
|
BOOL m_bMuffler; // 是否是消声弯头
|
|
Adesk::UInt8 m_nMufflerMod; // 消声弯头样式
|
|
BOOL m_bShowDLYP; // 是否显示导流叶片
|
|
Adesk::UInt8 m_nDLYPType; // 导流叶片样式,暂不使用,留给8.0
|
|
Adesk::UInt8 m_nDLYPNum; // 绘制导流叶片的数量
|
|
Adesk::UInt8 m_nXMWNum; // 虾米弯数量
|
|
|
|
AcDbHardPointerId m_idDoteLayer; // 中心线图层,线型、颜色、线宽随层
|
|
AcDbHardPointerId m_idFlangeLayer; // 法兰图层,线型、颜色、线宽随层
|
|
|
|
protected: // 备用数据,版本扩充使用
|
|
Adesk::UInt8 m_nSpare;
|
|
double m_dSpare;
|
|
XString m_szSpare;
|
|
|
|
protected: // 8.0起不使用,将此变量放入TDbDuct中
|
|
Adesk::UInt8 m_nAlign; // 对齐方式
|
|
double m_dFlangeDis; // 法兰出头长度
|
|
double m_dFlangeThick; // 法兰厚度
|
|
|
|
|
|
public: // Set、Get函数
|
|
// 注:Stem——堵头;Elbow——弯头;KouElbow——扣弯;YiZiElbow——乙字弯头;
|
|
// Tapered——变径;TiYuanDiFang——天圆地方;3Corner——三通;
|
|
// 4Corner——四通;Flange——点插法兰;Soft——软接口;Other——其他;
|
|
// TaoDong——掏洞三通;
|
|
BOOL Is(const CString &csType) const; // 判断节点是否是指定的类型
|
|
|
|
void SetNodeType(const DuctNodeType nType) { // 节点类型
|
|
assertWriteEnabled();
|
|
m_nType = nType;
|
|
}
|
|
DuctNodeType GetNodeType() const {
|
|
return m_nType;
|
|
}
|
|
|
|
void SetLocation(const XPoint &ptLocation) { // 连接件位置点
|
|
assertWriteEnabled();
|
|
m_ptLocation = ptLocation;
|
|
}
|
|
XPoint GetLocation() const {
|
|
return m_ptLocation;
|
|
}
|
|
|
|
void SetMainDuctNum(const Adesk::UInt8 nNum) { // 主风管标号
|
|
assertWriteEnabled();
|
|
m_nMain = nNum;
|
|
}
|
|
int GetMainDuctNum() const { // 注:该号为在接口链表中的顺序,其他接口都算支管
|
|
return m_nMain;
|
|
}
|
|
|
|
void SetSysDrawMod(const Adesk::UInt8 nType) { // 系统绘制样式
|
|
assertWriteEnabled();
|
|
m_nSysDrawMod = nType;
|
|
}
|
|
int GetSysDrawMod() const {
|
|
return m_nSysDrawMod;
|
|
}
|
|
|
|
//////////////////节点的绘制参数,从TPSConfig中读取//////////////////
|
|
void SetDrawMod(const int nType) { // 绘制样式
|
|
assertWriteEnabled();
|
|
m_nDrawMod = nType;
|
|
}
|
|
Adesk::UInt8 GetDrawMod() const {
|
|
return m_nDrawMod;
|
|
}
|
|
|
|
void SetDrawParam(const double dDrawParam) { // 绘制参数1
|
|
assertWriteEnabled();
|
|
m_dDrawParam = dDrawParam;
|
|
}
|
|
double GetDrawParam() const {
|
|
return m_dDrawParam;
|
|
}
|
|
|
|
void SetDrawParam2(const double dDrawParam) { // 绘制参数2
|
|
assertWriteEnabled();
|
|
m_dDrawParam2 = dDrawParam;
|
|
}
|
|
double GetDrawParam2() const {
|
|
return m_dDrawParam2;
|
|
}
|
|
|
|
//////////////////法兰的绘制参数,从TPSConfig中读取//////////////////
|
|
void SetLinkType(const Adesk::UInt8 nLinkMod);
|
|
FlangeLinkType GetLinkType() const { // 法兰连接类型
|
|
return m_nLinkType;
|
|
}
|
|
|
|
/////////////////////////////三通、弯头特殊参数//////////////////////
|
|
void Set3TValue(const BOOL bHasValue) { // 三通是否有调节阀门
|
|
assertWriteEnabled();
|
|
m_bValue = bHasValue;
|
|
}
|
|
BOOL Has3TValue() const {
|
|
return m_bValue;
|
|
}
|
|
|
|
void SetMuffler(const BOOL bIsMuffer) { // 是否是消声弯头设置
|
|
assertWriteEnabled();
|
|
m_bMuffler = bIsMuffer;
|
|
}
|
|
BOOL IsMuffler() const {
|
|
return m_bMuffler;
|
|
}
|
|
|
|
void SetMufflerMod(const Adesk::UInt8 nMod) { // 消声弯头样式
|
|
assertWriteEnabled();
|
|
m_nMufflerMod = nMod;
|
|
}
|
|
int GetMufflerMod() const {
|
|
return m_nMufflerMod;
|
|
}
|
|
|
|
void SetShowDLYP(const BOOL bShow) { // 导流叶片
|
|
assertWriteEnabled();
|
|
m_bShowDLYP = bShow;
|
|
}
|
|
BOOL IsShowDLYP() const {
|
|
return m_bShowDLYP;
|
|
}
|
|
|
|
void SetDLYPNum(const Adesk::UInt8 nNum) { // 导流叶片数量
|
|
assertWriteEnabled();
|
|
m_nDLYPNum = nNum;
|
|
}
|
|
int GetDLYPNum() const {
|
|
return m_nDLYPNum;
|
|
}
|
|
|
|
void SetDLYPType(const Adesk::UInt8 nType) { // 导流叶片样式
|
|
assertWriteEnabled();
|
|
m_nDLYPType = nType;
|
|
}
|
|
int GetDLYPType() const {
|
|
return m_nDLYPType;
|
|
}
|
|
|
|
void SetXMWNum(const Adesk::UInt8 nNum) { // 虾米弯数量
|
|
assertWriteEnabled();
|
|
m_nXMWNum = nNum;
|
|
}
|
|
int GetXMWNum() const {
|
|
return m_nXMWNum;
|
|
}
|
|
|
|
///////////////////////////////图层设置//////////////////////////////
|
|
void SetDoteLayer(const AcDbObjectId &id) { // 中心线图层
|
|
assertWriteEnabled();
|
|
m_idDoteLayer = id;
|
|
}
|
|
AcDbObjectId GetDoteLayer() const {
|
|
return m_idDoteLayer;
|
|
}
|
|
|
|
void SetFlangeLayer(const AcDbObjectId &id) { // 法兰图层
|
|
assertWriteEnabled();
|
|
m_idFlangeLayer = id;
|
|
}
|
|
AcDbObjectId GetFlangeLayer() const {
|
|
return m_idFlangeLayer;
|
|
}
|
|
|
|
public: // Set、Get备用数据
|
|
void SetSpareInt(const Adesk::UInt8 nNum) {
|
|
assertWriteEnabled();
|
|
m_nSpare = nNum;
|
|
}
|
|
int GetSpareInt() const {
|
|
return m_nSpare;
|
|
}
|
|
|
|
double GetSpare() const {
|
|
return m_dSpare;
|
|
}
|
|
void SetSpare(const double dSpare) {
|
|
assertWriteEnabled();
|
|
m_dSpare = dSpare;
|
|
}
|
|
|
|
XString GetSpareStr() const {
|
|
return m_szSpare;
|
|
}
|
|
void SetSpareStr(const TCHAR* csText) {
|
|
assertWriteEnabled();
|
|
m_szSpare = csText;
|
|
}
|
|
|
|
public: // Set、Get取消使用数据
|
|
void SetAlign(const Adesk::UInt8 nAlign) { // 对齐方式
|
|
assertWriteEnabled();
|
|
m_nAlign = nAlign;
|
|
}
|
|
Adesk::UInt8 GetAlign() const {
|
|
return m_nAlign;
|
|
}
|
|
|
|
void SetFlangeDis(const double dDis) { // 法兰出头长度
|
|
assertWriteEnabled();
|
|
m_dFlangeDis = dDis;
|
|
}
|
|
double GetFlangeDis() const {
|
|
return m_dFlangeDis;
|
|
}
|
|
|
|
void SetFlangeThick(const double dThick) { // 法兰厚度
|
|
assertWriteEnabled();
|
|
m_dFlangeThick = dThick;
|
|
}
|
|
double GetFlangeThick() const {
|
|
return m_dFlangeThick;
|
|
}
|
|
|
|
|
|
public: // 有关与接口连接的相关函数
|
|
int FindIdInLink(AcDbObjectId linkId) const; // 查找指定ID
|
|
|
|
AcDbIntArray GetAllTypes() const; // 获取所有的连接类型
|
|
void GetAllLinkDucts(DList<AcDbObjectId> &ductIds) const; // 获取所有连接的ID
|
|
|
|
|
|
public: // 有关m_lstDuctIFace的相关函数
|
|
BOOL HasNullIFace(AcDbIntArray &ifaces) const; // 节点中是否有空接口
|
|
|
|
int GetDuctIFaceNum() const { // 接口数量
|
|
return m_lstDuctIFace.Length();
|
|
}
|
|
const TDuctIFaceMakeup& GetIDuctIFace(const int &i) const { // 获取指定接口
|
|
return m_lstDuctIFace[i];
|
|
}
|
|
void AddDuctIFace(const TDuctIFaceMakeup &iFace) { // 添加
|
|
assertWriteEnabled();
|
|
m_lstDuctIFace.Append(new TDuctIFaceMakeup(iFace));
|
|
}
|
|
|
|
void SetIWidth(const int &i, const double &dWidth) { // 宽度
|
|
assertWriteEnabled();
|
|
m_lstDuctIFace[i]->m_dWidth = dWidth;
|
|
}
|
|
const double GetIWidth(const int &i) const {
|
|
return GetIDuctIFace(i).m_dWidth;
|
|
}
|
|
|
|
void SetIHeight(const int &i, const double &dHigh) { // 高度
|
|
assertWriteEnabled();
|
|
m_lstDuctIFace[i]->m_dHeight = dHigh;
|
|
}
|
|
const double GetIHeight(const int &i) const {
|
|
return GetIDuctIFace(i).m_dHeight;
|
|
}
|
|
|
|
void SetIFlDist(const int &i, const double &dDist) { // 法兰出头
|
|
assertWriteEnabled();
|
|
m_lstDuctIFace[i]->m_dFlDist = dDist;
|
|
}
|
|
const double GetIFlDist(const int &i) const {
|
|
return GetIDuctIFace(i).m_dFlDist;
|
|
}
|
|
|
|
void SetIFlThick(const int &i, const double &dThick) { // 法兰厚度
|
|
assertWriteEnabled();
|
|
m_lstDuctIFace[i]->m_dFlThick = dThick;
|
|
}
|
|
const double GetIFlThick(const int &i) const {
|
|
return GetIDuctIFace(i).m_dFlThick;
|
|
}
|
|
|
|
void SetIVDAngle(const int &i, const double &dAngle) { // 立管角度
|
|
assertWriteEnabled();
|
|
m_lstDuctIFace[i]->m_dVDAngle = dAngle;
|
|
}
|
|
const double GetIVDAngle(const int &i) const {
|
|
return GetIDuctIFace(i).m_dVDAngle;
|
|
}
|
|
|
|
void SetIEle(const int &i, const double &dEle) { // 标高
|
|
assertWriteEnabled();
|
|
m_lstDuctIFace[i]->m_dEle = dEle;
|
|
}
|
|
const double GetIEle(const int &i) const {
|
|
return GetIDuctIFace(i).m_dEle;
|
|
}
|
|
|
|
void SetIType(const int &i, int nType) { // 连接类型
|
|
assertWriteEnabled();
|
|
m_lstDuctIFace[i]->m_nType = (Adesk::UInt8)nType;
|
|
}
|
|
int GetIType(const int &i) const {
|
|
return (int)GetIDuctIFace(i).m_nType;
|
|
}
|
|
|
|
void SetIDQType(const int &i, TDbDuct::DuiQiType nType) { // 对齐方式
|
|
assertWriteEnabled();
|
|
m_lstDuctIFace[i]->m_nDQType = nType;
|
|
}
|
|
TDbDuct::DuiQiType GetIDQType(const int &i) const {
|
|
return GetIDuctIFace(i).m_nDQType;
|
|
}
|
|
|
|
void SetIDQSide(const int &i, TPipeSys::PtLoction nSide) { // 对齐方向
|
|
assertWriteEnabled();
|
|
m_lstDuctIFace[i]->m_nDQSide = nSide;
|
|
}
|
|
TPipeSys::PtLoction GetIDQSide(const int &i) const {
|
|
return GetIDuctIFace(i).m_nDQSide;
|
|
}
|
|
|
|
void SetIDrawType(const int &i, int nType) { // 绘制样式
|
|
assertWriteEnabled();
|
|
m_lstDuctIFace[i]->m_nDrawType = (Adesk::UInt8)nType;
|
|
}
|
|
int GetIDrawType(const int &i) const {
|
|
return (int)GetIDuctIFace(i).m_nDrawType;
|
|
}
|
|
|
|
void SetISection(const int &i, int nType) { // 截面样式
|
|
assertWriteEnabled();
|
|
m_lstDuctIFace[i]->m_nSection = (Adesk::UInt8)nType;
|
|
}
|
|
int GetISection(const int &i) const {
|
|
return (int)GetIDuctIFace(i).m_nSection;
|
|
}
|
|
|
|
|
|
public: // Override TDbPipeNode
|
|
// 判断节点是否可以连接管段,nPos: 0--start; 1--end
|
|
virtual BOOL CanLinkSide(const AcDbObjectId &idPipe, int nPos) const;
|
|
|
|
void RemoveInterface(const AcDbObjectId &idPipe); // 删除两种接口
|
|
// 替换两种接口
|
|
void ReplaceInterface(const AcDbObjectId &idOld, const AcDbObjectId &idNew);
|
|
virtual void UpdateInterface(TPipeSys::SysType st, const XPoint &ptAt,
|
|
const DList<AcDbObjectId> &ids, const AcDbIntArray &types); // 更新接口
|
|
|
|
virtual BOOL IsHidePipe() const; // 节点是否遮挡管线
|
|
|
|
|
|
public: // Renew TDbPipeNode
|
|
AcDbIntArray GetVerPipeIndex() const; // 获取节点连接的立管在接口链表中的索引号
|
|
|
|
const double GetIAngle(const int &i) const { // 接口法向
|
|
const XVector3D &vt = GetIDirection(i);
|
|
return ads_angle(XPoint(), vt);
|
|
}
|
|
|
|
|
|
public: // Override TDbEntity
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &dc) const; // 绘制
|
|
virtual Acad::ErrorStatus ExplodeOrDraw3d(XExplodeDraw &dc) const;
|
|
|
|
virtual void CopyPropertiesFrom(AcDbEntity* pSrc, unsigned gMatchFlag);
|
|
virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
|
|
virtual void GetTips(DList<TObjInfoUnit> &info) const; // 取动态属性显示数据
|
|
virtual Acad::ErrorStatus GetGripText(int idx, CString &cs) const;
|
|
virtual int GetFirstVersion() const { return 7; }
|
|
|
|
public: // Override AcDbEntity
|
|
virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler*);
|
|
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler*) const;
|
|
virtual Acad::ErrorStatus dxfInFields(AcDbDxfFiler*);
|
|
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler*) const;
|
|
|
|
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 subGetStretchPoints(AcGePoint3dArray &stretchPoints) const;
|
|
virtual Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray &gripPoints,
|
|
AcDbIntArray &osnapModes, AcDbIntArray &geomIds) 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 GetExtents(XPoint &ptLow, XPoint &ptUp) const;
|
|
|
|
virtual Acad::ErrorStatus subDeepClone(AcDbObject* pOwner, AcDbObject *&pClonedObject,
|
|
AcDbIdMapping &idMap, Adesk::Boolean isPrimary) const;
|
|
|
|
|
|
protected: // 系统图绘制
|
|
Acad::ErrorStatus ExplodeOrDrawSys(XExplodeDraw &dc) const;
|
|
Acad::ErrorStatus DrawSysElbow(XExplodeDraw &dc) const; // 弯头
|
|
Acad::ErrorStatus DrawSysTapered(XExplodeDraw &dc) const; // 变径
|
|
Acad::ErrorStatus DrawSysTYDF(XExplodeDraw &dc) const; // 天圆地方
|
|
Acad::ErrorStatus DrawSysYZElbow(XExplodeDraw &dc) const; // 乙字弯
|
|
Acad::ErrorStatus DrawSys3T(XExplodeDraw &dc) const; // 三通
|
|
Acad::ErrorStatus DrawSysTD(XExplodeDraw &dc) const; // 掏洞
|
|
Acad::ErrorStatus DrawSys4T(XExplodeDraw &dc) const; // 四通
|
|
|
|
|
|
protected: // 二维绘制
|
|
Acad::ErrorStatus DrawFL2D(XExplodeDraw &dc) const; // 法兰
|
|
Acad::ErrorStatus DrawTapered2D(XExplodeDraw &dc, BOOL bIsTYDF) const; // 变径
|
|
Acad::ErrorStatus DrawYZElbow2D(XExplodeDraw &dc) const; // 乙字弯
|
|
Acad::ErrorStatus DrawTaoDong2D(XExplodeDraw &dc) const; // 掏洞
|
|
|
|
Acad::ErrorStatus DrawElbow2D(XExplodeDraw &dc) const; // 弯头
|
|
BOOL DrawDLYPSegs(DList<XCurveSegment> &lstSeg, XPoint ptStart, // 导流叶片
|
|
XPoint ptEnd) const;
|
|
void GetDLYPPts(XPoint ptStart, XPoint ptEnd, XPointList &pts) const; // 导流片位置点
|
|
BOOL DrawXMSegs(DList<XCurveSegment> &lstSeg, XPoint ptStart, // 虾米弯
|
|
XPoint ptEnd, XPointList &pts, double dNum = 50.0) const;
|
|
|
|
Acad::ErrorStatus DrawKElbow2D(XExplodeDraw &dc) const; // 扣弯
|
|
BOOL DrawUpKElbow2D1(DList<XCurveSegment> &segs, int nVNum, // 无下弯头的上弯头
|
|
int nHNum, XPoint ptStart, XPoint &ptVDTmp, BOOL bIs3T = FALSE) const;
|
|
BOOL DrawUpKElbow2D2(DList<XCurveSegment> &segs, int nVNum, // 有下弯头的上弯头
|
|
XPoint ptStart, XPoint &ptVDTmp) const;
|
|
|
|
// 获取下弯头法兰绘制点
|
|
void GetFKEFlPts(double dUpAng, double dVDAng, XPoint upNodePt, // 方
|
|
double dUpWide, int nVDNum, XPointList &pts) const;
|
|
void GetYKEFlPts(double dUpAng, double dVDWidth, XPoint upNodePt, // 圆
|
|
double dUpWidth, XArc &tmpArc, double dVDFlDist, XPointList &pts) const;
|
|
|
|
|
|
Acad::ErrorStatus Draw3Corner2D(XExplodeDraw &dc) const; // 三通
|
|
BOOL DrawValve(XPoint pt, int nB, DList<XCurveSegment> &segs) const; // 调节阀
|
|
XPoint GetYTopPt(XPoint ptOld) const; // 获取Y型、15样式三通中,顶点位置
|
|
BOOL DrawRandom3T(DList<XCurveSegment> &segs, const XPointList &pts,
|
|
const DList<XLine> &llst, int nB2) const; // 普通、直角三通
|
|
BOOL DrawCAngle3T(const XPointList &pts, DList<XCurveSegment> &segs,
|
|
const XPointList &ptLst, int nB2) const; // 圆角三通
|
|
BOOL DrawInsert3T(DList<XCurveSegment> &segs,const XPointList &pts,
|
|
const DList<XLine> &llst, int nB2) const; // 承插三通
|
|
BOOL DrawY3T(const XPointList &pts, DList<XCurveSegment> &lstSeg,
|
|
const XPointList &ptLst, int nB2) const; // Y型三通
|
|
BOOL DrawCircle3T(DList<XCurveSegment> &lstSeg, const XPointList &ptLst,
|
|
const DList<XLine> &llst, int nB2) const; // 圆管三通
|
|
BOOL DrawParall3T(const XPointList &pts, DList<XCurveSegment> &lstSeg,
|
|
const XPointList &ptLst, int nB2) const; // 平行三通
|
|
BOOL Draw12Mod3T(const XPointList &pts, DList<XCurveSegment> &lstSeg,
|
|
const XPointList &ptLst, int nB2) const; // 第15种样式三通
|
|
// 叉型三通
|
|
BOOL DrawAcross3T(const XPointList &pts, DList<XCurveSegment> &lstSeg,
|
|
const XPointList &ptLst, int nB2, DList<XCurveSegment> &flSegs) const;
|
|
// 斜插三通
|
|
BOOL DrawXieInsert3T(const XPointList &pts, DList<XCurveSegment> &lstSeg,
|
|
const XPointList &ptLst, int nB2, DList<XCurveSegment> &flSegs) const;
|
|
|
|
|
|
Acad::ErrorStatus Draw4Corner2D(XExplodeDraw &dc) const; // 四通
|
|
BOOL DrawRound4T(const XPointList &pts, DList<XCurveSegment> &lstSeg,
|
|
const XPointList &ptLst, const DList<XLine> &llst, int nB1,
|
|
int nB3) const; // 圆角四通
|
|
BOOL DrawCAngle4T(DList<XCurveSegment> &lstSeg, const XPointList &ptLst,
|
|
const DList<XLine> &llst, int nB1, int nB3) const; // 直角四通
|
|
BOOL DrawInsert4T(DList<XCurveSegment> &lstSeg, const XPointList &ptLst,
|
|
const DList<XLine> &llst, int nB1, int nB3) const; // 承插四通
|
|
BOOL DrawRandom4T(DList<XCurveSegment> &lstSeg, const XPointList &ptLst,
|
|
const DList<XLine> &llst) const; // 通用四通
|
|
BOOL DrawCircle4T(const XPointList &pts, DList<XCurveSegment> &lstSeg, // 圆管四通
|
|
const XPointList &ptLst, int nB1, int nB3, DList<XCurveSegment> &flSegs) const;
|
|
|
|
|
|
protected: // 三维绘制
|
|
Acad::ErrorStatus DrawFL3D(XExplodeDraw &dc) const; // 法兰
|
|
Acad::ErrorStatus DrawElbow3D(XExplodeDraw &dc) const; // 弯头
|
|
Acad::ErrorStatus DrawKElbow3D(XExplodeDraw &dc) const; // 扣弯
|
|
Acad::ErrorStatus DrawTapered3D(XExplodeDraw &dc) const; // 变径
|
|
Acad::ErrorStatus DrawTYDF3D(XExplodeDraw &dc) const; // 天圆地方
|
|
Acad::ErrorStatus DrawYZElbow3D(XExplodeDraw &dc) const; // 乙字弯
|
|
Acad::ErrorStatus Draw3T3D(XExplodeDraw &dc) const; // 三通
|
|
Acad::ErrorStatus DrawTaoDong3D(XExplodeDraw &dc) const; // 掏洞
|
|
Acad::ErrorStatus Draw4T3D(XExplodeDraw &dc) const; // 四通
|
|
|
|
|
|
private:
|
|
Acad::ErrorStatus GetGSPoints(AcGePoint3dArray &stretchPoints) const;
|
|
Acad::ErrorStatus MoveGSPointsAt(const AcDbIntArray &indices,
|
|
const AcGeVector3d &offset);
|
|
void RemoveInterface(TPipeSys::SysType st); // 删除与类型匹配的接口
|
|
|
|
|
|
private: // 二维辅助绘制函数1,分别处理中心线、普通线、细线、法兰线
|
|
void DrawMidSegs(XExplodeDraw &dc, const DList<XCurveSegment> &segs) const;
|
|
void Draw2DSegs(XExplodeDraw &dc, const DList<XCurveSegment> &segs) const;
|
|
void DrawXiSegs(XExplodeDraw &dc, const DList<XCurveSegment> &segs) const;
|
|
void DrawFLSegs(XExplodeDraw &dc, const DList<XCurveSegment> &segs) const;
|
|
|
|
private: // 二维辅助绘制函数2
|
|
void BuildSegs1(XPoint pt1, XPoint pt2, DList<XCurveSegment> &segs) const;
|
|
void BuildSegs2(XPoint pt1, XPoint ptInt, XPoint pt2,
|
|
DList<XCurveSegment> &segs) const;
|
|
void BuildSegs3(const XLine &line, DList<XCurveSegment> &segs) const;
|
|
void BuildSegs4(XArc &arc, DList<XCurveSegment> &segs) const;
|
|
void BuildSegs5(XCircle &circle, DList<XCurveSegment> &segs) const;
|
|
void BuildSegs6(XPoint pt1, XPoint pt2, XPoint pt3, XPoint pt4,
|
|
DList<XCurveSegment> &segs) const;
|
|
|
|
XPoint GetArcPts(XPoint ptStart, double dWide, double dDirection,
|
|
XPoint ptRef, DList<XCurveSegment> &segs, double &dNewAng) const;
|
|
|
|
BOOL DrawFlange(DList<XCurveSegment> &segs, XPoint pt, double dAngle,
|
|
double dFlDia, double dFlThick) const; // 法兰
|
|
BOOL DrawArc(DList<XCurveSegment> &lstSeg, XPoint ptCorner1, // 0.8切弧
|
|
XPoint ptCorner2, XPoint pt1, XPoint pt2, BOOL bIsBig = TRUE) const;
|
|
BOOL DrawArc2(DList<XCurveSegment> &lstSeg, int nIFace1, int nIFace2,
|
|
XPoint pt1, XPoint pt2, BOOL bMidLine = FALSE, double dNum = 50.0) const; // 50短弧
|
|
BOOL DrawLine(DList<XCurveSegment> &lstSeg, XLine l1, XLine l2,
|
|
int nSide = 0) const; // 50短线,斜线
|
|
|
|
|
|
private: // 三维辅助函数
|
|
BOOL DrawCube3d(XPoint pt1, int nIndex1, XPoint pt2, int nIndex2, XVector3D vt,
|
|
DList<X3DFace> &faces, BOOL bShow1 = TRUE, BOOL bShow2 = TRUE) const; // 长方体
|
|
|
|
|
|
protected:
|
|
XPoint GetZeroPt() const; // 将m_ptLocation的Z坐标置为0
|
|
|
|
// 获取m_ptLocation向各管线中线的投影,用于处理偏心
|
|
void GetTrueMidPts(XPointList &pts) const;
|
|
AcDbIntArray GetBranchNums(int nMain) const; // 获取各支管编号,逆时针排序
|
|
|
|
// 获取法兰遮挡后与管线连接点的位置
|
|
void GetPtsIFace(XPointList &pts, BOOL bSys = FALSE, BOOL bIs3D = FALSE,
|
|
BOOL b50Len = FALSE, BOOL bZero = TRUE, double dNum = 50.0) const;
|
|
};
|
|
|
|
#endif // !defined(AFX_TDBDUCTNODE_H__22245068_0EEB_40E2_8AA8_3B4170FE7C5F__INCLUDED_)
|