|
|
|
|
#pragma once
|
|
|
|
|
#include "GlobalDefine.h"
|
|
|
|
|
#include "DataPoint.h"
|
|
|
|
|
#include "SequentialPoint.h"
|
|
|
|
|
#include "SmartPtr.h"
|
|
|
|
|
#include "ObjFill.h"
|
|
|
|
|
#include "MarkParMgr.h"
|
|
|
|
|
#include "LabVecRang.h"
|
|
|
|
|
#include "ObjGeometryPorp.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CModule;
|
|
|
|
|
class CObjPline;
|
|
|
|
|
class CObjBase
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CObjBase(void);
|
|
|
|
|
CObjBase(CObjBase &rhs);
|
|
|
|
|
virtual void WriteWorkFileExt(vector<CLab> &LabVec);
|
|
|
|
|
virtual void ReadWorkFileExt(CLabVecRang &LabVecRang);
|
|
|
|
|
virtual ~CObjBase(void);
|
|
|
|
|
virtual CString GetStr(){return "objbase";};
|
|
|
|
|
virtual CObjBase * Clone(){return new CObjBase;};
|
|
|
|
|
virtual void Draw(CDC* pDC,CPen &Pen);
|
|
|
|
|
virtual void Draw(CDC* pDC);
|
|
|
|
|
virtual bool IsInRect(DbRect rect,bool bNeedAllIn){return m_PtContainer.IsInRect(rect,bNeedAllIn);};//obj <20>ĵ<EFBFBD><C4B5>Ƿ<EFBFBD><C7B7><EFBFBD>rect <20><>
|
|
|
|
|
virtual OBJ_TYPE GetType(){return _TYPE_BASE;};
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
virtual CMFCPropertyGridProperty *CreatSpecialGridProperty(CModule *pModule){return NULL;};
|
|
|
|
|
virtual void OnSpecialPropertyChanged(){};
|
|
|
|
|
virtual void SetSelected(bool bSelected);
|
|
|
|
|
virtual void Operate(SObjOperatePar &par);
|
|
|
|
|
virtual DbRect GetRect();
|
|
|
|
|
virtual Dbxy GetCenterPt(){return GetRect().GetCenterPt();};
|
|
|
|
|
virtual void BindingDlg(){};
|
|
|
|
|
virtual void GetPtData(vector<vector<Dbxy>> &vec);
|
|
|
|
|
virtual void GetFillData(vector<vector<Dbxy>> &vec);
|
|
|
|
|
virtual void CreatFillData(SFillPar FillPar);
|
|
|
|
|
virtual void GetLineInRect(DbRect &rect,vector<DbLine> &DataPtLineVec,bool bGetCatchNode = true);
|
|
|
|
|
virtual void CreatByDia(double Dia){};
|
|
|
|
|
public:
|
|
|
|
|
void WriteWorkFile(vector<CLab> &LabVec);
|
|
|
|
|
void ReadWorkFile(CLabVecRang &LabVecRang);
|
|
|
|
|
void AddDataPoint(CDataPoint pt);
|
|
|
|
|
void CopyPt(CObjBase &rhs);
|
|
|
|
|
void AddNodePt(CDataPoint pt);
|
|
|
|
|
bool Empty();
|
|
|
|
|
void DelAllPt();//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>
|
|
|
|
|
void DelLastDataPoint();//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ڵ<EFBFBD>
|
|
|
|
|
void DrawLastLine(CDC* pDC,CPen &Pen);
|
|
|
|
|
bool IsSelected();
|
|
|
|
|
bool HasNodeInRect(DbRect rect);
|
|
|
|
|
vector<CDataPoint>& GetPtContainer(){return m_PtContainer.GetPtContainer();};
|
|
|
|
|
void SetLastPoint(CDataPoint &pt);
|
|
|
|
|
Dbxy GetFirstPt();
|
|
|
|
|
Dbxy GetLastPt();
|
|
|
|
|
int GetNodePtIdx(Dbxy pt);
|
|
|
|
|
void DelNodePtByIdx(int idx);
|
|
|
|
|
void InsertNode(int idx,Dbxy pt);
|
|
|
|
|
void SetNodePtByIdx(int idx,Dbxy pt);
|
|
|
|
|
int GetPtCnt();
|
|
|
|
|
SFillPar GetFillPar(){return m_FillPar;};
|
|
|
|
|
bool IntersectWithLine(DbLine &line);
|
|
|
|
|
void SetLock(bool b){m_bLocked = b;};
|
|
|
|
|
void SetbDraw(bool b){m_bDraw = b;};
|
|
|
|
|
void CreatConcentricData(vector<double> &GapVec);
|
|
|
|
|
void SaveOldSelState(){m_OldSelState = m_bSelected;};
|
|
|
|
|
void RecoverOldSelState(){m_bSelected = m_OldSelState;};
|
|
|
|
|
bool IsbCollected(){return m_bCollected;};
|
|
|
|
|
void SetbCollected(bool b){m_bCollected = b;};
|
|
|
|
|
int GetPenNum(){return m_PenNum;};
|
|
|
|
|
void SetPenNum(int n){m_PenNum =n;};
|
|
|
|
|
void SetbOffsetAreaRect(bool b){m_bOffsetAreaRect = b;};
|
|
|
|
|
bool IsbOffsetAreaRect(){return m_bOffsetAreaRect;};
|
|
|
|
|
protected:
|
|
|
|
|
void OnCreat();
|
|
|
|
|
void DrawFill(CDC* pDC,CPen &Pen);
|
|
|
|
|
void OperateFill(SObjOperatePar &par);
|
|
|
|
|
void SaveSequentialPoint(ofstream *pfile);
|
|
|
|
|
void SaveObjType(ofstream *pfile,CString s);
|
|
|
|
|
private:
|
|
|
|
|
void WriteWorkFileBase(vector<CLab> &LabVec);
|
|
|
|
|
void ReadWorkFileBase(CLabVecRang &LabVecRang);
|
|
|
|
|
COLORREF GetColor();
|
|
|
|
|
vector<CDataPoint> GetConcentricData(double Gap);
|
|
|
|
|
void AddDataPointVec(vector<CDataPoint> &DataPointVec);
|
|
|
|
|
Dbxy GetSizeAdjust2();
|
|
|
|
|
protected:
|
|
|
|
|
CSequentialPoint m_PtContainer;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><DDB5><EFBFBD><EFBFBD><EFBFBD>(һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߶<EFBFBD>)
|
|
|
|
|
CSequentialPoint m_NodePtContainer;//<2F>洢<EFBFBD><E6B4A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD>ĵ<EFBFBD>(<28><><EFBFBD><EFBFBD>Բ<EFBFBD>ĵ<EFBFBD>)
|
|
|
|
|
|
|
|
|
|
vector<CSequentialPoint> m_FillDataVec;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
SFillPar m_FillPar;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
bool m_bSelected;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
bool m_OldSelState;//<2F>ɵ<EFBFBD>ѡ<EFBFBD><D1A1>״̬
|
|
|
|
|
bool m_bLocked;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
bool m_bDraw;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int m_PenNum;//<2F>ʺ<EFBFBD>
|
|
|
|
|
CObjGeometryPorp m_GeometryPorp;//<2F><><EFBFBD><EFBFBD>obj <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
bool m_bCollected;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ռ<EFBFBD>
|
|
|
|
|
|
|
|
|
|
Dbxy m_CutOffset;//<2F>и<EFBFBD>ƫ<EFBFBD><C6AB>
|
|
|
|
|
bool m_bOffsetAreaRect;//<2F>Ƿ<EFBFBD>Ϊƫ<CEAA>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
};
|
|
|
|
|
|