Clicking shaded blocks

In Rhino 5 & 6, in a shaded display mode, wherever there is an overlap in the view, only the first shaded object of the block definition through the pick point is considered when clicking objects.

SelectShadedBlock.3dm (22.8 KB) contains one surface not in a block and one block with three surfaces and one curve, the middle surface being the first object in the block definition. The following occurs in a shaded display mode:

  1. Attempting to pick the block directly by clicking on the top surface or the curve wherever they obscure the loose surface will result in the selection of the loose surface. This does not occur when clicking from below.

  2. Similarly, when using the following script, clicking on the top surface wherever it obscures the loose surface will result in a point on the latter. Clicking from below will result in a point on the middle surface of the block.

import rhinoscriptsyntax as rs

obj = rs.GetObjectEx(filter=16+4096)
if obj: rs.AddPoint(obj[3])

The results are the same when clicking on isocurves or curves in shaded mode. In wireframe mode, clicking on edges, curves, and isocurves of objects of a block instance results in the selection of the instance.

Thank you,
Steve

Hi Steve,

This I’m afraid is how block picking currently works. The code only looks for the first hit and bails out, it does not try to find the closest hit. Looks like this would not be hard to fix, but I’ll need to test it a little more to make there are no speed issues.