Berj Posted May 6, 2021 Share Posted May 6, 2021 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 Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted May 7, 2021 Share Posted May 7, 2021 (edited) 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 May 7, 2021 by Aizatulin Quote Link to comment Share on other sites More sharing options...
ryew Posted May 8, 2021 Share Posted May 8, 2021 Is the IntersectionStitch SOP what you're after? A quick test seems to create a vertex at the point where the branch touches the original/parent line. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.