81 lines
1.5 KiB
C++
81 lines
1.5 KiB
C++
#include "stdafx.h"
|
|
#include "CADEnt.h"
|
|
#include "CADEntFilRoadAdapter.h"
|
|
|
|
void CCADEntFilRoadAdatper::Erase()
|
|
{
|
|
if (m_pEnt != NULL)
|
|
m_pEnt->Erase();
|
|
}
|
|
|
|
CLineCADEntFilRoadAdapter::CLineCADEntFilRoadAdapter(CLineCADEnt *pEnt)
|
|
: CCADEntFilRoadAdatper(pEnt), m_lineDump(pEnt->Line())
|
|
{
|
|
|
|
}
|
|
CLineCADEntFilRoadAdapter::~CLineCADEntFilRoadAdapter()
|
|
{
|
|
|
|
}
|
|
|
|
AcGeLineSeg2d CLineCADEntFilRoadAdapter::OriginSeg() const
|
|
{
|
|
return ((CLineCADEnt*)m_pEnt)->Line();
|
|
}
|
|
|
|
void CLineCADEntFilRoadAdapter::Reset(BOOL bStart, const AcGePoint2d &pt)
|
|
{
|
|
ResetLine(m_lineDump, bStart ? true : false, pt);
|
|
m_bRecreate = TRUE;
|
|
}
|
|
|
|
|
|
void CLineCADEntFilRoadAdapter::Redraw(EEntType eType)
|
|
{
|
|
if (!m_bRecreate)
|
|
return;
|
|
|
|
m_pEnt->Erase();
|
|
|
|
AcDbLine *pLine = GeLineToDbLineSys(m_lineDump);
|
|
SetLayer(pLine, eType);
|
|
AddToModelSpace(pLine);
|
|
m_pEnt = NULL;
|
|
}
|
|
|
|
|
|
CArcCADEntFilRoadAdapter::CArcCADEntFilRoadAdapter(CArcCADEnt *pEnt)
|
|
: CCADEntFilRoadAdatper(pEnt), m_arcDump(pEnt->Arc())
|
|
{
|
|
|
|
}
|
|
CArcCADEntFilRoadAdapter::~CArcCADEntFilRoadAdapter()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
AcGeCircArc2d CArcCADEntFilRoadAdapter::OriginSeg () const
|
|
{
|
|
return ((CArcCADEnt*)m_pEnt)->Arc();
|
|
}
|
|
|
|
|
|
void CArcCADEntFilRoadAdapter::Reset(BOOL bStart, const AcGePoint2d &pt)
|
|
{
|
|
ResetArc(m_arcDump, bStart ? true : false, pt);
|
|
m_bRecreate = TRUE;
|
|
}
|
|
|
|
void CArcCADEntFilRoadAdapter::Redraw(EEntType eType)
|
|
{
|
|
if (!m_bRecreate)
|
|
return;
|
|
|
|
m_pEnt->Erase();
|
|
|
|
AcDbArc *pArc = GeArcToDbSys(m_arcDump);
|
|
SetLayer(pArc, eType);
|
|
AddToModelSpace(pArc);
|
|
m_pEnt = NULL;
|
|
} |