Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5762

Hatch Selection Error

$
0
0

@moosejuicezeus wrote:

I seem to have uncovered a bug where the extents of a hatch are not properly detected. I came across the bug when calling the ObjectTable.FindByWindowRegion method in a Python script; I'm passing the viewport bounds and would expect objects wholly visible in the viewport to be found (I'm primarily testing in the parallel viewport). The behavior is just as expected for Curves and Breps: so long as the object is wholly visible in the viewport, it is found. Hatches (even those that are identical in extents to Breps and Curves), are not always found as anticipated.

What I've discovered is that in order for the hatch to be found, its entire WORLD-ORIENTED BOUNDING BOX (and not just it geometry) has to be included in the FindByWindowRegion bounds.

World Oriented Bounding-Box INSIDE Viewport:


_
World Oriented Bounding-Box OUTSIDE Viewport:

I've tested with a dramatically simplified version of the script (to make sure there were't script errors) and have also discovered that this impacts the command ZoomSelected when used in the native Rhino enviroment (i.e. no scripting). In SetZoomExtentsBorder, I've set ParallelView=1, so I would expect that ZoomSelected would zoom tightly to an object in a parallel viewport. Again, Curves and Breps behave as expected. For a hatch, ZoomSelected zooms to the extents of the WORLD-ORIENTED BOUNDING BOX.

ZoomSelected on Curve or Brep:


_
ZoomSelected on Hatch:

Hopefully my description is clear enough to illustrate the bug. Please let me know if I can assist further.

-Jason
Version 5 SR14 64-bit
(5.14.522.8390, 5/22/2017)

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5762

Trending Articles