void 绘制障碍物ToolStripMenuItemClick(object sender, EventArgs e) { AGV agv = new AGV(); agv.AgvLocation_X = 450; agv.AgvLocation_Y = 450; agv.AgvNo = 1; agv.Polar = new int[450]; agv.Angle = new float[450]; int j = 0, k = 360; int index = 0; for (int i = 0; i < 450; i += 3) { agv.Polar [index] = i; agv.Angle [index] = j; j += 3; index++; } for (int i = 0; i <= 450; i += 30) { double [] item = new double[2]; // k-=10; // agv .Polar [index ]=i ; // agv .Angle [index ]=k ; // index ++; } CreateCoordinate obj = new CreateCoordinate(); CreateCoordinate.CreatePoint(cloudgraph, agv, 3, Color.Blue, 1); lidardatadgv.DataSource = obj.Dt; }
void 绘图ToolStripMenuItemClick(object sender, EventArgs e) { //MessageBox .Show (OriginPoint .X .ToString ()+","+OriginPoint .Y .ToString ()); if (palartem.Text == "") { MessageBox.Show("请输入极轴长度!"); return; } if (angletem.Text == "") { MessageBox.Show("请输入角度!"); return; } CreateCoordinate obj = new CreateCoordinate(); obj.OutPutNewXoY(Convert.ToDouble(palartem.Text), Convert.ToDouble(angletem.Text)); obj.CreatePoint(cloudgraph, 3); }