Jump to content

insert vertex where one curve touches another


Berj

Recommended Posts

I have two curves, one branching off of another.  But the child branch doesn't start at a vertex of the parent branch.  The first vertex of the child does lie exactly along an edge of the parent, however. 

I've been wracking my brains trying to figure out how to insert a vertex in the parent branch that exactly coincides with the first vertex of the child branch but so far it eludes me.

In reality my geometry is much more complex than this with multiple child branches coming off of a single parent as well as many generations of branches.  But this is the most reductive case.

Any thoughts?

Berj

 

 

branch.jpg

Link to comment
Share on other sites

Hi,

here are some ideas:

  • create a referene for each prim onto its parent (if not already done)
  • for each prim store all children(ref) into one array (using the reference)
  • map this array to the u position of the parent curve (by using distance functions) [there are probably multiple ways -> but xyzdist() should be fine here]
  • push all u values into one array including the existing points and rebuild the curve (with this array sorted by u)

Here is simple setup including some aspects

prim_insert_vertices.hipnc

Edited by Aizatulin
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...