⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mshowdoc.h

📁 数控译码
💻 H
字号:
// MshowDoc.h : interface of the CMshowDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MSHOWDOC_H__26691424_5B64_4174_92DE_97BAF38C0BCD__INCLUDED_)
#define AFX_MSHOWDOC_H__26691424_5B64_4174_92DE_97BAF38C0BCD__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "stdlib.h"

#define S_MAX  10000
#define F_MAX  10000

#define X_MAX  1000
#define X_MIN  -1000
#define Y_MAX  1000
#define Y_MIN  -1000
#define Z_MAX  1000
#define Z_MIN  -1000


#define DUIDAOX  400
#define DUIDAOY	 -100
#define DUIDAOZ  0

class CMshowDoc : public CDocument
{
protected: // create from serialization only
	CMshowDoc();
	DECLARE_DYNCREATE(CMshowDoc)

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMshowDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
	void List();

	void Init();
/*
	int z;
	int y;
	int x;*/


	
	struct GCODE
	{
//		unsigned char n;	
		unsigned char m;	bool mflag;
		unsigned char g;	bool gflag;
		
		int	f;	bool fflag;
		int	s;	bool sflag;
		
		int	x;
		int	y;
		int	z;	
		
		int i;
		int j;
		int k;
		//		int	r;
		
	};
/*
	struct GDATA
	{
		unsigned char g;	
		
		
		int	x;
		int	y;
		int	z;	
		
		int i;
		int j;
		int k;

	};*/

	

	GCODE GCode[50]; //for work 有刀补

	GCODE GCodeNow,GCodeOld;
	GCODE GSim[50];	//for simulate 无刀补

	int GCodeNum;
	



	//...................................................
	// for 刀补

	int G40Sign; // 0 无刀补		  1/2 左/右刀补建立   
				 // 3/4 左/右刀补进行 5/6 左/右 刀补 撤销 
//	GDATA GDataOld,GDataNow;
	bool G40Beg;

//	bool G40End;

	int VectXOld,VectYOld,VectXNow,VectYNow;

	float DistOld,DistNow;
	
	int xOld,yOld;

	int xLast,yLast;

//	int CenXNow,CenYNow;
	int CutCompType;
	int xs,ys;	
	
	

	// for刀补
	//...................................................


	int CodeNum;
	int CodeLine;

	int G91Sign;

	int NOld,NNow;
	unsigned char G00Sign;   //for G 模态下传

	int Tr;
	bool tflag;
	
	bool nflag;
	
	bool xflag;
	bool yflag;
	bool zflag;
	bool iflag;
	bool jflag;
	bool kflag;

	bool G92flag;
	bool G31flag;



	int G53x,G53y,G53z;

	int G31x,G31y,G31z;

	int datumx,datumy,datumz;
	int tx,ty,tz;
	int mchx,mchy,mchz;

	int xNow,yNow,zNow;

	char bf[40];
	


	int Read();


	int CheckSect(char * GSen);
	int CheckSen(char * GSen);
	int CutComp();
	int CompTypeGet();
	void VectGet();
	void CutCompCalcu();

	FILE *fp;
	CString FileName;
	
	virtual ~CMshowDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CMshowDoc)
	afx_msg void OnFileOpen();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MSHOWDOC_H__26691424_5B64_4174_92DE_97BAF38C0BCD__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -