public List <NFPLineAngle> addNFPLineAngle(List <PointF> listPoint) { List <NFPLineAngle> listNFPLine = new List <NFPLineAngle>(); for (int i = 0; i < listPoint.Count; i++) { NFPLineAngle nfpLine = new NFPLineAngle(); if (i == listPoint.Count - 1) { nfpLine.StartInt = i; nfpLine.EndInt = 0; } else { nfpLine.StartInt = i; nfpLine.EndInt = i + 1; } nfpLine.StartPoint = listPoint[nfpLine.StartInt]; nfpLine.EndPoint = listPoint[nfpLine.EndInt]; double angle = (180 / Math.PI) * Math.Atan2(listPoint[nfpLine.EndInt].Y - listPoint[nfpLine.StartInt].Y, listPoint[nfpLine.EndInt].X - listPoint[nfpLine.StartInt].X); angle = angle < 0 ? angle + 360 : angle; nfpLine.Angle = (float)angle; listNFPLine.Add(nfpLine); } return(listNFPLine); }
private PointF getSignGuiJiPointTu(NFPLineAngle nFPLineAngle, List <PointF> newListStockPoint, List <PointF> newListPlatePoint) { throw new NotImplementedException(); }