public override void MoveGripPointsAt(Int32Array Indexes, double dx, double dy, double dz) { if (Indexes == null || Indexes.Count == 0 || (dx == 0.0 && dy == 0.0 && dz == 0.0)) { return; } Matrix mat = new Matrix(); mat.TranslateMatrix(dx, dy, dz); gPoints grips = GetGripPoints(); ECSMatrix.GetInvertion().Transform(grips); Transformby(mat); Update(); }
public override void MoveGripPointsAt(Int32Array Indexes, double dx, double dy, double dz) { try { if (Indexes == null || Indexes.Count == 0 || (dx == 0.0 && dy == 0.0 && dz == 0.0)) { return; } Matrix mat = new Matrix(); mat.TranslateMatrix(dx, dy, dz); gPoints grips = GetGripPoints(); ECSMatrix.GetInvertion().Transform(grips); if (Indexes.Count == grips.Count) { Transformby(mat); } else { foreach (int index in Indexes) { switch (index) { case 0: Transformby(mat); break; default: gPoint grip = new gPoint(grips[index]); grip = ECSMatrix.Transform(grip); grip += new gPoint(dx, dy, dz); this.Radius = gPoint.Distance2D(grip, this.Origin); break; } } } Update(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.ToString()); } }