244 lines
7.8 KiB
C++
244 lines
7.8 KiB
C++
//------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2011, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TDbStruFloorSlab类
|
|
// = Version : ver1.0
|
|
// = Author : xlc
|
|
// = CreateDate : 2011-05-26
|
|
// = Description: 结构楼板类声明
|
|
// = Maintainers:
|
|
//
|
|
//------------------------------------------------------------------------+
|
|
#ifdef TASD
|
|
#ifndef _TDBSTRUFLOORSLAB_H_
|
|
#define _TDBSTRUFLOORSLAB_H_
|
|
|
|
#ifndef _TDBSTRUENTITYBASE_H_
|
|
#include "TDbStruEntityBase.h"
|
|
#endif
|
|
|
|
#ifndef _TASSOCMSG_H_
|
|
#include "TAssocMsg.h"
|
|
#endif
|
|
|
|
#ifndef _TGGEVISIBILITYPOLY2D_H_
|
|
#include "TGGeVisibilityPoly2D.h"
|
|
#endif
|
|
|
|
#ifndef _TSTRULOAD_H_
|
|
#include "TStruLoad.h"
|
|
#endif
|
|
|
|
// 楼板字典数据
|
|
//位置点 KEY_POS AcGePoint3d
|
|
//楼板厚 KEY_THICK double
|
|
//抬板高度 KEY_UPHIGH double
|
|
//板类型 KEY_KIND int 0:普通板 1:悬挑板
|
|
//楼板是否加亮标记 KEY_HLGHT int
|
|
//边界属性 KEY_BOUND int
|
|
class TARCH_EXP TDbStruFloorSlab : public TDbStruEntityBase
|
|
{
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbStruFloorSlab);
|
|
|
|
private:
|
|
static const Adesk::UInt8 g_nVersion;
|
|
|
|
public:
|
|
TDbStruFloorSlab();
|
|
virtual ~TDbStruFloorSlab();
|
|
|
|
// 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 PostAssocMsg(TAssocMsg assocMsg)const;
|
|
// 对象接收到更改消息
|
|
virtual void ReceiveAssocMsg(TAssocMsg assocMsg);//ok
|
|
// 建立关联关系
|
|
virtual void MakeAssocRelation(AcDbObjectIdArray& ids);//ok
|
|
// 不验证关系,直接建立关联关系
|
|
virtual void MakeAssocRelationDirect(const AcDbObjectId& idObj);
|
|
// 移除关联关系
|
|
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();
|
|
|
|
//add by xlc on 130621
|
|
//设置边界属性数组
|
|
virtual bool SetBoundArray(const std::vector<int>& vectBound);
|
|
virtual bool GetBoundArray(std::vector<int>& vectBound)const;
|
|
virtual void ClearBoundArray();
|
|
|
|
void SetBound(int nIndex, int nVal);
|
|
bool GetBound(int nIndex, int& nVal)const;
|
|
|
|
|
|
void GetOutline(TGGePoly2D &poly) const;//ok
|
|
const TGGePoly2D& GetOutlinePoly() const;//ok
|
|
void SetOutlinePoly(const TGGePoly2D &poly);//ok
|
|
|
|
double GetTopElev() const; //ok
|
|
void SetTopElev(double dElev); //ok
|
|
|
|
bool IsVisibleAt(int idx) const; // 获得边的可见性
|
|
void SetVisibleAt(int idx, bool bHasRail); // 设置边的可见性
|
|
|
|
void AddAssocWallId(const AcDbObjectId &idWall); // 添加关联墙id
|
|
void RemoveAssocWall();
|
|
|
|
//荷载
|
|
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:
|
|
|
|
AcDbHardPointerId m_idLayerLoad; //荷载
|
|
AcDbHardPointerId m_idLayerLoadL; //活荷值
|
|
AcDbHardPointerId m_idLayerLoadC; //恒荷值
|
|
AcDbHardPointerId m_idTextStyle; //文字样式
|
|
AcDbHardPointerId m_idTextStyleRB; //文字样式
|
|
private:
|
|
|
|
// 绘制悬挑板
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d2(TGGiExplodeDrawBase &dc) const;
|
|
// 根据seg与墙的交点设置其可见性
|
|
void GetPoly(TGGeVisibilityPoly2D &poly, TGGeCurveSegment &seg) const;
|
|
|
|
// 显示板的构件编号
|
|
void DrawClab(TGGiExplodeDrawBase &dc) const;
|
|
// 显示板厚
|
|
void DrawBH(TGGiExplodeDrawBase &dc) const;
|
|
// 显示边界
|
|
void DrawBorder(TGGiExplodeDrawBase &dc) const;
|
|
// 绘制荷载
|
|
void DrawSlabLoad(TGGiExplodeDrawBase &dc, int n2dOr3dFlag)const;
|
|
void DrawSlabLoad2dOr3d(TGGiExplodeDrawBase &dc, TStruLoad loadData, int n2dOr3dFlag) const;
|
|
void DrawSlabLoadText2dOr3d(TGGiExplodeDrawBase &dc, TStruLoad loadData,
|
|
int n2dOr3dFlag) const;
|
|
// 判断是否为斜板
|
|
BOOL IsInclinedSlab()const;
|
|
|
|
//根据与cvSeg相邻的两条边cvleftseg,cvrightseg求出偏移后截断的cvseg
|
|
void GetBoundSegment(TGGeCurveSegment &cvSeg, TGGeCurveSegment cvLeftSeg, TGGeCurveSegment cvRightSeg, int &nSide) const;
|
|
//偏移cvseg,保证偏移后的线段仍然在poly中,偏移距离为dOffsetDis
|
|
int GetOffsetSegment(TGGeCurveSegment &cvSeg, TGGePoly2D poly, double dOffsetDis) const;
|
|
private:
|
|
|
|
TGGePoly2D m_polyOutline; //楼板形状
|
|
AcDbObjectIdArray m_arAssocHoleIds; //关联洞对象ID数组
|
|
AcDbObjectIdArray m_arAssocZIds; //z向关联对象ID数组
|
|
AcDbObjectIdArray m_arAssocWallIds; //悬挑板关联的墙对象
|
|
};
|
|
#endif
|
|
#endif |