rs.WindowPick() randomly isn't "grabbing" some objects that completely fall into selection box and picks some that are completely out of it

Sorry for the quality - had to keep it under 20MB. The gist of an issue is there.
It randomly won’t “pick” some objects. Rotating those sometimes fixes it. But that makes no sense in any regard.

Also crossing window selection option in rs.WindowPick() works everytime.

Cutlist Test.3dm (7.6 MB) PD_Cutlist.py (7.4 KB)

I take it back - rs.WindowsPick() is all kinds of messed up. Or it just might be the annotation objects.

Red rectangle is selection area. Cross selection is on.

My bet is that there’s some invisible control points on those objects that are out there somewhere and WindowPick picks them up instead of visible geometry.

Just run this on the attached:

Cutlist Test.3dm (7.6 MB)

import rhinoscriptsyntax as rs

rs.UnselectAllObjects()
rs.WindowPick([-130,-200],[130,-379], None, True, True)
rs.GetPoint()

rs.UnselectAllObjects()
rs.WindowPick([170,-200],[430,-379], None, True, True)
rs.GetPoint()

Can we get it fixed?

@dale @lowell

This doesn’t work either. Some dims just don’t get selected.

import rhinoscriptsyntax as rs
import Rhino
import scriptcontext as sc

view = sc.doc.Views.ActiveView.ActiveViewport
point1 = Rhino.Geometry.Point2d(-130, -200)
pt1 = rs.XformWorldToScreen(point1, rs.CurrentView())
point2 = Rhino.Geometry.Point2d(130, -379)
pt2 = rs.XformWorldToScreen(point2, rs.CurrentView())
filter = Rhino.DocObjects.ObjectType.AnyObject

a = sc.doc.Objects.FindByWindowRegion(view, pt1, pt2, True, filter)

WP = []
for obj in a:
    WP.append(obj.Id)

rs.UnselectAllObjects()
rs.SelectObjects(WP)

Rhino.WindowPick() does NOT have this issue.

Hi @Asterisk,

I’ve logged this issue:

https://mcneel.myjetbrains.com/youtrack/issue/RH-58495

– Dale

RH-58495 is fixed in the latest WIP