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

125 lines
5.4 KiB
C++

// DbFlangeFitting.h: interface for the TDbFlangeFitting class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DBFLANGEFITTING_H__34076080_B670_40F4_86DA_3D506AB87E38__INCLUDED_)
#define AFX_DBFLANGEFITTING_H__34076080_B670_40F4_86DA_3D506AB87E38__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 "DbPipeFitting.h"
#include "TGripData.h"
#define GRIP_MAXNUM_DBPIPE_FITTING 5 // 夹点最大值
class PS_EXP TDbFlangeFitting : public TDbPipeFitting
{
DECLARE_TENTBASE();
ACRX_DECLARE_MEMBERS(TDbFlangeFitting);
private:
static const Adesk::UInt8 g_nVersion;
public:
TDbFlangeFitting();
virtual ~TDbFlangeFitting();
// cet 2012.11.2 add 获得与双线水管平行的通过fitting连接的另一个双线水管的宽度和法兰大小、厚度、管径
bool GetWidth(const AcDbObjectId &idPipe, double &dWidth, double &dFangleDn, double &dFlangeThick, double *pDn = NULL) const ;
protected:
AcDbHardPointerId m_idDoteLayer;
Acad::ErrorStatus DrawElbow(XExplodeDraw &dc) const;
Acad::ErrorStatus DrawElbow2(XExplodeDraw &dc) const;
Acad::ErrorStatus DrawElbowVer(XExplodeDraw &dc) const;
Acad::ErrorStatus DrawTerminal(XExplodeDraw &dc) const;
Acad::ErrorStatus DrawCorner(XExplodeDraw &dc) const;
Acad::ErrorStatus DrawCorner2(XExplodeDraw &dc) const;
void DrawCenterLine(XExplodeDraw &dc,XCurveSegment &seg) const;//绘制中心线
public: // Override TDbEntity
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> &info) const; //取动态属性显示数据
public: // Override AcDbEntity
// cet 2012.11.6 add 支持夹点启动绘制命令
#if ADS > 15
virtual Acad::ErrorStatus subGetGripPoints(AcDbGripDataPtrArray& grips,
const double curViewUnitSize,
const int gripSize,
const AcGeVector3d& curViewDir,
const int bitflags) const;
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbVoidPtrArray& appData,
const AcGeVector3d& offset,
const int bitflags);
#endif
virtual Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray& gripPoints,
AcDbIntArray& osnapModes,
AcDbIntArray& geomIds) const;
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
const AcGeVector3d& offset);
virtual Acad::ErrorStatus GetGripText(int idx, CString &cs) const;
// 根据夹点索引获得,该索引类型和夹点提示
void ExplainGripIndex(int nIndex, bool &bCmd, CString &sTip) 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 dwgInFields (AcDbDwgFiler*);
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler*) const;
virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler*);
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler*) const;
virtual int GetFirstVersion()const{return 7;}
public: // Override TDbPipeNode
virtual BOOL IsHidePipe() const;
virtual double GetWidth(const TDbPipePrototype* pPipe=NULL) const;
// 对st类型的接口进行重新连接
virtual void UpdateLinkage(const XPoint &ptAt, TPipeSys::SysType st,
const DList<AcDbObjectId> &idPipes);
void DrawLine(const XLine &line, XExplodeDraw &dc) const;
void DrawArc(const XArc &arc, XExplodeDraw &dc, XPointList &lstPt) const;
void DrawArc(const XArc &arc, XExplodeDraw &dc) const;
void DrawFlange(const XPoint ptEnd, double nAngOut, double nDn, double nThick, XExplodeDraw &dc) const;
// cet 2012.11.2 add 绘制变径法兰
void DrawFlange(const XPoint &ptEnd, const AcGeVector3d &vtDir, double nDn, double nThick, XExplodeDraw &dc) const;
// cet 2012.11.5 add 绘制三维变径
void DrawReducing3d(const AcDbObjectId &idPipe, XExplodeDraw &dc) const;
virtual Acad::ErrorStatus Draw3dElbow(XExplodeDraw &dc) const;
virtual Acad::ErrorStatus Draw3dOther(XExplodeDraw &dc) const;
void SetDoteLayer(const AcDbObjectId& id) {
assertWriteEnabled();
m_idDoteLayer=id;
}
AcDbObjectId GetDoteLayer() const {
return m_idDoteLayer;
}
private:
// 删除Line被双线水管遮挡的部分 cet 2011.11.9 add
void ModifyLine(XLine &line, const AcDbObjectId &idPipe) const;
// 更新fitting在共线不等径的管线上产生变径 cet 2012.11.16 add
void UpdateFlangeFitting();
private:
// cet 2012.11.6 add 保存夹点数据
static TWT_GRIPAPPDATA s_gripAppData[GRIP_MAXNUM_DBPIPE_FITTING];
};
#endif // !defined(AFX_DBFLANGEFITTING_H__34076080_B670_40F4_86DA_3D506AB87E38__INCLUDED_)