99 lines
2.7 KiB
C++
99 lines
2.7 KiB
C++
#ifndef STAIRMAKER_H
|
|
#define STAIRMAKER_H
|
|
|
|
#include "dbjig.h"
|
|
#include "MultiStairDlg.h"
|
|
#include "ArcStairdlg.h"
|
|
#include "CurveStairdlg.h"
|
|
#include "RectStairdlg.h"
|
|
#include "DbMultiStair.h"
|
|
#include "multistaircreatedlg.h"
|
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
//多跑楼梯拖制临时实体
|
|
class TJigMultiStair:public TDbMultiStair
|
|
{
|
|
protected:
|
|
XPoint m_ptLoc;
|
|
public:
|
|
TJigMultiStair();
|
|
virtual ~TJigMultiStair();
|
|
Adesk::Boolean subWorldDraw(AcGiWorldDraw *mode);
|
|
void subViewportDraw(AcGiViewportDraw *mode);
|
|
BOOL IsPathValid() const;
|
|
};
|
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
//多跑楼梯拖制类
|
|
class TMultiStairJig:public AcEdJig
|
|
{
|
|
protected:
|
|
TJigMultiStair *pJigStair;
|
|
|
|
XPoly2D path;
|
|
DList<Adesk::UInt8> type;//与path长度相同
|
|
|
|
int nRetKey;
|
|
int stepNum;
|
|
public:
|
|
//contruct/distruct
|
|
TMultiStairJig();
|
|
virtual ~TMultiStairJig();
|
|
|
|
//attribute
|
|
const XPoly2D &GetPath();
|
|
|
|
void Push();
|
|
void Pop();
|
|
XPoint GetCurPoint()const{return path[path.Length()-1];}//ok
|
|
void SetCurPoint(XPoint pt){*path[path.Length()-1]=pt;}//ok
|
|
XPoint GetStartPoint()const{return path[path.Length()-2];}//ok
|
|
bool IsFirstStair()const{return path.Length()==2;}//ok
|
|
bool IsMakePlatform()const{return type[type.Length()-1]==1;}//ok
|
|
bool IsPlatformLast()const{return type[type.Length()-2]==1;}//ok
|
|
|
|
BOOL Apply();
|
|
void Apply(TDbMultiStair*pNewStair);
|
|
void Init(const XPoint &pt,CMultiStairDlg&dlg);
|
|
bool MakeIt();
|
|
int DoIt();
|
|
//override
|
|
virtual DragStatus sampler();
|
|
virtual Adesk::Boolean update();
|
|
virtual AcDbEntity* entity() const;
|
|
};
|
|
//新添加的Jig,对多跑楼梯的Drag操作//-------------------------------------------------------------------------
|
|
class TMultiStairCreateJig:public AcEdJig
|
|
{
|
|
protected:
|
|
TJigMultiStair *pJigStair;
|
|
XPoly2D path;
|
|
DList<Adesk::UInt8> type;
|
|
int nRetKey;
|
|
int stepNum;
|
|
public:
|
|
CMultiStairCreateDlg *m_dlg;
|
|
|
|
//同样的事情有同样的函数
|
|
TMultiStairCreateJig();
|
|
virtual ~TMultiStairCreateJig();
|
|
const XPoly2D &GetPath();
|
|
|
|
void Push();
|
|
void Pop();
|
|
XPoint GetCurPoint()const{return path[path.Length()-1];}//ok
|
|
void SetCurPoint(XPoint pt){*path[path.Length()-1]=pt;}//ok
|
|
XPoint GetStartPoint()const{return path[path.Length()-2];}//ok
|
|
bool IsFirstStair()const{return path.Length()==2;}//ok
|
|
bool IsMakePlatform()const{return type[type.Length()-1]==1;}//ok
|
|
bool IsPlatformLast()const{return type[type.Length()-2]==1;}//ok
|
|
|
|
BOOL Apply();
|
|
void Apply(TDbMultiStair*pNewStair);
|
|
void Init(const XPoint &pt,CMultiStairCreateDlg&dlg);//就是修改了原有的,加个create
|
|
bool MakeIt();
|
|
int DoIt();
|
|
//override
|
|
virtual DragStatus sampler();
|
|
virtual Adesk::Boolean update();
|
|
virtual AcDbEntity* entity() const;
|
|
};
|
|
#endif |