Files
envi-code/SourceCode/Code2026/tg_shs/shs_pipebase/TImpSpecEquipment.h
T

199 lines
7.7 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#ifndef _TIMPSPECEQUIPMENT_H__
2026-09-28 15:28:50 +08:00
#define _TIMPSPECEQUIPMENT_H__
#if _MSC_VER > 1000
#pragma once
#endif
#ifndef _TDBIMPBASE_H__
#include "TDbImpBase.h"
#endif
class TImpSpecEquipment : public TDbImpBase
{
public:
TImpSpecEquipment();
virtual ~TImpSpecEquipment();
2026-10-04 00:04:20 +08:00
// 接口描述对象
2026-09-28 15:28:50 +08:00
virtual BOOL GetInterface(int nIndex,TInterface& pipeInterface) const;
virtual BOOL GetInterface(const AcGePoint3d& ptCon,TInterface& pipeInterface) const;
virtual BOOL HasInterface(const AcGePoint3d& ptCon,const AcGeVector3d& vtDir);
virtual int GetInterfaceCount() const;
2026-10-04 00:04:20 +08:00
// 建立接口关联关系
2026-09-28 15:28:50 +08:00
virtual BOOL SetInterfaceRelation(const AcGePoint3d& ptConnect,const AcDbObjectId& idConnect);
2026-10-04 00:04:20 +08:00
//移除接口关联关系
2026-09-28 15:28:50 +08:00
virtual BOOL RemoveInterfaceRelation(const AcGePoint3d& ptConnect,const AcDbObjectId& idConnect);
2026-10-04 00:04:20 +08:00
// 接口更改通知
2026-09-28 15:28:50 +08:00
virtual BOOL NotifyInterfaceToModify(const TInterfaceModifyMsg& iModiMsg,TInterfaceModifyMsgs& iModiMsgs);
2026-10-04 00:04:20 +08:00
// 专业数据
2026-09-28 15:28:50 +08:00
virtual TDbXDataMap* GetSpecialtyData();
2026-10-04 00:04:20 +08:00
// 统一法向量
2026-09-28 15:28:50 +08:00
virtual Acad::ErrorStatus setNormal(const AcGeVector3d& vtNorm);
2026-10-04 00:04:20 +08:00
// 获取2维显示的所有曲线
2026-09-28 15:28:50 +08:00
virtual BOOL MakeCurves(TComplexCurve& cplCurve) const;
2026-10-04 00:04:20 +08:00
// 获取2维边界内显示的曲线
2026-09-28 15:28:50 +08:00
virtual BOOL GetCurvesInSide(TComplexCurve& compCurve) const;
2026-10-04 00:04:20 +08:00
// 获取2维显示的边界pl线
2026-09-28 15:28:50 +08:00
virtual AcDbPolyline* MakePolyCurve() const;
2026-10-04 00:04:20 +08:00
// 获取2维边界围城的面
2026-09-28 15:28:50 +08:00
virtual BOOL MakePolyCurveFaces(AcDbVoidPtrArray& arFaces);
2026-10-04 00:04:20 +08:00
// 获取对象类型名称 [es. 弯头--> TCH_EELBOW]
2026-09-28 15:28:50 +08:00
virtual void GetKindName(CString& sName);
2026-10-04 00:04:20 +08:00
//自身边界
2026-09-28 15:28:50 +08:00
virtual BOOL GetGeomExtentsEdge(TComplexCurve& crLoop);
2026-10-04 00:04:20 +08:00
// 解释夹点
2026-09-28 15:28:50 +08:00
virtual TDb::Position ExplainGripIndex(int nIndex) const;
2026-10-04 00:04:20 +08:00
// 夹点提示
2026-09-28 15:28:50 +08:00
virtual Acad::ErrorStatus GetGripText(int i, CString &cs) const;
2026-10-04 00:04:20 +08:00
// 对象查询
2026-09-28 15:28:50 +08:00
virtual void GetTips(CMapStringToString& mapLable2Tip) const;
2026-10-04 00:04:20 +08:00
// 根据参数名称获得实体的OPM信息,pszName:参数名称(XMap key值)
2026-09-28 15:28:50 +08:00
virtual BOOL OPMInfo(LPCTSTR pszName, TDb::OPMInfo* pInfo);
2026-10-04 00:04:20 +08:00
// 判断当前实体参数是否有效,并将有效的参数数据返回到map中
2026-09-28 15:28:50 +08:00
virtual BOOL IsValid(TDbXDataMap* pXMap);
2026-10-04 00:04:20 +08:00
//修改标注
2026-09-28 15:28:50 +08:00
virtual void SetSubText(long i,CString sText){};
void Destroy();
void SetData(const TDbXDataMap* pMap);
2026-10-04 00:04:20 +08:00
// 处理实体删除后操作
2026-09-28 15:28:50 +08:00
virtual void OnSubErase(Adesk::Boolean erasing);
2026-10-04 00:04:20 +08:00
// 用户自定义调用
2026-09-28 15:28:50 +08:00
virtual LRESULT UserCall(long i,LPVOID pData);
2026-10-04 00:04:20 +08:00
//获取三维的壳对象
2026-09-28 15:28:50 +08:00
virtual int GetXBaseShell(TXShell& xShell);
2026-10-04 00:04:20 +08:00
//获取体的范围方块
2026-09-28 15:28:50 +08:00
virtual int GetBodyBox(AcDbExtents& ext) const;
2026-10-04 00:04:20 +08:00
// add by hh 2010-12-27 导出XML
2026-09-28 15:28:50 +08:00
// virtual CString GetXml() const;
2026-10-04 00:04:20 +08:00
// 根据以工程方式组装部分导出XML的要求,增加一个形参Lixl add 2012-2-1
2026-09-28 15:28:50 +08:00
virtual CString GetXml(const AcGeMatrix3d& mat) const;
2026-10-04 00:04:20 +08:00
// add by hh 2011.02.10 剖切功能。 注意 GetSection内不应将std::vector<TObjSectionRecord>参数清空
2026-09-28 15:28:50 +08:00
virtual bool GetSection(const AcDbFace &face, const AcGeVector3d &vtPlaneSecDir,
std::vector<TObjSectionRecord> &sectionRecord, AcDbVoidPtrArray& arFillPtrs) const;
2026-10-04 00:04:20 +08:00
// 剖切用,返回Z坐标最高、最低点
2026-09-28 15:28:50 +08:00
virtual Acad::ErrorStatus GetExtents(TADSGePoint3d &ptLow, TADSGePoint3d &ptUp) const;
2026-10-04 00:04:20 +08:00
// add by hh 2011-09-28 取得图块中所有图元的的几何数据
2026-09-28 15:28:50 +08:00
virtual BOOL GetBlockComplexCurve(TComplexCurve& comCurve) const;
2026-10-04 00:04:20 +08:00
// add by hh 2014-08-06 支持设备与水管遮挡
2026-09-28 15:28:50 +08:00
virtual Acad::ErrorStatus GetClipBoundary(TGGePoly2D& poly)const;
virtual bool IsMeClip() const;
2026-10-04 00:04:20 +08:00
virtual bool IsClipMe(const TEntityBase* pEnt=NULL)const;//ok是否被裁剪
2026-09-28 15:28:50 +08:00
public:
//{{AFX_ARX_METHODS(TImpSpecEquipment)
virtual Acad::ErrorStatus ExplodeOrDrawBlock2d(XExplodeDraw &mode) const;
virtual Acad::ErrorStatus ExplodeOrDrawText2d(XExplodeDraw &mode) const;
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &mode) const;
virtual Acad::ErrorStatus ExplodeOrDraw3d(XExplodeDraw &mode) const;
virtual Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform);
virtual Acad::ErrorStatus moveGripPointsAt(const AcDbIntArray& indices,
const AcGeVector3d& offset);
virtual Acad::ErrorStatus moveStretchPointsAt(const AcDbIntArray& indices,
const AcGeVector3d& offset);
virtual Acad::ErrorStatus getStretchPoints(AcGePoint3dArray& stretchPoints) const;
virtual Acad::ErrorStatus intersectWith(const AcDbEntity* pEnt,
AcDb::Intersect intType,
const AcGePlane& projPlane,
AcGePoint3dArray& points,
INT_PTR thisGsMarker = 0,
INT_PTR otherGsMarker = 0) const;
virtual Acad::ErrorStatus intersectWith(const AcDbEntity* pEnt,
AcDb::Intersect intType,
AcGePoint3dArray& points,
INT_PTR thisGsMarker = 0,
INT_PTR otherGsMarker = 0) const;
virtual Acad::ErrorStatus getOsnapPoints(AcDb::OsnapMode osnapMode,
INT_PTR gsSelectionMark,
const AcGePoint3d& pickPoint,
const AcGePoint3d& lastPoint,
const AcGeMatrix3d& viewXform,
AcGePoint3dArray& snapPoints,
AcDbIntArray& geomIds) const;
virtual Acad::ErrorStatus getGripPoints(AcGePoint3dArray& gripPoints,
AcDbIntArray& osnapModes,
AcDbIntArray& geomIds) const;
virtual Acad::ErrorStatus getGeomExtents(AcDbExtents& extents) const;
virtual Acad::ErrorStatus getClassID(CLSID* pClsid) const;
virtual Acad::ErrorStatus explode(AcDbVoidPtrArray& entitySet) const;
virtual Acad::ErrorStatus copyFrom(const TImpSpecEquipment* pSrc);
virtual AcGeVector3d normal() const;
virtual void list() const;
//}}AFX_ARX_METHODS
protected:
virtual BOOL MakesureInterfaceValidate(const AcDbObjectId& id,const AcGePoint3d& ptCon,const AcGeVector3d& vtDir,TInterface& pipeInterface) const;
virtual BOOL MakesureInterfaceValidate(const AcDbObjectId& id,const AcGePoint3d& ptCon,const AcGeVector3d& vtDir) const;
BOOL FindConnect(const AcGePoint3d& ptGePos,const AcGeVector3d& vtDir,const AcDbObjectId& idOwner,AcDbObjectId& idInterface);
2026-10-04 00:04:20 +08:00
//常见体的三维画
2026-09-28 15:28:50 +08:00
BOOL ExplodeOrDraw3d_Box(CString& sScript,const AcGeMatrix3d& xform,XExplodeDraw &mode,int nGsMark) const;
BOOL ExplodeOrDraw3d_Cone(CString& sScript,const AcGeMatrix3d& xform,XExplodeDraw &mode,int nGsMark) const;
BOOL ExplodeOrDraw3d_ECone(CString& sScript,const AcGeMatrix3d& xform,XExplodeDraw &mode,int nGsMark) const;
BOOL ExplodeOrDraw3d_Cyln(CString& sScript,const AcGeMatrix3d& xform,XExplodeDraw &mode,int nGsMark) const;
BOOL ExplodeOrDraw3d_Ductr(CString& sScript,const AcGeMatrix3d& xform,XExplodeDraw &mode,int nGsMark) const;
BOOL ExplodeOrDraw3d_Helb(CString& sScript,const AcGeMatrix3d& xform,XExplodeDraw &mode,int nGsMark) const;
BOOL ExplodeOrDraw3d_Hesp(CString& sScript,const AcGeMatrix3d& xform,XExplodeDraw &mode,int nGsMark) const;
BOOL StringToAcGePoint3d(CString& sText,AcGePoint3d& ptGe) const;
BOOL Script2StringArray(const CString& sScript,TCHAR tSpace,CStringArray& arTexts) const;
BOOL StringToAcGeVector3d(CString& sText,AcGeVector3d& vt) const;
BOOL IsParallelToX() const;
BOOL IsParallelToY() const;
BOOL IsParallelToZ() const;
protected:
TDbXDataMap* m_pXDataMap;
AcDbEntity* m_pOwnerEnt;
friend class TDbEImpFittingCreatorService;
friend class TDbHImpFittingCreatorService;
};
#endif //_TIMPSPECEQUIPMENT_H__