public override void OnDone() { if (edges.Count > 0) { IGeoObject[] affected; IGeoObject[] modified = Make3D.MakeChamfer(theFace, edges.ToArray(), dist1, dist2, out affected); if (affected.Length > 0) { using (Frame.Project.Undo.UndoFrame) { IGeoObjectOwner owner = null; for (int i = 0; i < affected.Length; ++i) { if (owner == null || affected[i].Owner is Model) { owner = affected[i].Owner; } affected[i].Owner.Remove(affected[i]); } for (int i = 0; i < modified.Length; ++i) { owner.Add(modified[i]); } } } } base.OnDone(); }