How to get geo point under cursor in python viewer state?

   2397   3   0
User Avatar
Member
680 posts
Joined: Nov. 2013
Offline
Hi,

How to get geo point under cursor in python state? Just like the select tool and not the uvw that hou.Geometry,intersect() returned.

Thanks for any tips!
Edited by jerry7 - Nov. 1, 2020 22:22:21
User Avatar
Staff
450 posts
Joined: Feb. 2018
Offline
hou.Geometry.intersect is not suited for this kind of work.

Use one of these methods instead:
1) hou.GeometryRayCache.findAllInTube()
2) hou.ViewerEvent.snappingRay() with geo point snapping enabled in the viewport tool box.
3) hou.GadgetDrawable to locate point components
Edited by mabelzile - Nov. 2, 2020 12:22:44
User Avatar
Member
680 posts
Joined: Nov. 2013
Offline
mabelzile
1) hou.GeometryRayCache.findAllInTube()
Thanks for tips.
But I can't find findAllInTube() in GeometryRayCache class. Does it belong to another Class?
User Avatar
Staff
450 posts
Joined: Feb. 2018
Offline
jerry7
mabelzile
1) hou.GeometryRayCache.findAllInTube()
Thanks for tips.
But I can't find findAllInTube() in GeometryRayCache class. Does it belong to another Class?

Sorry, it seems like it hasn't been backported yet to 18.5

Your best bet would be snappingRay()
  • Quick Links