|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
#include "ObjPoint.h"
|
|
|
|
|
#include "GlobalDrawMgr.h"
|
|
|
|
|
#include "DrawSimpleShape.h"
|
|
|
|
|
#include "WorkFileLable.h"
|
|
|
|
|
#include "WorkFileMgr.h"
|
|
|
|
|
|
|
|
|
|
CObjPoint::CObjPoint(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
CObjPoint::~CObjPoint(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
CString CObjPoint::GetStr()
|
|
|
|
|
{
|
|
|
|
|
CString str = "<EFBFBD><EFBFBD>";
|
|
|
|
|
return str;
|
|
|
|
|
}
|
|
|
|
|
#if 1
|
|
|
|
|
void CObjPoint::WriteWorkFileExt(vector<CLab> &LabVec)
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD>ݵ<EFBFBD>
|
|
|
|
|
Dbxy pt = GetRect().GetCenterPt();
|
|
|
|
|
LabVec.push_back(CLab(LAB_POINT_X,pt.x));
|
|
|
|
|
LabVec.push_back(CLab(LAB_POINT_Y,pt.y));
|
|
|
|
|
}
|
|
|
|
|
void CObjPoint::ReadWorkFileExt(CLabVecRang &LabVecRang)
|
|
|
|
|
{
|
|
|
|
|
CWorkFileMgr WorkFileMgr;
|
|
|
|
|
Dbxy pt;
|
|
|
|
|
{//X<><58><EFBFBD><EFBFBD>
|
|
|
|
|
CLab Lab = WorkFileMgr.FindLab(LabVecRang,LAB_POINT_X);
|
|
|
|
|
if(Lab.m_ValType != _TYPE_NULL)
|
|
|
|
|
{
|
|
|
|
|
pt.x = Lab.m_Double;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{//Y<><59><EFBFBD><EFBFBD>
|
|
|
|
|
CLab Lab = WorkFileMgr.FindLab(LabVecRang,LAB_POINT_Y);
|
|
|
|
|
if(Lab.m_ValType != _TYPE_NULL)
|
|
|
|
|
{
|
|
|
|
|
pt.y = Lab.m_Double;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
SetPt(pt);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
void CObjPoint::Draw(CDC* pDC,CPen &Pen)
|
|
|
|
|
{
|
|
|
|
|
DbRect Rect(GetRect().GetCenterPt(),gDraw->GetCatchNodeSize()*0.8);
|
|
|
|
|
DrawCrossX(pDC,Pen,Rect);
|
|
|
|
|
}
|
|
|
|
|
void CObjPoint::SetPt(Dbxy pt)
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD>ĵ<EFBFBD>
|
|
|
|
|
double gap = 0.0001;
|
|
|
|
|
CDataPoint DataPoint1(Dbxy(pt.x-gap,pt.y+gap));
|
|
|
|
|
DataPoint1.SetIsNode(true);
|
|
|
|
|
CDataPoint DataPoint2(Dbxy(pt.x+gap,pt.y-gap));
|
|
|
|
|
AddDataPoint(DataPoint1);
|
|
|
|
|
AddDataPoint(DataPoint2);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݾ<EFBFBD><DDBE><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>
|
|
|
|
|
void CObjPoint::GetPtData(vector<vector<Dbxy>> &vec)
|
|
|
|
|
{
|
|
|
|
|
Dbxy pt = GetRect().GetCenterPt();
|
|
|
|
|
pt.PenNum = m_PenNum;//<2F><><EFBFBD>ñʺ<C3B1>
|
|
|
|
|
vector<Dbxy> VecTmp;
|
|
|
|
|
VecTmp.push_back(pt);
|
|
|
|
|
vec.push_back(VecTmp);
|
|
|
|
|
}
|