|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
#include "GlobalFunction.h"
|
|
|
|
|
#include "PropertiesWnd.h"
|
|
|
|
|
#include "BitOperation.h"
|
|
|
|
|
#include "GlobalDrawMgr.h"
|
|
|
|
|
#include<math.h>
|
|
|
|
|
#include "MsgBox.h"
|
|
|
|
|
|
|
|
|
|
#if 1
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>
|
|
|
|
|
CLaiPuLaserView *GetCurViewPtr()
|
|
|
|
|
{
|
|
|
|
|
CMainFrame *pFrame = (CMainFrame*)AfxGetApp()->GetMainWnd();
|
|
|
|
|
CChildFrame *pChild = (CChildFrame*)pFrame->GetActiveFrame();
|
|
|
|
|
CLaiPuLaserView *pView = (CLaiPuLaserView*)pChild->GetActiveView();
|
|
|
|
|
return pView;
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1>ǰ<EFBFBD>ļ<EFBFBD>ָ<EFBFBD><D6B8>
|
|
|
|
|
CLaiPuLaserDoc *GetCurDocPtr()
|
|
|
|
|
{
|
|
|
|
|
CLaiPuLaserView *pView = GetCurViewPtr();
|
|
|
|
|
CLaiPuLaserDoc *pDoc = pView->GetDocument();
|
|
|
|
|
return pDoc;
|
|
|
|
|
}
|
|
|
|
|
CMainFrame* GetFrame()
|
|
|
|
|
{
|
|
|
|
|
CMainFrame* pFrame = (CMainFrame*)AfxGetApp()->GetMainWnd();
|
|
|
|
|
return pFrame;
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡlayer <20><>ʵ<EFBFBD><CAB5>
|
|
|
|
|
CLayer &GetLayerInstance()
|
|
|
|
|
{
|
|
|
|
|
return CLayer::Instance();
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#if 1//<2F><><EFBFBD>η<EFBFBD>Χ<EFBFBD><CEA7><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>
|
|
|
|
|
//<2F><><EFBFBD>Ƿ<EFBFBD><C7B7>ھ<EFBFBD><DABE><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
bool IsPointInRect(Dbxy point,DbRect rect)
|
|
|
|
|
{
|
|
|
|
|
if(point.x>= rect.L && point.x<=rect.R && point.y<= rect.T && point.y>=rect.B)
|
|
|
|
|
return true;
|
|
|
|
|
else
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>ཻ
|
|
|
|
|
bool IsTwoRectIntersect(DbRect &rect1,DbRect &rect2)
|
|
|
|
|
{
|
|
|
|
|
if((((rect2.L>=rect1.L)&&(rect2.L<=rect1.R)) || ((rect2.R>=rect1.L)&&(rect2.R<=rect1.R))) &&
|
|
|
|
|
(((rect2.T>=rect1.B)&&(rect2.T<=rect1.T)) || ((rect2.B>=rect1.B)&&(rect2.B<=rect1.T))))
|
|
|
|
|
return true;
|
|
|
|
|
else
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
//<2F>жϵ<D0B6><CFB5>γɵ<CEB3>ֱ<EFBFBD><D6B1><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ܺ<EFBFBD>rect <20>ཻ
|
|
|
|
|
//Radius <20><>ֱ<EFBFBD>ߵ<EFBFBD>һ<EFBFBD>볤<EFBFBD><EBB3A4>mm
|
|
|
|
|
bool IsLineAndRectIntersect(Dbxy pt,DbRect rect,double Ang,double Radius)
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ֱ<EFBFBD>ߵĶ˵<C4B6>
|
|
|
|
|
Dbxy StartPt(Radius*(-1),pt.y);
|
|
|
|
|
Dbxy EndPt(Radius,pt.y);
|
|
|
|
|
StartPt = RotatoPt(StartPt,Ang,pt);
|
|
|
|
|
EndPt = RotatoPt(EndPt,Ang,pt);
|
|
|
|
|
|
|
|
|
|
return IsLineInRect(StartPt,EndPt,rect);
|
|
|
|
|
}
|
|
|
|
|
//<2F>ж<EFBFBD><D0B6>߶<EFBFBD><DFB6>Ƿ<EFBFBD><C7B7>ھ<EFBFBD><DABE><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
bool IsLineInRect(Dbxy point1,Dbxy point2,DbRect rect)
|
|
|
|
|
{
|
|
|
|
|
if(IsTwoLineIntersect(point1,point2,Dbxy(rect.R,rect.T),Dbxy(rect.L,rect.B)))
|
|
|
|
|
return true;
|
|
|
|
|
if(IsTwoLineIntersect(point1,point2,Dbxy(rect.L,rect.T),Dbxy(rect.R,rect.B)))
|
|
|
|
|
return true;
|
|
|
|
|
if(IsPointInRect(point1,rect) || IsPointInRect(point2,rect))
|
|
|
|
|
return true;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
void AdjustRange(double &min,double &max,double val)
|
|
|
|
|
{
|
|
|
|
|
if(min>max)//<2F><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
min = max = val;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if(min > val)
|
|
|
|
|
{
|
|
|
|
|
min = val;
|
|
|
|
|
}
|
|
|
|
|
if(max < val)
|
|
|
|
|
{
|
|
|
|
|
max = val;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD>ݵ<EFBFBD><DDB5>ı߽緶Χ
|
|
|
|
|
DbRect GetDbPointVecRect(vector<Dbxy> &vec)
|
|
|
|
|
{
|
|
|
|
|
DbRect rect;
|
|
|
|
|
vector<Dbxy>::iterator iter = vec.begin();
|
|
|
|
|
vector<Dbxy>::iterator iter_end = vec.end();
|
|
|
|
|
for(;iter!=iter_end;iter++)
|
|
|
|
|
{
|
|
|
|
|
AdjustRectByPoint(rect,(*iter));
|
|
|
|
|
}
|
|
|
|
|
return rect;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>η<EFBFBD>Χ
|
|
|
|
|
void AdjustRectByPoint(DbRect &rect,Dbxy pt)
|
|
|
|
|
{
|
|
|
|
|
AdjustRange(rect.L,rect.R,pt.x);
|
|
|
|
|
AdjustRange(rect.B,rect.T,pt.y);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>η<EFBFBD>Χ
|
|
|
|
|
void AdjustRectByRect(DbRect &rect1,DbRect rect2)
|
|
|
|
|
{
|
|
|
|
|
Dbxy pt1(rect2.L,rect2.T);
|
|
|
|
|
Dbxy pt2(rect2.R,rect2.B);
|
|
|
|
|
AdjustRectByPoint(rect1,pt1);
|
|
|
|
|
AdjustRectByPoint(rect1,pt2);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#if 1//<2F>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߶<EFBFBD><DFB6>Ƿ<EFBFBD><C7B7>ཻ
|
|
|
|
|
#define EPS 1e-8
|
|
|
|
|
#define ZERO(x) (((x)>0?(x):-(x))<EPS) //<2F>ж<EFBFBD>double <20>Ƿ<EFBFBD>Ϊ0
|
|
|
|
|
//<2F><><EFBFBD>㽻<EFBFBD><E3BDBB><EFBFBD>˻<EFBFBD>(P1-P0)x(P2-P0)
|
|
|
|
|
double xmult(Dbxy p1,Dbxy p2,Dbxy p0)
|
|
|
|
|
{
|
|
|
|
|
return (p1.x-p0.x)*(p2.y-p0.y)-(p2.x-p0.x)*(p1.y-p0.y);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F>е<EFBFBD><D0B5>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>߶<EFBFBD><DFB6><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>
|
|
|
|
|
int dot_online_in(Dbxy p,Dbxy l1,Dbxy l2)
|
|
|
|
|
{
|
|
|
|
|
return ZERO(xmult(p,l1,l2))&&(l1.x-p.x)*(l2.x-p.x)<EPS&&(l1.y-p.y)*(l2.y-p.y)<EPS;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߶<EFBFBD>ͬ<EFBFBD><CDAC>,<2C><><EFBFBD><EFBFBD><EFBFBD>߶<EFBFBD><DFB6>Ϸ<EFBFBD><CFB7><EFBFBD>0
|
|
|
|
|
int same_side(Dbxy p1,Dbxy p2,Dbxy l1,Dbxy l2)
|
|
|
|
|
{
|
|
|
|
|
return xmult(l1,p1,l2)*xmult(l1,p2,l2)>EPS;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1>ƽ<EFBFBD><C6BD>
|
|
|
|
|
int Parallel(Dbxy u1,Dbxy u2,Dbxy v1,Dbxy v2)
|
|
|
|
|
{
|
|
|
|
|
return ZERO((u1.x-u2.x)*(v1.y-v2.y)-(v1.x-v2.x)*(u1.y-u2.y));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>㹲<EFBFBD><E3B9B2>
|
|
|
|
|
int dots_inline(Dbxy p1,Dbxy p2,Dbxy p3)
|
|
|
|
|
{
|
|
|
|
|
return ZERO(xmult(p1,p2,p3));
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>߶<EFBFBD><DFB6>Ƿ<EFBFBD><C7B7>ཻ
|
|
|
|
|
int IsTwoLineIntersect(Dbxy u1,Dbxy u2,Dbxy v1,Dbxy v2)
|
|
|
|
|
{
|
|
|
|
|
if (!dots_inline(u1,u2,v1)||!dots_inline(u1,u2,v2))
|
|
|
|
|
return !same_side(u1,u2,v1,v2)&&!same_side(v1,v2,u1,u2);
|
|
|
|
|
return dot_online_in(u1,v1,v2)||dot_online_in(u2,v1,v2)||dot_online_in(v1,u1,u2)||dot_online_in(v2,u1,u2);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߶εĽ<CEB5><C4BD><EFBFBD>
|
|
|
|
|
Dbxy CalIntersection(Dbxy u1,Dbxy u2,Dbxy v1,Dbxy v2)
|
|
|
|
|
{
|
|
|
|
|
Dbxy ret=u1;
|
|
|
|
|
double t=((u1.x-v1.x)*(v1.y-v2.y)-(u1.y-v1.y)*(v1.x-v2.x))/((u1.x-u2.x)*(v1.y-v2.y)-(u1.y-u2.y)*(v1.x-v2.x));
|
|
|
|
|
ret.x+=(u2.x-u1.x)*t;
|
|
|
|
|
ret.y+=(u2.y-u1.y)*t;
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
void IntersectionOfRectAndLineExt(bool &flg,Dbxy &pt1,Dbxy &pt2,Dbxy u1,Dbxy u2,Dbxy v1,Dbxy v2)
|
|
|
|
|
{
|
|
|
|
|
if(IsTwoLineIntersect(u1,u2,v1,v2))
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ཻ<EFBFBD><E0BDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
Dbxy pt = CalIntersection(u1,u2,v1,v2);
|
|
|
|
|
if(flg)
|
|
|
|
|
{
|
|
|
|
|
pt1 = pt;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pt2 = pt;
|
|
|
|
|
}
|
|
|
|
|
flg =!flg;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><CEBA>߶εĽ<CEB5><C4BD><EFBFBD>
|
|
|
|
|
Dbxy IntersectionOfRectAndLine(Dbxy LinePt1,Dbxy LinePt2,DbRect rect)
|
|
|
|
|
{
|
|
|
|
|
bool flg = false;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1>浽<EFBFBD><E6B5BD>1 <20><><EFBFBD>ǵ<EFBFBD>2
|
|
|
|
|
Dbxy pt1,pt2;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߶κ<DFB6>rect <20><><EFBFBD><EFBFBD><EFBFBD>ߵĽ<DFB5><C4BD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
Dbxy TmpPt1(rect.L,rect.T);
|
|
|
|
|
Dbxy TmpPt2(rect.L,rect.B);
|
|
|
|
|
IntersectionOfRectAndLineExt(flg,pt1,pt2,LinePt1,LinePt2,TmpPt1,TmpPt2);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
Dbxy TmpPt1(rect.L,rect.B);
|
|
|
|
|
Dbxy TmpPt2(rect.R,rect.B);
|
|
|
|
|
IntersectionOfRectAndLineExt(flg,pt1,pt2,LinePt1,LinePt2,TmpPt1,TmpPt2);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
Dbxy TmpPt1(rect.R,rect.B);
|
|
|
|
|
Dbxy TmpPt2(rect.R,rect.T);
|
|
|
|
|
IntersectionOfRectAndLineExt(flg,pt1,pt2,LinePt1,LinePt2,TmpPt1,TmpPt2);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
Dbxy TmpPt1(rect.R,rect.T);
|
|
|
|
|
Dbxy TmpPt2(rect.L,rect.T);
|
|
|
|
|
IntersectionOfRectAndLineExt(flg,pt1,pt2,LinePt1,LinePt2,TmpPt1,TmpPt2);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><D0BC><EFBFBD>
|
|
|
|
|
return CenterPtOfTwoPoint(pt1,pt2);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><D0BC>ĵ<EFBFBD>
|
|
|
|
|
Dbxy CenterPtOfTwoPoint(Dbxy Pt1,Dbxy Pt2)
|
|
|
|
|
{
|
|
|
|
|
Dbxy ret;
|
|
|
|
|
ret.x = (Pt1.x+Pt2.x)/2;
|
|
|
|
|
ret.y = (Pt1.y+Pt2.y)/2;
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
#if 1//<2F><><EFBFBD>㺯<EFBFBD><E3BAAF>
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>н<EFBFBD>ת<EFBFBD><D7AA>Ϊ360 <20><>
|
|
|
|
|
double AngleTo360(double Angle)
|
|
|
|
|
{
|
|
|
|
|
double _360Angle;
|
|
|
|
|
_360Angle = - Angle*180/PI;
|
|
|
|
|
//У<><D0A3>Ϊ<EFBFBD><CEAA>ֵ
|
|
|
|
|
if(_360Angle < 0)
|
|
|
|
|
{
|
|
|
|
|
_360Angle += 360;
|
|
|
|
|
}
|
|
|
|
|
if(_360Angle > 180)
|
|
|
|
|
{
|
|
|
|
|
_360Angle -= 360;
|
|
|
|
|
}
|
|
|
|
|
return _360Angle;
|
|
|
|
|
}
|
|
|
|
|
//360 <20><>ת<EFBFBD><D7AA>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>(360<36><30><EFBFBD><EFBFBD>=2<>л<EFBFBD><D0BB><EFBFBD>)
|
|
|
|
|
double _360ToAngle(double _360Angle)
|
|
|
|
|
{
|
|
|
|
|
double Angle;
|
|
|
|
|
Angle = (_360Angle*PI)/180;
|
|
|
|
|
return Angle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD>㷴<EFBFBD><E3B7B4><EFBFBD>нǶ<D0BD>StartPt: <20><>ת<EFBFBD><D7AA>ʼ<EFBFBD><CABC>EndPt: <20><>ת<EFBFBD><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>CenterPt: <20><>ת<EFBFBD><D7AA><EFBFBD>ĵ<EFBFBD>
|
|
|
|
|
double CalAngle(Dbxy CenterPt,Dbxy StartPt,Dbxy EndPt)
|
|
|
|
|
{
|
|
|
|
|
double x2 = CenterPt.x;
|
|
|
|
|
double y2 = CenterPt.y;
|
|
|
|
|
double x1 = StartPt.x;
|
|
|
|
|
double y1 = StartPt.y;
|
|
|
|
|
double x3 = EndPt.x;
|
|
|
|
|
double y3 = EndPt.y;
|
|
|
|
|
|
|
|
|
|
double flRlt,flAtanA,flAtanB;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ת
|
|
|
|
|
if(x1==x2)
|
|
|
|
|
{
|
|
|
|
|
if(y1>y2)
|
|
|
|
|
{
|
|
|
|
|
flAtanA=PI/2;
|
|
|
|
|
}else if(y1<y2)
|
|
|
|
|
{
|
|
|
|
|
flAtanA=-PI/2;
|
|
|
|
|
}else
|
|
|
|
|
{
|
|
|
|
|
flAtanA=0;
|
|
|
|
|
}
|
|
|
|
|
flAtanB = 0;
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ת<EFBFBD><D7AA><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
else if(x3==x2)
|
|
|
|
|
{
|
|
|
|
|
if(y3>y2)
|
|
|
|
|
{
|
|
|
|
|
flAtanB=PI/2;
|
|
|
|
|
}else if(y3<y2)
|
|
|
|
|
{
|
|
|
|
|
flAtanB=-PI/2;
|
|
|
|
|
}else
|
|
|
|
|
{
|
|
|
|
|
flAtanB=0;
|
|
|
|
|
}
|
|
|
|
|
flAtanA=0;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD><D0BA><EFBFBD>atan <20><><EFBFBD>Խ<EFBFBD>б<EFBFBD><D0B1>ת<EFBFBD><D7AA>Ϊ<EFBFBD>Ƕ<EFBFBD>
|
|
|
|
|
flAtanA=atan((y1-y2)/(x1-x2));
|
|
|
|
|
flAtanB=atan((y3-y2)/(x3-x2));
|
|
|
|
|
if(y1-y2>0&&x1-x2<0){
|
|
|
|
|
flAtanA+=PI;
|
|
|
|
|
}
|
|
|
|
|
if(y1-y2<=0&&x1-x2<0){
|
|
|
|
|
flAtanA+=PI;
|
|
|
|
|
}
|
|
|
|
|
if(y3-y2>0&&x3-x2<0){
|
|
|
|
|
flAtanB+=PI;
|
|
|
|
|
}
|
|
|
|
|
if(y3-y2<=0&&x3-x2<0){
|
|
|
|
|
flAtanB+=PI;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
flRlt=flAtanB-flAtanA;
|
|
|
|
|
return flRlt*(-1);
|
|
|
|
|
}
|
|
|
|
|
//ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>360 <20>Ƚ<EFBFBD>
|
|
|
|
|
double Cal360AngleByTwoPt(Dbxy pt1,Dbxy pt2)
|
|
|
|
|
{
|
|
|
|
|
Dbxy StartPt;
|
|
|
|
|
StartPt.x = CalDistance(pt1,pt2);
|
|
|
|
|
StartPt.y = pt1.y;
|
|
|
|
|
//<2F>ȼ<EFBFBD><C8BC>㷴<EFBFBD><E3B7B4><EFBFBD>н<EFBFBD>
|
|
|
|
|
double angle = CalAngle(pt1,StartPt,pt2);
|
|
|
|
|
return AngleTo360(angle);
|
|
|
|
|
}
|
|
|
|
|
//<2F><>תһ<D7AA><D2BB><EFBFBD>㣬<EFBFBD><E3A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA><EFBFBD>ĵ<EFBFBD>
|
|
|
|
|
//Angle <20>ǻ<EFBFBD><C7BB>Ƚǣ<C8BD>CenterPt <20><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA><EFBFBD>ĵ<EFBFBD>
|
|
|
|
|
Dbxy RotatoPt(Dbxy pt,double Angle,Dbxy CenterPt)
|
|
|
|
|
{
|
|
|
|
|
Dbxy ret;
|
|
|
|
|
//<2F><>ת-----------------------------------------------
|
|
|
|
|
ret.x = ((pt.x-CenterPt.x)*cos(Angle)-(pt.y-CenterPt.y)*sin(Angle))+CenterPt.x;
|
|
|
|
|
ret.y = ((pt.y-CenterPt.y)*cos(Angle)+(pt.x-CenterPt.x)*sin(Angle))+CenterPt.y;
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD>ݵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>,<2C>߶εij<CEB5><C4B3><EFBFBD>,<2C>Ƕȼ<C7B6><C8BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߶εڶ<CEB5><DAB6><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//angle <20>ǻ<EFBFBD><C7BB>Ƚ<EFBFBD>
|
|
|
|
|
Dbxy GetPoint2(Dbxy point1,double length,double angle)
|
|
|
|
|
{
|
|
|
|
|
Dbxy point2;
|
|
|
|
|
point2.x = point1.x+length*cos(angle);
|
|
|
|
|
point2.y = point1.y+length*sin(angle);
|
|
|
|
|
return point2;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#if 1
|
|
|
|
|
//<2F>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD>double <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
bool IsTwoDbEqual(double a,double b)
|
|
|
|
|
{
|
|
|
|
|
if((abs(a-b))<=COORD_EPS)
|
|
|
|
|
return true;
|
|
|
|
|
else
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IsTwoDbPtEqual(Dbxy pt1,Dbxy pt2,double eps)
|
|
|
|
|
{
|
|
|
|
|
if(((abs(pt1.x-pt2.x))<=eps)&&((abs(pt1.y-pt2.y))<=eps))
|
|
|
|
|
return true;
|
|
|
|
|
else
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool IsTwoDbEqual(double a,double b,double eps)
|
|
|
|
|
{
|
|
|
|
|
if((abs(a-b))<=eps)
|
|
|
|
|
return true;
|
|
|
|
|
else
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool IsDbEqualZero(double num)
|
|
|
|
|
{
|
|
|
|
|
if(num<0)
|
|
|
|
|
{
|
|
|
|
|
num *= -1;
|
|
|
|
|
}
|
|
|
|
|
if(num <= COORD_EPS)
|
|
|
|
|
return true;
|
|
|
|
|
else
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool IsDbxyZero(Dbxy pt)
|
|
|
|
|
{
|
|
|
|
|
return IsDbEqualZero(pt.x) && IsDbEqualZero(pt.y);
|
|
|
|
|
}
|
|
|
|
|
void SwapTwoPt(Dbxy &pt1,Dbxy &pt2)
|
|
|
|
|
{
|
|
|
|
|
Dbxy pt = pt1;
|
|
|
|
|
pt1 = pt2;
|
|
|
|
|
pt2 = pt;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><D6AE><EFBFBD>ľ<EFBFBD><C4BE><EFBFBD>(<28><><EFBFBD>ɶ<EFBFBD><C9B6><EFBFBD>:Z^2 = X^2 + Y^2)
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ֵ<EFBFBD>϶<EFBFBD><CFB6>Ǵ<EFBFBD><C7B4><EFBFBD>0 <20><>
|
|
|
|
|
double CalDistance(Dbxy pt1,Dbxy pt2)
|
|
|
|
|
{
|
|
|
|
|
double flRlt;
|
|
|
|
|
flRlt=(pt1.x-pt2.x)*(pt1.x-pt2.x)+(pt1.y-pt2.y)*(pt1.y-pt2.y);
|
|
|
|
|
flRlt=sqrt(flRlt);
|
|
|
|
|
return flRlt;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>num <20>м<EFBFBD>λ
|
|
|
|
|
int GetNumDigit(int num)
|
|
|
|
|
{
|
|
|
|
|
int cnt = 0;
|
|
|
|
|
while(num)
|
|
|
|
|
{
|
|
|
|
|
num /=10;
|
|
|
|
|
cnt++;
|
|
|
|
|
}
|
|
|
|
|
if(cnt==0)//<2F><><EFBFBD><EFBFBD>һλ
|
|
|
|
|
cnt = 1;
|
|
|
|
|
return cnt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
#if 1
|
|
|
|
|
bool CheckStringIsNum(CString str)
|
|
|
|
|
{
|
|
|
|
|
CString strSet1 = "qwertyuiopasdfghjklzxcvbnm";
|
|
|
|
|
CString strSet2 = "QWERTYUIOPASDFGHJKLZXCVBNM";
|
|
|
|
|
CString strSet3 = "!@#$%^&*()_+=[]\\{}|;':\",/<>?";
|
|
|
|
|
CString strSet = strSet1+strSet2+strSet3;
|
|
|
|
|
if(str.FindOneOf(strSet)==-1)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
//<2F><>str <20><><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ֵ(<28><><EFBFBD><EFBFBD>123.456,789.123)
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1>Val1 <20><><EFBFBD><EFBFBD>1,ͬʱ<CDAC><CAB1>ȡ<EFBFBD><C8A1>Val1,Val2 <20><><EFBFBD><EFBFBD>2
|
|
|
|
|
//һ<><D2BB>û<EFBFBD><C3BB>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0
|
|
|
|
|
int GetTwoNum(CString str,double &Val1,double &Val2)
|
|
|
|
|
{
|
|
|
|
|
int CommaPos = 0;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>ж<EFBFBD><D0B6><EFBFBD>
|
|
|
|
|
CommaPos = str.Find(',',0);
|
|
|
|
|
if(CommaPos!=-1)
|
|
|
|
|
{
|
|
|
|
|
CString str1(str,CommaPos);
|
|
|
|
|
str.Delete(0,CommaPos+1);
|
|
|
|
|
CString str2(str);
|
|
|
|
|
if(CheckStringIsNum(str1)&&CheckStringIsNum(str2))
|
|
|
|
|
{
|
|
|
|
|
Val1 = atof(str1);
|
|
|
|
|
Val2 = atof(str2);
|
|
|
|
|
return 2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if(CheckStringIsNum(str))
|
|
|
|
|
{
|
|
|
|
|
Val1 = atof(str);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#if 1//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//ͨ<><CDA8>x <20><><EFBFBD><EFBFBD>
|
|
|
|
|
bool CompareDbxyByX(Dbxy pt1,Dbxy pt2)
|
|
|
|
|
{
|
|
|
|
|
return pt1.x>pt2.x;
|
|
|
|
|
}
|
|
|
|
|
bool CompareDbxyByY(Dbxy pt1,Dbxy pt2)
|
|
|
|
|
{
|
|
|
|
|
return pt1.y>pt2.y;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#if 1
|
|
|
|
|
//<2F>ж<EFBFBD>shift <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
bool IsShiftKeyDown()
|
|
|
|
|
{
|
|
|
|
|
if(GetAsyncKeyState(VK_SHIFT) & 0x8000)
|
|
|
|
|
return true;
|
|
|
|
|
else
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
int Byte2Int(BYTE x)
|
|
|
|
|
{
|
|
|
|
|
BYTE c = 0x80;
|
|
|
|
|
int a = (IsBitOn(x,7))?c:0;
|
|
|
|
|
x = SetBitOff(x,7);
|
|
|
|
|
return x+a;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>val С<><D0A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>n λ
|
|
|
|
|
double RetainDecimalPlaces(double val,int n)
|
|
|
|
|
{
|
|
|
|
|
for(int i=0;i<n;i++)
|
|
|
|
|
{
|
|
|
|
|
val *= 10;
|
|
|
|
|
}
|
|
|
|
|
int t = (int)val;
|
|
|
|
|
val = (double)t;
|
|
|
|
|
for(int i=0;i<n;i++)
|
|
|
|
|
{
|
|
|
|
|
val /= 10;
|
|
|
|
|
}
|
|
|
|
|
return val;
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡ0~ rang <20><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
int GetRandVal(int rang)
|
|
|
|
|
{
|
|
|
|
|
int ret = rand()%rang;
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
//<2F>ȴ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD>߳̽<DFB3><CCBD><EFBFBD>
|
|
|
|
|
void WaitForThreadExit(CWinThread* pThread)
|
|
|
|
|
{
|
|
|
|
|
if(pThread == NULL)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
DWORD dRet=-2;
|
|
|
|
|
MSG msg;
|
|
|
|
|
while (!gExitApp)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
dRet=MsgWaitForMultipleObjects(1,&pThread->m_hThread,FALSE,INFINITE,QS_ALLINPUT);
|
|
|
|
|
if (dRet == WAIT_OBJECT_0)//<2F>ȴ<EFBFBD><C8B4><EFBFBD><EFBFBD>߳̽<DFB3><CCBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
else if (dRet == WAIT_OBJECT_0+1)//<2F><><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>,ת<><D7AA>
|
|
|
|
|
{
|
|
|
|
|
while (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
|
|
|
|
|
{
|
|
|
|
|
TranslateMessage(&msg);
|
|
|
|
|
DispatchMessage(&msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>bool <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>b Ϊ<><CEAA><EFBFBD><EFBFBD>ֵ,<2C><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>
|
|
|
|
|
bool CheckBool(bool b,CString msg)
|
|
|
|
|
{
|
|
|
|
|
if(!b)
|
|
|
|
|
{
|
|
|
|
|
CMsgBox MsgBox;
|
|
|
|
|
MsgBox.Show(msg);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>Բ<EFBFBD><D4B2><EFBFBD>ݵ<EFBFBD>Vec
|
|
|
|
|
void CreatCircleData(CCirclePar CirclePar,vector<Dbxy> &Vec)
|
|
|
|
|
{
|
|
|
|
|
Vec.clear();
|
|
|
|
|
Dbxy CenterPt = CirclePar.CenterPt;
|
|
|
|
|
double Radius = CirclePar.Radius;
|
|
|
|
|
int DEdgeCnt = CirclePar.DEdgeCnt;
|
|
|
|
|
bool bMerge = CirclePar.bMerge;
|
|
|
|
|
double StartAng = CirclePar.StartAng;
|
|
|
|
|
double EndAng = CirclePar.EndAng;
|
|
|
|
|
|
|
|
|
|
if(DEdgeCnt == 0)
|
|
|
|
|
{
|
|
|
|
|
DEdgeCnt = gDraw->GetCirclePtCnt(Radius);
|
|
|
|
|
}
|
|
|
|
|
//<2F>뾶------------------------------------
|
|
|
|
|
double EachAngle = 360/DEdgeCnt;
|
|
|
|
|
bool Flg = true;//<2F><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>־
|
|
|
|
|
double CurrAngle =StartAng;
|
|
|
|
|
|
|
|
|
|
Dbxy pt;
|
|
|
|
|
Dbxy FirstPt;
|
|
|
|
|
bool bLastPt = false;
|
|
|
|
|
while(CurrAngle<(EndAng+0.001))
|
|
|
|
|
{
|
|
|
|
|
//<2F>Ƕ<EFBFBD>ת<EFBFBD><D7AA>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
|
|
|
|
|
double radian = CurrAngle*PI/180;
|
|
|
|
|
if(IsDbEqualZero(Radius))//<2F>뾶Ϊ0 <20><>Ϊ<EFBFBD><CEAA>
|
|
|
|
|
{
|
|
|
|
|
pt = CenterPt;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pt.x = CenterPt.x + Radius*cos(radian);
|
|
|
|
|
pt.y = CenterPt.y + Radius*sin(radian);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(Flg)
|
|
|
|
|
{
|
|
|
|
|
Flg = false;
|
|
|
|
|
FirstPt = pt;
|
|
|
|
|
Vec.push_back(pt);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Vec.push_back(pt);
|
|
|
|
|
}
|
|
|
|
|
if(bLastPt)
|
|
|
|
|
break;
|
|
|
|
|
CurrAngle += EachAngle;
|
|
|
|
|
if(CurrAngle>EndAng)//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
CurrAngle = EndAng;
|
|
|
|
|
bLastPt = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>߶<EFBFBD>
|
|
|
|
|
if(bMerge)
|
|
|
|
|
Vec.push_back(FirstPt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>n <20>ķ<EFBFBD>Χ[Start,end]
|
|
|
|
|
bool CheckRange(int n,int Start,int end)
|
|
|
|
|
{
|
|
|
|
|
return n>=Start && n<=end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if 1
|
|
|
|
|
//n ת<><D7AA>Ϊ16 <20><><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>
|
|
|
|
|
char Int2HexChar(int n)
|
|
|
|
|
{
|
|
|
|
|
char c = '0';
|
|
|
|
|
if(n>=0 && n<= 9)
|
|
|
|
|
c = '0' + n;
|
|
|
|
|
else if(n>=10 && n<= 15)
|
|
|
|
|
c = 'A' + n - 10;
|
|
|
|
|
return c;
|
|
|
|
|
}
|
|
|
|
|
//16<31><36><EFBFBD>Ƶ<EFBFBD>char ת<><D7AA>Ϊʮ<CEAA><CAAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int HexChar2Int(char c)
|
|
|
|
|
{
|
|
|
|
|
int val = 0;
|
|
|
|
|
if(c>='0' && c<='9')
|
|
|
|
|
val = (c - '0');
|
|
|
|
|
else if(c>='A' && c<='F')
|
|
|
|
|
val = (c - 'A') + 10;
|
|
|
|
|
else if(c>='a' && c<='f')
|
|
|
|
|
val = (c - 'a') + 10;
|
|
|
|
|
return val;
|
|
|
|
|
}
|
|
|
|
|
//4<>ֽڵ<D6BD>16 <20><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>Ϊʮ<CEAA><CAAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>0707 ---->1799<39><39>1179---->4473)
|
|
|
|
|
double _4DigitHex2Double(char *buf,int len)
|
|
|
|
|
{
|
|
|
|
|
double Sum = 0;
|
|
|
|
|
for(int k=0;k<len;k++)
|
|
|
|
|
{
|
|
|
|
|
double m = len-k-1;
|
|
|
|
|
double val = HexChar2Int(buf[k]);
|
|
|
|
|
Sum += val*pow(16,m);
|
|
|
|
|
}
|
|
|
|
|
return Sum;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>ת<EFBFBD><D7AA>Ϊ16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>charA = 'B' ,charB = 'F' ת<><D7AA>Ϊ 0xBF (191)
|
|
|
|
|
int _2CharToHex(char charA,char charB)
|
|
|
|
|
{
|
|
|
|
|
int a = HexChar2Int(charA);
|
|
|
|
|
int b = HexChar2Int(charB);
|
|
|
|
|
return a*16 + b;
|
|
|
|
|
}
|
|
|
|
|
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>Ϊ2 <20>ֽ<EFBFBD>16 λ<><CEBB>
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>5000<EFBFBD><EFBFBD>16 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ0x1388 ,ת<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
buf[0] = 0x13
|
|
|
|
|
buf[1] = 0x88
|
|
|
|
|
*/
|
|
|
|
|
void IntTo2ByteHex(int n,char *buf)
|
|
|
|
|
{
|
|
|
|
|
char TmpBuf[128];
|
|
|
|
|
memset(TmpBuf,0,128);
|
|
|
|
|
//5000->"1388"
|
|
|
|
|
itoa(n,TmpBuf,16);
|
|
|
|
|
int len = strlen(TmpBuf);
|
|
|
|
|
char CharBuf4[4];
|
|
|
|
|
memset(CharBuf4,0,4);
|
|
|
|
|
int idx = 3;
|
|
|
|
|
while(len>0 && idx>=0)
|
|
|
|
|
{
|
|
|
|
|
CharBuf4[idx] = TmpBuf[len-1];//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>TmpBuf <20>ĺ<EFBFBD><C4BA>漸λ
|
|
|
|
|
len--;
|
|
|
|
|
idx--;
|
|
|
|
|
}
|
|
|
|
|
buf[0] = _2CharToHex(CharBuf4[0],CharBuf4[1]);//0x13
|
|
|
|
|
buf[1] = _2CharToHex(CharBuf4[2],CharBuf4[3]);//0x88
|
|
|
|
|
}
|
|
|
|
|
//1138--->5000 2008--->8200
|
|
|
|
|
int HexByte2Int(int Byte1,int Byte2)
|
|
|
|
|
{
|
|
|
|
|
int Byte4 = Byte1%16;
|
|
|
|
|
int Byte3 = (Byte1-Byte4)/16;
|
|
|
|
|
int Byte6 = Byte2%16;
|
|
|
|
|
int Byte5 = (Byte2-Byte6)/16;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int val =0;
|
|
|
|
|
val = (Byte3)*16*16*16+(Byte4)*16*16+(Byte5)*16+(Byte6);
|
|
|
|
|
return val;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|