You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
4.2 KiB
C

#pragma once
#include "LaiPuLaserView.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "LaiPuLaserDoc.h"
#include "Layer.h"
extern CLaiPuLaserView *GetCurViewPtr();
extern CLaiPuLaserDoc *GetCurDocPtr();
extern int IsTwoLineIntersect(Dbxy u1,Dbxy u2,Dbxy v1,Dbxy v2);
extern bool IsTwoRectIntersect(DbRect &rect1,DbRect &rect2);
extern bool IsLineInRect(Dbxy point1,Dbxy point2,DbRect rect);
extern bool IsPointInRect(Dbxy point,DbRect rect);
extern int Parallel(Dbxy u1,Dbxy u2,Dbxy v1,Dbxy v2);
extern double CalAngle(Dbxy CenterPt,Dbxy StartPt,Dbxy EndPt);
extern void AdjustRectByPoint(DbRect &rect,Dbxy pt);
extern void AdjustRectByRect(DbRect &rect1,DbRect rect2);
extern void AdjustRange(double &min,double &max,double val);
extern bool IsTwoDbEqual(double a,double b);//COORD_EPS <20><>Ĭ<EFBFBD>Ͼ<EFBFBD><CFBE><EFBFBD>
extern bool IsTwoDbEqual(double a,double b,double eps);
extern bool IsDbEqualZero(double num);
extern double CalDistance(Dbxy pt1,Dbxy pt2);
extern double AngleTo360(double Angle);
extern double _360ToAngle(double _360Angle);
extern CMainFrame* GetFrame();
extern int GetTwoNum(CString str,double &Val1,double &Val2);
extern double Cal360AngleByTwoPt(Dbxy pt1,Dbxy pt2);
extern Dbxy GetPoint2(Dbxy point1,double length,double angle);
extern Dbxy CalIntersection(Dbxy u1,Dbxy u2,Dbxy v1,Dbxy v2);
extern Dbxy IntersectionOfRectAndLine(Dbxy LinePt1,Dbxy LinePt2,DbRect rect);
extern Dbxy CenterPtOfTwoPoint(Dbxy Pt1,Dbxy Pt2);
extern int GetNumDigit(int num);
extern Dbxy RotatoPt(Dbxy pt,double Angle,Dbxy CenterPt);
extern DbRect GetDbPointVecRect(vector<Dbxy> &vec);
extern void SwapTwoPt(Dbxy &pt1,Dbxy &pt2);
extern bool IsShiftKeyDown();
extern bool CompareDbxyByX(Dbxy pt1,Dbxy pt2);
extern bool CompareDbxyByY(Dbxy pt1,Dbxy pt2);
extern int dot_online_in(Dbxy p,Dbxy l1,Dbxy l2);
extern bool IsDbxyZero(Dbxy pt);
extern int Byte2Int(BYTE x);
extern double RetainDecimalPlaces(double val,int n);
extern int GetRandVal(int rang);
extern bool IsLineAndRectIntersect(Dbxy pt,DbRect rect,double Ang,double Radius=500);
extern void WaitForThreadExit(CWinThread* pThread);
extern bool CheckBool(bool b,CString msg);
extern void CreatCircleData(CCirclePar CirclePar,vector<Dbxy> &Vec);
extern bool CheckRange(int n,int Start,int end);
extern DbRect GetDbPointVecRect(vector<vector<Dbxy>> &vec);
extern char Int2HexChar(int n);
extern bool GetArcDir(vector<Dbxy> &PtVec,Dbxy CenterPt);
extern bool IsTwoPtEqual(Dbxy pt1,Dbxy pt2,double eps);
extern void ExactDelay(unsigned int us);
extern int Ms2Us(int ms);
extern double _4DigitHex2Double(char *buf,int len);
extern int HexChar2Int(char c);
extern void IntTo2ByteHex(int n,char *buf);
extern int _2CharToHex(char charA,char charB);
extern double _3HexByteToDouble(unsigned int ByteH,unsigned int ByteM,unsigned int ByteL);
extern double _4HexByteToDouble(unsigned int HexByte1,unsigned int HexByte2,unsigned int HexByte3,unsigned int HexByte4);
extern int HexByte2Int(int Byte1,int Byte2);
extern int MM2UM(double mm);
extern double UM2MM(int um);
extern double D_UM2MM(double um);
extern void MouseLeftBtnClick(int CoordX,int CoordY,bool bDbClick=false);
extern CString IntTo4ByteHexStr(int n);
extern int TwoCharHexStringToInt(CString str);
extern CString IntTo6ByteHexStr(int n);
extern CString IntTo8ByteHexStr(int n);
extern bool CheckRangeDb(double n,double Start,double end);
extern CCirclePar CalCircleByThreePt(Dbxy Pt1,Dbxy Pt2,Dbxy Pt3);
extern void RedrawViewByThread();
extern int GetCurListIdx(CListCtrl &list);
extern bool CheckParRangeDb(CString ParName,double n,double Start,double end);
extern bool IsDlgItemStrChange(int ID,CString Str,vector<CDlgItemStr> &DlgItemStrVec);
extern bool SendMsgToWnd(CString &WndName,CString &WndMsg);
extern bool IsWndExist(CString WndName);
extern int TwoByte2Int(BYTE ByteLow,BYTE ByteHigh);
extern BYTE Int2Byte(int Val,bool bByteLow);
extern void ShowMsgInNewThread(CString s);
extern BOOL PictureWindows(const CString &strPicFile);
extern void InitYearComb(CString FilePath,CComboBox &ComboBox);
extern void InitMonthComb(CComboBox &ComboBox);
extern void ResetListCtrl(CListCtrl &List);
extern bool WaitDelayTime(int DelayTime);
extern void SendComLogToWnd(bool bSend,CString WndName,CString Msg);
extern char* CStringToLPCSTR(CString s);
extern CString CreatDataTimePath(CString DirPath);