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

📄 unitdesign.h

📁 在AUTOCAD环境下沿路线插入图块
💻 H
字号:
// UnitBase.h: interface for the UnitBase class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_UNITBASE_H__FE729CCA_DE5F_427B_97A6_C45E1FFAA9A0__INCLUDED_)
#define AFX_UNITBASE_H__FE729CCA_DE5F_427B_97A6_C45E1FFAA9A0__INCLUDED_

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

#define		LEFT		-1
#define		RIGHT		1
#include "compublic.h"
//////////////////////////////////////////////////
//   积木法单元基类
//////////////////////////////////////////////////
class UnitBase  
{
public:
	UnitBase();

	double ConvertFWJ(double a);
	double ConvertFWJ(ads_point pt1, ads_point pt2, ads_point pt3, ads_point pt4);
	double ConvertPolar(double a);
	BOOL GetXY(double l, double a, int n, double &x, double &y);
	double JieCheng(double a);
	virtual BOOL GetEndInf(double &x, double &y, double &rAzimuth);
	virtual	BOOL GetLenInf(double len, double &x, double &y, double &rAzimuth);
	virtual BOOL Draw(BOOL bDraw);
	virtual BOOL SetStartInf(double x, double y, double rAzimuth);
	virtual ~UnitBase();

public:
	double m_rLen;
	
protected:
	INT m_iTurn;
	double m_rStartx, m_rStarty, m_rStartAzimuth;
	double m_rEndx, m_rEndy, m_rEndAzimuth;
	double m_rStartPolar, m_rEndPolar;

};

//////////////////////////////////////////////////
//   积木法线单元
//////////////////////////////////////////////////
class LineUnit : public UnitBase
{
public:
	LineUnit();
	~LineUnit();
	BOOL Draw(BOOL bDraw);
	BOOL SetStartInf(double x, double y, double rAzimuth, double rlen);
	BOOL GetEndInf(double &x, double &y, double &rAzimuth);
	BOOL GetLenInf(double len, double &x, double &y, double &rAzimuth);

};

//////////////////////////////////////////////////
//   积木法圆曲线单元
//////////////////////////////////////////////////
class CircleUnit : public UnitBase
{

public:
	CircleUnit();
	~CircleUnit();
	BOOL Draw(BOOL bDraw);
	BOOL SetStartInf(double x, double y, double rAzimuth, int iTurn, double len, double rR);
	BOOL GetEndInf(double &x, double &y, double &rAzimuth);
	BOOL GetLenInf(double len, double &x, double &y, double &rAzimuth);
protected:
	double m_rR;

};

//////////////////////////////////////////////////
//   积木法回旋线单元
//////////////////////////////////////////////////
class AllayUnit : public UnitBase
{
public:
	AllayUnit();
	~AllayUnit();
	BOOL Draw(BOOL bDraw);
	BOOL SetStartInf(double x, double y, double rAzimuth, 
					int iTurn, double rA, double rstartR, double rendR);
	BOOL GetEndInf(double &x, double &y, double &rAzimuth);
	double GetUnitLen();
	BOOL GetLenInf(double len, double &x, double &y, double &rAzimuth);
	
private:
	GetFullAInfo(double rstartx, double rstarty, double rstartAzimuth, int iTurn,
						double l, double &xx, double &yy, double &rcalAzimuth);
	GetDeficAInfo(double rstartx, double rstarty, double rstartAzimuth, int iTurn,
						double l, double &xx, double &yy, double &rcalAzimuth);

	double m_rA, m_rStartR, m_rEndR;
	double m_rEndx1, m_rEndy1, m_rEndAzimuth1;
	double m_rTepStartx, m_rTepStarty, m_rTepStartAzimuth, m_rTepLen;
	BOOL m_bFull, m_iBtoS;
	/*m_bFull判断是否是完整回旋线,m_iBtoS为1时:由小到大,为-1时:由大到小*/
};



#endif // !defined(AFX_UNITBASE_H__FE729CCA_DE5F_427B_97A6_C45E1FFAA9A0__INCLUDED_)

⌨️ 快捷键说明

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