A Christmas puzzle for Michael?
What about a “nearest neighbor" GeomObject method: given a vector for direction and an optional distance limit, the method would return the next GeomObject along the vector within the limit.
An example use case would be a script modifying a stack of objects where it is inconvenient to select the objects in advance but the user could supply a distance tolerance. The objects may be immediately adjacent to one another or there may be gaps and this would be left to the calling script to control.
An alternative process, using existing capabilities is to use a line and intersect, but that has challenges and limitations. A nearest neighbor method would create possibilities for scripts to examine the model environment. I have no idea of the effort required to implement such a method, but offer it as an idea for your consideration.
Merry Christmas and THANK YOU for MoI, it is a delightful tool!
--Larry
|