222 lines
6.0 KiB
C++
222 lines
6.0 KiB
C++
// DbFloorRect.h: interface for the TDbFloorRect class.
|
||
//
|
||
//////////////////////////////////////////////////////////////////////
|
||
|
||
#if !defined(AFX_DBFLOORRECT_H__E28722E1_CA4E_4411_8513_E56D227DEBCF__INCLUDED_)
|
||
#define AFX_DBFLOORRECT_H__E28722E1_CA4E_4411_8513_E56D227DEBCF__INCLUDED_
|
||
|
||
#if _MSC_VER > 1000
|
||
#pragma once
|
||
#endif // _MSC_VER > 1000
|
||
|
||
/*============================================================================*
|
||
* Copyright(c), 1994-2008, Beijing Tangent Engineering Software Co.Ltd.
|
||
* 作 者: 沈睿
|
||
* 创建时间: 2009-2-28
|
||
* 描 述: 楼层范围
|
||
* 归属项目: 公共
|
||
* 修改记录: 2010-1-18,宋戈修改,并从PipeWire工程移植到tch_kernal工程
|
||
=============================================================================*/
|
||
|
||
class TARCH_EXP TDbFloorRect : public TDbEntity
|
||
{
|
||
DECLARE_TENTBASE();
|
||
ACRX_DECLARE_MEMBERS(TDbFloorRect);
|
||
|
||
private:
|
||
static const Adesk::UInt8 g_nVersion;
|
||
|
||
public:
|
||
TDbFloorRect();
|
||
|
||
protected:
|
||
XPoint m_ptBase; // 楼层基点
|
||
XPoint m_ptCenter; // 中心点
|
||
double m_dLength; // 长
|
||
double m_dWidth; // 宽
|
||
double m_dFloorHeight; // 楼层高度
|
||
double m_nSpare; // 备用,sg modify 100118,改用做文字字高
|
||
XString m_sFloorName; // 楼层名词
|
||
Adesk::UInt8 m_nFloorFrom; // 楼层起始层
|
||
Adesk::UInt8 m_nFloorTo; // 楼层终止层
|
||
BOOL m_bShow; // 是否显示
|
||
XString m_sSpare; // 备用,sg modify 100202,改用做工程名称
|
||
|
||
public:
|
||
BOOL IsShow() const {
|
||
return m_bShow;
|
||
}
|
||
void SetShow(BOOL bFlag = TRUE) {
|
||
assertWriteEnabled();
|
||
m_bShow = bFlag;
|
||
}
|
||
|
||
const TCHAR* GetFloorName() const {
|
||
return (const TCHAR*)m_sFloorName;
|
||
}
|
||
void SetFloorName(const TCHAR *szFloorName) {
|
||
assertWriteEnabled();
|
||
m_sFloorName = szFloorName;
|
||
}
|
||
|
||
int GetFloorTo() const {
|
||
return m_nFloorTo;
|
||
}
|
||
void SetFloorTo(const Adesk::UInt8 nNum) {
|
||
assertWriteEnabled();
|
||
m_nFloorTo = nNum;
|
||
}
|
||
|
||
int GetFloorFrom() const {
|
||
return m_nFloorFrom;
|
||
}
|
||
void SetFloorFrom(const Adesk::UInt8 nNum) {
|
||
assertWriteEnabled();
|
||
m_nFloorFrom = nNum;
|
||
}
|
||
|
||
double GetFloorHeight() const {
|
||
return m_dFloorHeight;
|
||
}
|
||
void SetFloorHeight(double dFloorHeight) {
|
||
assertWriteEnabled();
|
||
m_dFloorHeight = dFloorHeight;
|
||
}
|
||
|
||
double GetWidth() const {
|
||
return m_dWidth;
|
||
}
|
||
void SetWidth(double dWidth) {
|
||
assertWriteEnabled();
|
||
m_dWidth = dWidth;
|
||
}
|
||
|
||
double GetLength() const {
|
||
return m_dLength;
|
||
}
|
||
void SetLength(double dLength) {
|
||
assertWriteEnabled();
|
||
m_dLength = dLength;
|
||
}
|
||
|
||
const TCHAR* GetSpare() const {
|
||
return (const TCHAR*)m_sSpare;
|
||
}
|
||
void SetSpare(const TCHAR *szSpare) {
|
||
assertWriteEnabled();
|
||
m_sSpare = szSpare;
|
||
}
|
||
|
||
XPoint GetBase() const {
|
||
return m_ptBase;
|
||
}
|
||
void SetBase(const XPoint &pt) {
|
||
assertWriteEnabled();
|
||
m_ptBase = pt;
|
||
}
|
||
|
||
XPoint GetCenter() const {
|
||
return m_ptCenter;
|
||
}
|
||
void SetCenter(const XPoint &pt) {
|
||
assertWriteEnabled();
|
||
m_ptCenter = pt;
|
||
}
|
||
|
||
// sg add 100118,增加8.5新需求需要的动态数据
|
||
// 文字位置
|
||
XPoint GetTextPt(bool bAsPaperUnit = true) const;
|
||
void SetTextPt(const XPoint &pt, bool bAsPaperUnit = true);
|
||
|
||
// 文字字高,修改备用数据m_nSpare
|
||
double GetTextHeight(bool bAsPaperUnit = true) const;
|
||
void SetTextHeight(double dHeight, bool bAsPaperUnit = true);
|
||
|
||
// 文字样式
|
||
AcDbObjectId GetTextStyleId() const;
|
||
void SetTextStyleId(AcDbObjectId id);
|
||
|
||
// 基点显示样式,1为X,2为点
|
||
int GetBaseType() const;
|
||
void SetBaseType(int nType);
|
||
|
||
// X型中,叉线的长度,固定值,与出图比例无关
|
||
double GetCrossLen() const;
|
||
void SetCrossLen(double dCrossLen);
|
||
|
||
// sg add 100119,增加文字颜色的动态数据
|
||
Adesk::UInt16 GetTextColor() const;
|
||
void SetTextColor(Adesk::UInt16 color);
|
||
|
||
// sg add 100401,增加对象对应楼层表中的行号的动态数据
|
||
short GetTableIndex() const;
|
||
void SetTableIndex(short nIndex);
|
||
|
||
// sg add 120106,为结构专业的楼层框对象使用,显示不同的样式
|
||
void SetStruFloorRect(BOOL bStru = FALSE);
|
||
BOOL IsStruFloorRect() const;
|
||
|
||
// 导出参数
|
||
XPoint GetLowLeft() const;
|
||
XPoint GetLowRight() const;
|
||
XPoint GetUpRight() const;
|
||
XPoint GetUpLeft() const;
|
||
void GetPolyline(AcDbPolyline &pline) const;
|
||
|
||
public: // Override TDbEntity
|
||
// virtual Acad::ErrorStatus GetGripText(int idx, CString &cs) const;
|
||
// sg add 100119,增加夹点说明
|
||
virtual Acad::ErrorStatus GetGripText(int idx, CString &cs) const;
|
||
|
||
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> &) const; // 取动态属性显示数据
|
||
virtual int GetFirstVersion() const {
|
||
return 8;
|
||
}
|
||
|
||
public: // Override AcDbEntity
|
||
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 subGetGripPoints(AcGePoint3dArray& gripPoints,
|
||
AcDbIntArray& osnapModes,
|
||
AcDbIntArray& geomIds) const;
|
||
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
|
||
const AcGeVector3d& offset);
|
||
virtual Acad::ErrorStatus subMoveStretchPointsAt(const AcDbIntArray& indices,
|
||
const AcGeVector3d& offset);
|
||
|
||
virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler*);
|
||
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler*) const;
|
||
virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler*);
|
||
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler*) const;
|
||
|
||
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
|
||
|
||
// sg delete 100211,增加了数据库反映器,可处理楼层号重复的问题,因此可支持deepclone
|
||
/*
|
||
virtual Acad::ErrorStatus subDeepClone(AcDbObject* pOwner,
|
||
AcDbObject*& pClonedObject,
|
||
AcDbIdMapping& idMap,
|
||
Adesk::Boolean isPrimary) const;
|
||
*/
|
||
|
||
// sg add 100121,不支持在位编辑
|
||
virtual TSubText* HitTestText(XPoint pt)const;
|
||
|
||
private:
|
||
// sg add 100119,根据左下角点、以及文字位置点相对坐标,计算文字位置实际坐标
|
||
XPoint CalTextPt() const;
|
||
};
|
||
|
||
#endif // !defined(AFX_DBFLOORRECT_H__E28722E1_CA4E_4411_8513_E56D227DEBCF__INCLUDED_)
|