private void buttonArr_Click(object sender, EventArgs e) { if ((!radioButton1.Checked) && (!radioButton2.Checked)) { MessageBox.Show("请选择方向并确认"); return; } int RowNum = Convert.ToInt32(numericUpDown10.Value); int ColumnNum = Convert.ToInt32(numericUpDown11.Value); pLeftUp.X = Convert.ToSingle(numericUpDown1.Value); pLeftUp.Y = Convert.ToSingle(numericUpDown2.Value); pLeftUp.Z = Convert.ToSingle(numericUpDown3.Value); pRightUp.X = Convert.ToSingle(numericUpDown4.Value); pRightUp.Y = Convert.ToSingle(numericUpDown5.Value); pRightUp.Z = Convert.ToSingle(numericUpDown6.Value); pRightDwon.X = Convert.ToSingle(numericUpDown7.Value); pRightDwon.Y = Convert.ToSingle(numericUpDown8.Value); pRightDwon.Z = Convert.ToSingle(numericUpDown9.Value); int dripDirection = radioButton1.Checked ? 0 : 1; ftemp.LoadStickData(PointArray.MatrixArrayList(pLeftUp, pRightUp, pRightDwon, RowNum, ColumnNum, dripDirection), _id); MessageBox.Show("阵列成功"); }
private void buttonArr_Click(object sender, EventArgs e) { if ((!radioButton1.Checked) && (!radioButton2.Checked)) { MessageBox.Show("请选择方向并确认"); return; } int Num = Convert.ToInt32(numericUpDown10.Value); int dripDirection = radioButton1.Checked ? 0 : 1;//点胶方式 pLeftUp.X = Convert.ToSingle(numericUpDown1.Value); pLeftUp.Y = Convert.ToSingle(numericUpDown2.Value); pLeftUp.Z = Convert.ToSingle(numericUpDown3.Value); pRightUp.X = Convert.ToSingle(numericUpDown4.Value); pRightUp.Y = Convert.ToSingle(numericUpDown5.Value); pRightUp.Z = Convert.ToSingle(numericUpDown6.Value); pRightDwon.X = Convert.ToSingle(numericUpDown7.Value); pRightDwon.Y = Convert.ToSingle(numericUpDown8.Value); pRightDwon.Z = Convert.ToSingle(numericUpDown9.Value); List <PointF3> List; if (dripDirection == 0) { List = PointArray.MatrixArrayList(pLeftUp, pRightUp, pRightDwon, Num, 2, dripDirection); } else { List = PointArray.MatrixArrayList(pLeftUp, pRightUp, pRightDwon, 2, Num, dripDirection); } if (List.Count < 2) { return; } //DripLine = new List<DripLineDef>(); for (int i = 1; i < List.Count; i++) { //DripLineDef def = new DripLineDef(); PointF4 f4 = new PointF4(); f4.X = List[i - 1].X; f4.Y = List[i - 1].Y; f4.Z = List[i - 1].Z; //def.Point.Add(f4); PointF4 point = new PointF4(); point.X = List[i].X; point.Y = List[i].Y; point.Z = List[i].Z; //def.Point.Add(point); //DripLine.Add(def); } }