188 lines
5.9 KiB
C++
188 lines
5.9 KiB
C++
//------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2011, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TDbStruNodePoint类
|
|
// = Version : ver1.0
|
|
// = Author : xlc
|
|
// = CreateDate : 2011-05-26
|
|
// = Description: 结构节点类声明
|
|
// = Maintainers:
|
|
//
|
|
//------------------------------------------------------------------------+
|
|
#ifdef TASD
|
|
#ifndef _TDBSTRUNODEPOINT_H_
|
|
#define _TDBSTRUNODEPOINT_H_
|
|
|
|
#ifndef _TDBSTRUENTITYBASE_H_
|
|
#include "TDbStruEntityBase.h"
|
|
#endif
|
|
|
|
#ifndef _TASSOCMSG_H_
|
|
#include "TAssocMsg.h"
|
|
#endif
|
|
|
|
#ifndef _TSTRULOAD_H_
|
|
#include "TStruLoad.h"
|
|
#endif
|
|
//节点字典数据
|
|
//int m_nType; //节点性质 KEY_TYPE
|
|
//AcGePoint3dArray m_posPts; //节点位置数组 KEY_PTS
|
|
//CString m_strNo; //编号 KEY_NO
|
|
//int m_nLayNo //节点层号 KEY_LAYNO
|
|
|
|
class TARCH_EXP TDbStruNodePoint : public TDbStruEntityBase
|
|
{
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbStruNodePoint);
|
|
|
|
private:
|
|
static const Adesk::UInt8 g_nVersion;
|
|
|
|
public:
|
|
TDbStruNodePoint();
|
|
virtual ~TDbStruNodePoint();
|
|
|
|
// Overriden function from AcDbEntity
|
|
virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler* pFiler);//ok
|
|
|
|
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* pFiler) const;//ok
|
|
|
|
virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler* pFiler);
|
|
|
|
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* pFiler) const;
|
|
|
|
virtual Acad::ErrorStatus subGetOsnapPoints(
|
|
AcDb::OsnapMode osnapMode,
|
|
INT_PTR gsSelectionMark,
|
|
const AcGePoint3d& pickPoint,
|
|
const AcGePoint3d& lastPoint,
|
|
const AcGeMatrix3d& viewXform,
|
|
AcGePoint3dArray& snapPoints,
|
|
AcDbIntArray& geomIds) const;
|
|
|
|
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);//ok
|
|
|
|
virtual Acad::ErrorStatus subGetTransformedCopy(
|
|
const AcGeMatrix3d& xform,
|
|
AcDbEntity*& pEnt) const;
|
|
virtual Acad::ErrorStatus copyFrom(const AcRxObject* pSrc); //ok
|
|
|
|
|
|
virtual Acad::ErrorStatus subGetGripPoints(
|
|
AcGePoint3dArray& gripPoints,
|
|
AcDbIntArray& osnapModes,
|
|
AcDbIntArray& geomIds)const;//ok
|
|
|
|
virtual Acad::ErrorStatus subGetStretchPoints(AcGePoint3dArray& stretchPoints) const;
|
|
|
|
virtual Acad::ErrorStatus subMoveGripPointsAt(
|
|
const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);//ok
|
|
|
|
virtual Acad::ErrorStatus subMoveStretchPointsAt(
|
|
const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
|
|
virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
|
|
|
|
virtual Acad::ErrorStatus subWblockClone(
|
|
AcRxObject* pOwner,
|
|
AcDbObject*& pClonedObject,
|
|
AcDbIdMapping& idMap,
|
|
Adesk::Boolean isPrimary) const;
|
|
virtual Acad::ErrorStatus subDeepClone(AcDbObject* pOwner,
|
|
AcDbObject*& pClonedObject,
|
|
AcDbIdMapping& idMap,
|
|
Adesk::Boolean isPrimary) const;
|
|
|
|
// Overriden function from TEntityBase
|
|
// 夹点提示
|
|
virtual Acad::ErrorStatus GetGripText(int i, CString &cs) const;//ok
|
|
// 绘制3D
|
|
virtual Acad::ErrorStatus ExplodeOrDraw3d(TGGiExplodeDrawBase &dc) const;//ok
|
|
// 绘制2D
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(TGGiExplodeDrawBase &dc) const;//ok
|
|
|
|
// 获得二维包围盒
|
|
virtual Acad::ErrorStatus GetExtents2d(TADSGePoint3d &ptLow, TADSGePoint3d &ptUp) const;//ok
|
|
|
|
// 获得三维包围盒
|
|
virtual Acad::ErrorStatus GetExtents(TADSGePoint3d &ptLow, TADSGePoint3d &ptUp) const;//ok
|
|
|
|
// 统一标高
|
|
virtual bool UnifyElevation(double dElevation); //ok
|
|
|
|
//取动态属性显示数据
|
|
virtual void GetTips(TDPtrList<TObjInfoUnit> &) const;
|
|
|
|
virtual const TCHAR *GetDefaultLayer() const;
|
|
|
|
virtual BOOL IsValid() const;
|
|
|
|
// 属性匹配
|
|
virtual void CopyPropertiesFrom(AcDbEntity *pSrcEntity, unsigned gMatchFlag);//ok
|
|
// 获得标准三维面
|
|
virtual bool GetStandardFaceBody(AcDbVoidPtrArray& arFacePtrs) const;
|
|
// 获得安全保护区
|
|
virtual bool GetSafeProtectedSpace(AcDbVoidPtrArray& arFacePtrs) const;
|
|
// 获得剖面
|
|
virtual bool GetSection(const AcDbFace &face, const AcGeVector3d& vtPlaneSecDir,
|
|
std::vector<TObjSectionRecord> §ionRecords,
|
|
AcDbVoidPtrArray& arFillPtrs) const;
|
|
// 获得XML
|
|
virtual CString GetXml(const AcGeMatrix3d& mat) const;
|
|
|
|
virtual int GetFirstVersion()const;
|
|
virtual bool IsModelEntity() const;
|
|
|
|
// 建立关联关系
|
|
virtual void MakeAssocRelation(AcDbObjectIdArray& ids);//ok
|
|
// 移除关联关系
|
|
virtual void RemoveAssocRelation(AcDbObjectId& id);//ok
|
|
// 获取关联关系,nType:关联类型;ar:关联对象句柄数组
|
|
// nType:ASSOC_XY,ASSOC_Z
|
|
virtual void GetAssocRelation(int nType, AcDbObjectIdArray& ar)const;//ok
|
|
|
|
//add by xlc on 120118
|
|
//设置荷载数组
|
|
virtual bool SetLoadsArray(const std::vector<TStruLoad>& vectLoads);
|
|
//获得荷载数组
|
|
virtual bool GetLoadsArray(std::vector<TStruLoad>& vectLoads)const;
|
|
//清除荷载数组
|
|
virtual void ClearLoadsArray();
|
|
|
|
//荷载
|
|
AcDbObjectId GetLayerLoad() const;
|
|
void SetLayerLoad(AcDbObjectId idLayer);
|
|
//活荷值
|
|
AcDbObjectId GetLayerLoadL() const;
|
|
void SetLayerLoadL(AcDbObjectId idLayer);
|
|
//恒荷值
|
|
AcDbObjectId GetLayerLoadC() const;
|
|
void SetLayerLoadC(AcDbObjectId idLayer);
|
|
//文字样式
|
|
AcDbObjectId GetTextStyle() const;
|
|
void SetTextStyle(AcDbObjectId idLayer);
|
|
//文字样式
|
|
AcDbObjectId GetTextStyleRB() const;
|
|
void SetTextStyleRB(AcDbObjectId idLayer);
|
|
protected:
|
|
// 节点编号
|
|
void DrawClab(TGGiExplodeDrawBase &dc) const;
|
|
AcDbHardPointerId m_idLayerLoad; //荷载
|
|
AcDbHardPointerId m_idLayerLoadL; //活荷值
|
|
AcDbHardPointerId m_idLayerLoadC; //恒荷值
|
|
AcDbHardPointerId m_idTextStyle; //文字样式
|
|
AcDbHardPointerId m_idTextStyleRB; //文字样式
|
|
private:
|
|
// 节点荷载
|
|
void DrawNodeLoad(TGGiExplodeDrawBase &dc, TGGePoly2D poly)const;
|
|
// 得到荷载信息
|
|
BOOL GetLoadData(TStruLoad &loadData,int n2dOr3dFlag, TGGiExplodeDrawBase &dc)const;
|
|
void DrawLoad3d(TStruLoad loadData, TGGiExplodeDrawBase &dc)const;
|
|
void DrawLoadText(TStruLoad loadData,int n2dOr3dFlag,
|
|
double &dDis, TGGiExplodeDrawBase &dc)const;
|
|
|
|
AcDbObjectIdArray m_arAssocIds; //关联对象ID数组
|
|
};
|
|
#endif
|
|
#endif |