Files
envi-code/SourceCode/Code2026/tg_shs/shs_pipebase/TImpSpecEquipment.h
T
2026-09-28 15:28:50 +08:00

200 lines
7.5 KiB
C++

#ifndef _TIMPSPECEQUIPMENT_H__
#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();
// 接口描述对象
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;
// 建立接口关联关系
virtual BOOL SetInterfaceRelation(const AcGePoint3d& ptConnect,const AcDbObjectId& idConnect);
//移除接口关联关系
virtual BOOL RemoveInterfaceRelation(const AcGePoint3d& ptConnect,const AcDbObjectId& idConnect);
// 接口更改通知
virtual BOOL NotifyInterfaceToModify(const TInterfaceModifyMsg& iModiMsg,TInterfaceModifyMsgs& iModiMsgs);
// 专业数据
virtual TDbXDataMap* GetSpecialtyData();
// 统一法向量
virtual Acad::ErrorStatus setNormal(const AcGeVector3d& vtNorm);
// 获取2维显示的所有曲线
virtual BOOL MakeCurves(TComplexCurve& cplCurve) const;
// 获取2维边界内显示的曲线
virtual BOOL GetCurvesInSide(TComplexCurve& compCurve) const;
// 获取2维显示的边界pl线
virtual AcDbPolyline* MakePolyCurve() const;
// 获取2维边界围城的面
virtual BOOL MakePolyCurveFaces(AcDbVoidPtrArray& arFaces);
// 获取对象类型名称 [es. 弯头--> TCH_EELBOW]
virtual void GetKindName(CString& sName);
//自身边界
virtual BOOL GetGeomExtentsEdge(TComplexCurve& crLoop);
// 解释夹点
virtual TDb::Position ExplainGripIndex(int nIndex) const;
// 夹点提示
virtual Acad::ErrorStatus GetGripText(int i, CString &cs) const;
// 对象查询
virtual void GetTips(CMapStringToString& mapLable2Tip) const;
// 根据参数名称获得实体的OPM信息,pszName:参数名称(XMap key值)
virtual BOOL OPMInfo(LPCTSTR pszName, TDb::OPMInfo* pInfo);
// 判断当前实体参数是否有效,并将有效的参数数据返回到map中
virtual BOOL IsValid(TDbXDataMap* pXMap);
//修改标注
virtual void SetSubText(long i,CString sText){};
void Destroy();
void SetData(const TDbXDataMap* pMap);
// 处理实体删除后操作
virtual void OnSubErase(Adesk::Boolean erasing);
// 用户自定义调用
virtual LRESULT UserCall(long i,LPVOID pData);
//获取三维的壳对象
virtual int GetXBaseShell(TXShell& xShell);
//获取体的范围方块
virtual int GetBodyBox(AcDbExtents& ext) const;
// add by hh 2010-12-27 导出XML
// virtual CString GetXml() const;
// 根据以工程方式组装部分导出XML的要求,增加一个形参Lixl add 2012-2-1
virtual CString GetXml(const AcGeMatrix3d& mat) const;
// add by hh 2011.02.10 剖切功能。 注意 GetSection内不应将std::vector<TObjSectionRecord>参数清空
virtual bool GetSection(const AcDbFace &face, const AcGeVector3d &vtPlaneSecDir,
std::vector<TObjSectionRecord> &sectionRecord, AcDbVoidPtrArray& arFillPtrs) const;
// 剖切用,返回Z坐标最高、最低点
virtual Acad::ErrorStatus GetExtents(TADSGePoint3d &ptLow, TADSGePoint3d &ptUp) const;
// add by hh 2011-09-28 取得图块中所有图元的的几何数据
virtual BOOL GetBlockComplexCurve(TComplexCurve& comCurve) const;
// add by hh 2014-08-06 支持设备与水管遮挡
virtual Acad::ErrorStatus GetClipBoundary(TGGePoly2D& poly)const;
virtual bool IsMeClip() const;
virtual bool IsClipMe(const TEntityBase* pEnt=NULL)const;//ok是否被裁剪
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);
//常见体的三维画
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__