papsphilip Posted March 11, 2022 Share Posted March 11, 2022 (edited) I am trying to groups the hard edges of a model like the one you see in the attached image but it seems weirdly difficult. I am sure there is an easy way to do this group_hard_edges.hip Edited March 11, 2022 by papsphilip Quote Link to comment Share on other sites More sharing options...
Librarian Posted March 11, 2022 Share Posted March 11, 2022 @papsphilip if you just somehow change your approach to model that roof... or ? you can use this code.. to take points and promote to edge group.. its messy inside that HIp .. string group_name = chs('group_name'); vector src_dir = chv('direction'); float treshold = chf('tresh'); int nb_pts[] = neighbours(0,@ptnum); foreach ( int pt; nb_pts) { if (@ptnum > pt) continue; vector pos = point(0,'P',pt); vector edge_dir = normalize(@P -pos); if(abs(dot(edge_dir, src_dir)) >= treshold) { setedgegroup(0,group_name,@ptnum,pt,1); } } Quote Link to comment Share on other sites More sharing options...
papsphilip Posted March 13, 2022 Author Share Posted March 13, 2022 nice! i tried your code unfortunately this wont work, i already some wrangles for grouping based on the angle between the edges and get only vertical or horizontal edges or anything in between but i cant seem to get the highlighted edges i am showing in the attached images. Or did i not understand something correctly? maybe i have to generate the mesh some other way to get those edges. Quote Link to comment Share on other sites More sharing options...
Librarian Posted March 14, 2022 Share Posted March 14, 2022 @papsphilip Your first resample its making error in Boolean op.... and you have floating points and prim's after for-each .now after zero in resampling you get those Groups Clean with no errors. edges.hiplc Quote Link to comment Share on other sites More sharing options...
papsphilip Posted March 15, 2022 Author Share Posted March 15, 2022 thank you!! 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.