Jump to content

whether there is point on primitive?


atap3d

Recommended Posts

Hi. I have a lot of primitives and one point. I want to make following actions with each primitive: if point is not on primitive, it's necessary to remove this primitive. How to know, whether there is point on primitive?

Link to comment
Share on other sites

Hi. I have a lot of primitives and one point. I want to make following actions with each primitive: if point is not on primitive, it's necessary to remove this primitive. How to know, whether there is point on primitive?

check out the pointdist() expression. You feed it a point and a surface and it will tell you the closest prim on the surface to that point. Ive attacted a simple example.

pointDistEx.hip

Edited by SpencerL
Link to comment
Share on other sites

Good example. Thank you very much. The solution true not up to the end. If point is not on one of primitives, your example leave nearest to point primitive. It should not be. If point is not on one of primitives, all primitives should be removed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...