Rhino 8.35.26251.13001, Windows. Reproduced in Safe Mode with only built-in McNeel plug-ins loaded
Steps:
- Start a fresh Rhino instance with an empty document.
- Run the attached MinimalIsolate.py (2.2 KB)
MinimalIsolate.py
"""Run once in a fresh EMPTY Rhino test instance, then type _Isolate manually.
Uses only RhinoCommon and McNeel's built-in IronPython. Does not close Rhino.
"""
import os
import Rhino
import scriptcontext as sc
from System.IO import File
from System.Windows.Forms import Timer
doc = sc.doc
if any(True for obj in doc.Objects):
raise Exception('Use a fresh empty disposable document')
report = os.path.join(os.path.dirname(__file__), 'minimal-results.txt')
lines = ['Rhino ' + str(Rhino.RhinoApp.Version)]
first = doc.Objects.AddPoint(Rhino.Geometry.Point3d(0, 0, 0))
other = doc.Objects.AddPoint(Rhino.Geometry.Point3d(10, 0, 0))
doc.Objects.Select(first)
Rhino.RhinoApp.RunScript('_Isolate', False)
healthy = not doc.Objects.FindId(first).IsHidden and doc.Objects.FindId(other).IsHidden
lines.append('Baseline healthy=' + str(healthy))
Rhino.RhinoApp.RunScript('_Show', False)
doc.Objects.UnselectAll()
if not healthy:
raise Exception('Baseline already broken; restart the test instance')
getter = Rhino.Input.Custom.GetObject()
getter.AcceptCustomMessage(True)
timer = Timer()
timer.Interval = 150
def tick(sender, event):
timer.Stop()
Rhino.Input.Custom.GetBaseClass.PostCustomMessage('test')
timer.Tick += tick
try:
timer.Start()
lines.append('Getter result=' + str(getter.Get()))
lines.append('Payload=' + str(getter.CustomMessage()))
finally:
timer.Stop()
timer.Tick -= tick
timer.Dispose()
getter.Dispose()
events = []
def begin(sender, event):
events.append(event.CommandEnglishName)
def idle(sender, event):
if 'Isolate' not in events or Rhino.RhinoApp.InCommand:
return
Rhino.RhinoApp.Idle -= idle
Rhino.Commands.Command.BeginCommand -= begin
lines.append('Commands=' + repr(events))
lines.append('Selected point hidden=' + str(doc.Objects.FindId(first).IsHidden))
lines.append('Other point hidden=' + str(doc.Objects.FindId(other).IsHidden))
File.WriteAllText(report, '\n'.join(lines))
Rhino.RhinoApp.WriteLine('Reproduction report: ' + report)
Rhino.Commands.Command.BeginCommand += begin
Rhino.RhinoApp.Idle += idle
doc.Objects.Select(first)
doc.Views.Redraw()
File.WriteAllText(report, '\n'.join(lines))
Rhino.RhinoApp.WriteLine('Now type _Isolate. Expected: selected point remains visible.')
- After the script finishes, type
_Isolate.
Expected: The selected point remains visible; the other point is hidden.
Actual: The selected point is hidden; the other remains visible. The command trace shows Isolate → Hide, omitting Invert.
The script verifies Isolate works before a GetObject accepts a timer-posted GetBaseClass.PostCustomMessage. The failure occurs afterward, despite disposing both the timer and getter.