Пример #1
0
        /// <summary>
        /// Refreshes, or updates, the construction plane tracked by the mobile plane.
        /// </summary>
        private Result RefreshOption(RhinoDoc doc, RhinoObject obj)
        {
            if (null == doc || null == obj)
            {
                return(Result.Failure);
            }

            if (!SampleCsMobilePlaneUserData.IsAttached(obj))
            {
                RhinoApp.WriteLine("No mobile plane attached.");
                return(Result.Success);
            }

            var rc = SampleCsMobilePlaneUserData.Refresh(obj, true);

            return(rc ? Result.Success : Result.Failure);
        }
 /// <summary>
 /// Called if an object is undeleted (e.g. Undo)
 /// </summary>
 void OnUndeleteRhinoObject(object sender, RhinoObjectEventArgs e)
 {
     SampleCsMobilePlaneUserData.Refresh(e.TheObject, false);
 }