noc2 Posted May 11, 2018 Share Posted May 11, 2018 Hi; I've been desperately meddling with edges which are (somewhat reasonably) not implicitly recognized as geometry components in Houdini. My aim is to detect the edges of a given geometry (open or closed) through their respective start and end points, which would then make it possible to create a vector between those to points, and after having created an up-vector, I wish to be able to align objects along all the edges of that very object. I've so far come as far as being able to get the edge count through Vex making use of half-edges, but am lost as to how I can be able to achieve the aforementioned goal effectively. I want to end up with a set of vectors driven from the points of the detected edges like: Edge 01: v(point0-point2) Edge 02: v(point0-point4) Edge 03: v(point3-point7) … And help would be wildly appreciated. Cheers; AJ Quote Link to comment Share on other sites More sharing options...
tamagochy Posted May 11, 2018 Share Posted May 11, 2018 Try group unshared edge -> isolate them -> sort pts - > then use foreach to get edge vectors Quote Link to comment Share on other sites More sharing options...
noc2 Posted May 11, 2018 Author Share Posted May 11, 2018 3 hours ago, tamagochy said: Try group unshared edge -> isolate them -> sort pts - > then use foreach to get edge vectors Thank you your reply. But I couldn't really comprehend what you meant by the procedure you recommended. Could you elaborate a little? cheers; AJ Quote Link to comment Share on other sites More sharing options...
petz Posted May 11, 2018 Share Posted May 11, 2018 calculating the edge vector is not a problem but you can't store it on edges since houdini doesn't support edges as regular geometry elements. what you could do instead is to use convertLine and do all the computations on prims which you could then lookup by points from the actual mesh. or you could just write all the edge vectors into a detail array. please take a look at the attached file. hth. petz edge_vec.hipnc 2 Quote Link to comment Share on other sites More sharing options...
noc2 Posted May 11, 2018 Author Share Posted May 11, 2018 (edited) 21 minutes ago, petz said: calculating the edge vector is not a problem but you can't store it on edges since houdini doesn't support edges as regular geometry elements. what you could do instead is to use convertLine and do all the computations on prims which you could then lookup by points from the actual mesh. or you could just write all the edge vectors into a detail array. please take a look at the attached file. hth. petz edge_vec.hipnc Awesome! Thank you so much for your help, that really helped. I guess this is a whole lot better than trying to detect every edge's points through hedge functions. At least for a noob like myself I must say, that I especially liked what you came up with in the second Attrib Wrangle where you made use of expandededgegroup. I will definitely study this. Thank you so much once again petz, for taking the time to help me out and especially for the example scene. Cheers; AJ Edited May 11, 2018 by noc2 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.