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.
dale
(Dale Fugier)
May 14, 2020, 5:11am
4
brian
(Brian Gillespie)
June 16, 2020, 10:55pm
5
RH-58495 is fixed in the latest WIP
But we’re not using WIP… yet…