public override gPoints GetGripPoints() { gPoints ret = new gPoints(); gPoint cen = new gPoint(); ret.Add(cen); ECSMatrix.Transform(ret); return(ret); }
public override gPoints GetGripPoints() { gPoints ret = new gPoints(); gPoint cen = new gPoint(); ret.Add(cen); double stepangle = Globals.VD_TWOPI / this.NumSides; double sang = 0.0d; for (int i = 0; i < NumSides; i++) { ret.Add(gPoint.Polar(cen, sang, Radius)); sang += stepangle; } ECSMatrix.Transform(ret); return(ret); }
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()); } }