94 lines
2.8 KiB
C++
94 lines
2.8 KiB
C++
#ifndef CONVERT_OLD_H
|
|
#define CONVERT_OLD_H
|
|
|
|
class T3Wall;
|
|
class T3Opening;
|
|
class T3Column;
|
|
|
|
//构件基类
|
|
class T3Object
|
|
{
|
|
protected:
|
|
AcDbObjectIdArray m_idSubObject;//离散子对象
|
|
AcDbObjectId m_idObject;//新生成的整体对象
|
|
|
|
DualList<T3Object*> m_lstNeighbour;//连接对象
|
|
protected:
|
|
Adesk::UInt16 GetColorIndex()const;
|
|
AcDbObjectId GetLayer()const;
|
|
virtual AcDbEntity *MakeEntity()const=0;
|
|
public:
|
|
AcDbObjectId Make();//生成新对象,并加入到模型空间
|
|
AcDbObjectId GetObjectId()const{return m_idObject;}//ok
|
|
|
|
bool operator >(const T3Object &){return false;}
|
|
bool operator <(const T3Object &){return false;}
|
|
};
|
|
//柱子
|
|
class T3Column:public T3Object
|
|
{
|
|
protected:
|
|
XPoly2D m_polyOutline;
|
|
XPoint m_ptCenter;
|
|
TColumnData::TSectionShape m_nShape;
|
|
protected:
|
|
virtual AcDbEntity *CreateEntity()const;
|
|
};
|
|
//双线墙
|
|
class T3Wall:public T3Object,public XCurveSegment
|
|
{
|
|
protected:
|
|
double m_fLeftWidth,m_fRightWidth;
|
|
protected:
|
|
virtual AcDbEntity *CreateEntity()const;
|
|
};
|
|
//门窗
|
|
class T3Opening:public T3Object
|
|
{
|
|
protected:
|
|
XPoint m_ptStart,m_ptEnd;//起点终点(与墙基线同方向)
|
|
AcDbObjectId m_idStyle2d;//二维样式(图块)
|
|
AcDbObjectIdArray m_idWalls;//所在墙
|
|
protected:
|
|
virtual AcDbEntity *CreateEntity()const;
|
|
};
|
|
//所有构件
|
|
class T3AllObjects
|
|
{
|
|
protected:
|
|
PDList<T3Wall> m_lstWall;//所有墙构件
|
|
PDList<T3Opening> m_lstOpening;//所有窗构件
|
|
PDList<T3Column> m_lstColumn;//所有柱构件
|
|
public:
|
|
//识别数据
|
|
static double s_fMaxWallWidth;//最大墙宽
|
|
static CString s_sWallLayer;//墙图层定义
|
|
static CString s_sOpeningLayer;//门窗图层定义
|
|
static CString s_sColumnLayer;//柱图层定义
|
|
static CString s_sDefaultDoor;//门图块
|
|
static CString s_sDefaultWin;//窗图块
|
|
static CString s_sDefaultColumnRect;//方柱图块
|
|
static CString s_sDefaultColumnCircle;//圆柱图块
|
|
//默认数据
|
|
static double s_fDefaultHeight;//墙柱高
|
|
static double s_fDefaultElev;//墙柱低标高
|
|
static double s_fDefaultWinSill;//窗台高
|
|
static double s_fDefaultDoorSill;//门槛高
|
|
static double s_fDefaultWinHeight;//窗高
|
|
static double s_fDefaultDoorHeight;//门高
|
|
static TWallData::TWallStyle s_nDefaultWallMat;//普通材质
|
|
static TColumnData::TColumnMaterial s_nDefaultColumnMat;//柱材质
|
|
static CString s_sDefaultDoor3d;//三维门样式
|
|
static CString s_sDefaultWin3d;//三维空样式
|
|
public:
|
|
T3AllObjects();
|
|
|
|
void operator <<(T3Column *pNew){m_lstColumn<<pNew;};//ok
|
|
void operator <<(T3Wall *pNew){m_lstWall<<pNew;}//ok
|
|
void operator <<(T3Opening *pNew){m_lstOpening<<pNew;}//ok
|
|
|
|
void Identify(PickSet ssIn,PickSet& ssWallLeft,PickSet &ssOpeningLeft,PickSet&ssColumnLeft);//模糊识别构件,未识别内容从后三个参数返回(需要手工识别)
|
|
void Adjust();//精确调整构件关系
|
|
void Output();//输出并删除旧图形
|
|
};
|
|
#endif |