|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
//文件 UmapAsc.h
|
|
|
//主要功能:
|
|
|
// 将UMAP的明码格式转换为双狐格式
|
|
|
//
|
|
|
//程序编写: 2008-11-27
|
|
|
//
|
|
|
//
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
#include "otherformat.h"
|
|
|
#include "projectionLib\projection.h"
|
|
|
#include "DrawOperator\exchangexyz.h"
|
|
|
#include "EmbellishBaseLib.h"
|
|
|
|
|
|
namespace NFormatReader
|
|
|
{
|
|
|
|
|
|
class CUmapAsc :
|
|
|
public CEmbellishBaseLib
|
|
|
{
|
|
|
public:
|
|
|
CUmapAsc(void);
|
|
|
virtual ~CUmapAsc(void);
|
|
|
|
|
|
BOOL ReadBlk(LPCTSTR lpszPathName);
|
|
|
BOOL ReadAsc(LPCTSTR lpszPathName);
|
|
|
|
|
|
protected:
|
|
|
int ReadFileHead(CFile& fr);
|
|
|
int ReadText(CFile& fr);
|
|
|
int ReadLine(CFile& fr);
|
|
|
int ReadArea(CFile& fr);
|
|
|
int ReadPoint(CFile& fr);
|
|
|
int ReadRectangle(CFile& fr);
|
|
|
int ReadCircle(CFile& fr);
|
|
|
int ReadAxis(CFile& fr);
|
|
|
int ReadContour(CFile& fr);
|
|
|
int ReadGrid(CFile& fr);
|
|
|
int ReadRectList(CFile& fr);
|
|
|
|
|
|
POSITION CreateCRect(CRect8& rect, double width, long curveColor, BOOL bFill, long bkcol);
|
|
|
|
|
|
int yflag = 0; //是否改变坐标Y的符号
|
|
|
BOOL m_bBlackRect = FALSE; //是否有黑方框符号
|
|
|
|
|
|
//临时变量
|
|
|
CStringArray sa;
|
|
|
long color = 0, frcol = 0, bkcol = 0;
|
|
|
int num = 0;
|
|
|
POSITION pos = nullptr;
|
|
|
double h = 0;
|
|
|
|
|
|
void InitTempVar(void);
|
|
|
|
|
|
void getRealPoint(double& x, double& y);
|
|
|
void getRealPoint(CRect8& rect);
|
|
|
|
|
|
CExchangeXYZ m_xyz;
|
|
|
CProjection *m_pProjection;
|
|
|
|
|
|
void ProjectionXY(CRect8& rect);
|
|
|
void ProjectionXY(double& x, double& y);
|
|
|
CString ToDF_Text(CString cmd, int& bScript);
|
|
|
|
|
|
virtual void SetCurrentLayer(CString strLayer);
|
|
|
|
|
|
//与uMap对应的符号库、修饰库,为了读取文件时从该库中按照层名搜索修饰
|
|
|
//曲线修饰:Layer:\CurveType\曲线类型索引号
|
|
|
//井位修饰:Layer:\PointType\井位类型号
|
|
|
void InitLib(void);
|
|
|
};
|
|
|
|
|
|
};
|