ObjRef.SelectionPoint() location for sub-object selection

When using sub-object selection on a block instance, the ObjRef.SelectionPoint() location is relative to the instance at its identity matrix transformation. Running the following script on SelectionPoint.3dm (30.8 KB)
with and without sub-object selection demonstrates this. Is this intentional?

import Rhino
import scriptcontext as sc

def main():
    go = Rhino.Input.Custom.GetObject()
    go.OneByOnePostSelect = True
    go.Get()
    if go.CommandResult() != Rhino.Commands.Result.Success: return
    
    sc.doc.Objects.AddPoint(go.Object(0).SelectionPoint())
    sc.doc.Views.Redraw()

if __name__ == '__main__': main()

Thank you,
Steve

Hi Steve,

I guess I’m not following what you are seeing.

The selection point should always be on what you pick. That can be either somewhere on a top-level object or on a sub-object in a block instance. The selection point will not be transformed to an equivalent location on the block definition geometry.

Perhaps I need more information on what you are seeing?

– Dale

Hi Dale,

Without sub-object selection, the point is at the actual pick point.
With sub-object selection, picking the object results in a point location per the block definition (non-transformed block instance). In the image below, when picking at the green point, the SelectionPoint() location is at the red point.

I don’t think this should be the case because the transformation of the point doesn’t match that of go.Object(0).Geometry() .

This is using 6.0.16236.13271, 8/23/16.

OK, I see. Yes, this is incorrect.

http://mcneel.myjetbrains.com/youtrack/issue/RH-35366

– Dale

@spb, this has been fixed for next week’s WIP release.

Thanks for reporting.

– Dale