Sourabh Posted December 13, 2017 Share Posted December 13, 2017 Hello, I want to ask one quick question. What primhedge function does, according to help file it is returning the number of an arbitrary half-edge that contained in prim. If anyone know about this function and know what is the use of this function please expain me. Thanks Quote Link to comment Share on other sites More sharing options...
fuat Posted December 13, 2017 Share Posted December 13, 2017 http://www.sidefx.com/docs/houdini/vex/halfedges Quote Link to comment Share on other sites More sharing options...
Sourabh Posted December 14, 2017 Author Share Posted December 14, 2017 Thanks Fuat I have already read this link but not able to understand .Can you explain me little if you get this function. Quote Link to comment Share on other sites More sharing options...
fuat Posted December 14, 2017 Share Posted December 14, 2017 (edited) hi Sourabh, what exactly didnt you understand? what exactly do you want to do? that maybe helps to understand what you are after. EDIT: maybe also read about other functions like vertexhedge or hedge_prim, they are very well described and documented. hope this helps fuat Edited December 14, 2017 by fuat Quote Link to comment Share on other sites More sharing options...
f1480187 Posted December 14, 2017 Share Posted December 14, 2017 (edited) You can use it to write neighbours() function analog for primitives: // Primitive wrangle. i[]@neighbours; int prim_edge = primhedge(0, @primnum); for (int i = 0; i < primvertexcount(0, @primnum); i++) { for (int j = 0; j < hedge_equivcount(0, prim_edge); j++) { int edge = hedge_nextequiv(0, prim_edge); int prim = hedge_prim(0, edge); if (prim != @primnum) { append(i[]@neighbours, prim); } prim_edge = edge; } prim_edge = hedge_next(0, prim_edge); } The code based on the example from @petz. We don't use half edge functions much, because all kinds of higher-level geometry functions like that are implemented in VEX already. Otherwise they would be everywhere. I prefer to think of them like a building blocks for functions like neighbour, primpoints, pointvertices, etc. Almost never used any of them, and searching through $HH/vex/ shows a little use too. Edited December 14, 2017 by f1480187 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.