Jump to content

Issue with Inserting a New Point on an Edge...


Recommended Posts

Hi everyone,

I’m currently working on inserting a point at a specific location along an edge (or half-edge) of a primitive.
So far, I’ve successfully identified the correct primitive number and UV coordinates using the xyzdist() and primuv() functions.
However, I’m wondering if the next step is to first determine the correct edge before proceeding.
Can anyone advise on the best approach to find and insert a point at the specified location on that edge?

Thanks in advance for your help!


Add Point.jpg

Edited by Masoud
Link to comment
Share on other sites

I guess these should be the steps:

  1. Locate the Position on the Primitive: Use the xyzdist() function to find the closest point on the primitive from a given location. Then, use the primuv() function to retrieve the exact UV coordinates of that position on the primitive's surface.

  2. Identify the Edge Containing the Position: Utilize the result from step 1 to identify the edge (or half-edge) that contains the position found. 

  3. Get the Source and Destination Points of the Edge: Once you have the edge (half-edge), extract the source and destination points that define the edge. 

  4. Remove the Specific Edge: Delete the edge using Houdini's edge deletion functions to disconnect it from the primitive.

  5. Add a New Point: Create a new point at the specific location obtained in step 1. 

  6. Reconnect the New Point with the Edge: Add new vertices to form new edges by connecting the source point to the new point and the new point to the destination point...

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...