138 lines
3.9 KiB
C++
138 lines
3.9 KiB
C++
#pragma once
|
|
|
|
#include "AecDbCurveBase.h"
|
|
#include "AecDbObjXDataMap.h"
|
|
#include "EarThwormDef.h"
|
|
|
|
class AecAngleWatch;
|
|
class AecDbRoadJig;
|
|
class AECStatusRecord;
|
|
class AecDb3dRoad;
|
|
class AecDb3dRoadFitting;
|
|
|
|
class AecDbRoadLine : public AecDbCurveBase
|
|
{
|
|
public:
|
|
AecDbRoadLine();
|
|
AecDbRoadLine(AecDbRoadJig* pJig);
|
|
virtual ~AecDbRoadLine(void);
|
|
|
|
protected:
|
|
|
|
virtual Acad::ErrorStatus Draw2d(AcGiDraw &mode) const;
|
|
virtual const AecDbObjXDataMap* GetSpecialtyData() const { assertReadEnabled(); return NULL; }
|
|
virtual AecDbObjXDataMap* GetSpecialtyData(AcDb::OpenMode bMode = AcDb::kForWrite) { assertWriteEnabled(); return NULL; }
|
|
|
|
public:
|
|
|
|
//管线基本参数
|
|
//jig
|
|
void SetPipeParam(WPipe::RoadParam* pPipePar);
|
|
WPipe::RoadParam* GetPipeParam();
|
|
|
|
//jig
|
|
double GetEndElevation() const;
|
|
|
|
//jig
|
|
BOOL AddPipeNode(AECStatusRecord* pCurStaRec , WPipe::PipeDraw ePipe );
|
|
|
|
//jig
|
|
BOOL AddReducer(AECStatusRecord* pCurStaRec,WPipe::RoadParam* pParam);
|
|
|
|
//jig
|
|
void SetAngleWath(AcGePoint3d& ptCen,const AcGePoint3d& ptGeTo,const AcGeVector3d& vtDir = AcGeVector3d::kXAxis);
|
|
|
|
//jig
|
|
void MoveAngWatchPosition();
|
|
|
|
//jig 画管线停止
|
|
BOOL PipeFinished();
|
|
|
|
//jig
|
|
void PopUpInterface(int nGroupID);
|
|
void PushPipeParam();
|
|
void PushInterface(AecInterface& intf,BOOL bStartDragFromIt = FALSE);
|
|
|
|
//jig
|
|
int GetLastInfCount() const;
|
|
AecInterface* GetLastInterface();
|
|
AecInterface* GetLastLastInterface();
|
|
|
|
public:
|
|
|
|
virtual BOOL CreateWPipe(AECStatusRecord* pRec,BOOL bMaybeAddTee = FALSE);
|
|
|
|
virtual BOOL ExtendLastWPipe(AECStatusRecord* pRec);
|
|
|
|
virtual BOOL CreateElbowAndPipe(AECStatusRecord* pRec, const EFittingType &type = eElbow);
|
|
|
|
public:
|
|
|
|
AcDbObjectId CreateElbow( AcGeVector3d vtMaj,
|
|
AcGePoint3d ptMid,
|
|
AcGeVector3d vtMin,
|
|
WPipe::RoadParam* pparam,
|
|
BOOL bInsertBeforLast = FALSE);
|
|
|
|
AcDbObjectId CreateElbowEx(AcGeVector3d vtMaj
|
|
,AcGePoint3d ptMid
|
|
,AcGeVector3d vtMin
|
|
,WPipe::RoadParam* pparam1
|
|
,WPipe::RoadParam* pparam2
|
|
,BOOL bInsertBeforLast = FALSE);
|
|
|
|
BOOL CreatePipe(AcGePoint3d ptSta,AcGePoint3d ptEnd,WPipe::RoadParam* pPipeParam);
|
|
|
|
BOOL CreatePipe(AcDbArc* pArc,const AcGePoint3d& ptEnd);
|
|
|
|
BOOL MaybeAddTeeConnectToThis(AcGePoint3d& ptGe,AcGeVector3d& vtDir,AcDbObjectId id,int nPos);
|
|
|
|
BOOL MaybeAddCrossConnectToThis(AcGePoint3d ptFr,AcGePoint3d ptTo,AcDbObjectId id);
|
|
|
|
BOOL SplitWPipe(AcGePoint3d& ptMid,double dL,AecDb3dRoad* pWPipe,BOOL bEraseWhiletooShort = TRUE);
|
|
|
|
BOOL ModifyWPipe(AcGePoint3d& ptGe,AcDbObjectId id,int nPos);
|
|
|
|
BOOL AddTee(AecDb3dRoad* pWPipe,double dL,AcGePoint3d ptMid,double dB,AcGeVector3d vtMin);
|
|
|
|
BOOL AddCross(AcDbObjectId id1,AcGePoint3d& ptInt,AcDbObjectId idThis);
|
|
|
|
BOOL AddElbow(AcDbObjectId id1,AcGePoint3d& ptGe,AcDbObjectId idThis);
|
|
|
|
//变径弯头
|
|
BOOL AddElbowEx(AcDbObjectId id1,AcGePoint3d& ptGe,AcDbObjectId idThis);
|
|
|
|
BOOL ChangeElbowToTree(AecDb3dRoadFitting* pDbFit,AcGeVector3d vtMaj,AcGePoint3d ptGeM,AcGeVector3d vtMin,double dDn,AECStatusRecord* pCurRec);
|
|
|
|
BOOL ChangeTeeToCross(AecDb3dRoadFitting* pDbFit,AcGeVector3d& vtMaj,AcGeVector3d& vtMin,AECStatusRecord* pCurRec);
|
|
|
|
void ModifyPipeOfElbow(AcDbObjectId id,AcGePoint3d ptOld,AcGePoint3d ptNew);
|
|
|
|
double PixelToWcs(int nPixel);
|
|
|
|
BOOL MakeArc(WPipe::PipeDraw ePipe);
|
|
|
|
private:
|
|
|
|
void *operator new[](size_t nSize) { return 0; }
|
|
void operator delete[](void *p) {};
|
|
void *operator new[](size_t nSize, const char *file, int line) { return 0; }
|
|
|
|
protected:
|
|
|
|
BOOL m_bStopCommand;
|
|
AecAngleWatch* m_pAngleWatch; //导向罗盘
|
|
AecDbCurveBase* m_pCurPipeLine[2]; //当前的管子
|
|
AecDbRoadJig* m_pPipeJig; //当前拖动
|
|
WPipe::RoadParam* m_pPipeParam; //管子参数
|
|
CPtrList m_lstLastPipeParam; //管子参数历史记录
|
|
AcDbObjectId m_idStartDragFrom;
|
|
CArray<AecInterface> m_arHistoryIntfs; //记录历史的接口
|
|
|
|
public:
|
|
AecInterface m_intf0; //临时
|
|
AecInterface m_intf1; //临时
|
|
AecDbObjXDataMap m_xInitDataMap;
|
|
AcDbObjectId m_idTemp; //临时
|
|
};
|