79 lines
2.7 KiB
C++
79 lines
2.7 KiB
C++
#ifndef __DBRAIL_H
|
|
#define __DBRAIL_H
|
|
#include "DbPolyPathEnt.h"
|
|
|
|
#define RF_ALIGN_LEFT 0x01
|
|
#define RF_AUTOEXPAND 0x02
|
|
#define RF_NEED2D 0x04
|
|
#define RF_DISABLE3D 0x08 // TArch6 Final
|
|
class TDbStair;
|
|
|
|
// 是纯粹的三维物体
|
|
class TARCH_EXP TDbRail: public TDbPolyPathEnt {
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbRail);
|
|
private:
|
|
const static Adesk::UInt8 g_nVersion;
|
|
protected:
|
|
AcDbHardPointerId m_idUnit; //自定义扶手
|
|
XPoly2D m_polyBase; //扶手路径
|
|
double m_nUnitWidth; //单元宽
|
|
double m_nInitDist; //初始间距
|
|
Adesk::UInt8 m_nRailFlag; //单元对齐方式
|
|
|
|
// 用于捕捉加速, 不存盘
|
|
Adesk::UInt16 m_nQuickMarker;
|
|
public:
|
|
TDbRail();
|
|
~TDbRail();
|
|
virtual BOOL IsValid() const;
|
|
virtual void CopyPropertiesFrom(AcDbEntity *pSrcEntity, unsigned gMatchFlag);
|
|
|
|
// Overriden function from AcDbEntity
|
|
virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
|
|
virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler*);
|
|
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler*) const;
|
|
virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler*);
|
|
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler*) const;
|
|
/* 仍然不能解决,对象捕捉(交点),慢的问题,从ExplodeOrDraw入手更合适
|
|
virtual Acad::ErrorStatus getOsnapPoints(
|
|
AcDb::OsnapMode osnapMode,
|
|
int gsSelectionMark,
|
|
const AcGePoint3d& pickPoint,
|
|
const AcGePoint3d& lastPoint,
|
|
const AcGeMatrix3d& viewXform,
|
|
AcGePoint3dArray& snapPoints,
|
|
AcDbIntArray& geomIds) const;
|
|
*/
|
|
|
|
// drived from TDbEntity
|
|
virtual DrawType GetDrawType() const;
|
|
virtual const TCHAR *GetDefaultLayer() const;
|
|
virtual bool IsModelEntity() const{return true;}
|
|
virtual Acad::ErrorStatus ExplodeOrDraw3d(XExplodeDraw &dc) const;
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &dc) const;
|
|
virtual void GetTips(DList<TObjInfoUnit> &) const; //取动态属性显示数据
|
|
|
|
double GetUnitWidth() const;
|
|
double GetInitDist() const;
|
|
BOOL IsLeftAlign() const;
|
|
BOOL IsAutoExpand() const;
|
|
BOOL Has2D() const;
|
|
BOOL Has3D() const;
|
|
|
|
AcDbObjectId GetUnitId() const;
|
|
void SetUnitWidth(double w);
|
|
void SetUnitId(AcDbObjectId id);
|
|
void SetInitDist(double w);
|
|
void SetLeftAlign(BOOL bTrue);
|
|
void SetAutoExpand(BOOL bTrue);
|
|
void SetHas2D(BOOL bTrue);
|
|
void SetHas3D(BOOL bTrue);
|
|
|
|
virtual Acad::ErrorStatus SetPathPoly(const XPoly2D &polyPath,const AcGeVector3d&normal);
|
|
virtual Acad::ErrorStatus GetPathPoly(XPoly2D &polyPath, AcGeVector3d&normal) const;
|
|
|
|
};
|
|
|
|
|
|
#endif |