Getting a list of unique edges in a geometry HDK

   1763   2   1
User Avatar
Member
40 posts
Joined: Oct. 2012
Offline
Hi all,
I am trying to create a list of all the edges in a connected geometry.
Each edge will store information of
1) the points its being connected to
2) The rest length , mass and spring constant for each of the edge.

ATM I am thoroughly confused and in need of the best way to approach making the list of edges in HDK 14. I have been looking at different methods (some referencing GEO_Closure, looping through primitives etc ) in forums but I'm having trouble wrapping my head around these.
Any help would be much appreciated!!
Thanks,
Regards,
Soumitra Goswami
User Avatar
Member
7709 posts
Joined: July 2005
Online
Houdini stores its geometry in a polygon soup [en.wikipedia.org] format so there's no explicit edges. To store edge attributes, you can use vertex attributes instead.
User Avatar
Member
40 posts
Joined: Oct. 2012
Offline
Hi Edward,
Thanks for the reply.I am creating my own data structure for storing the edge info.

I am scripting my own spring system ( just to study how it functions ).
Here is my thought process to make it more clear.
I have 3 data structures to make my spring calculations easier.
1) Point/Vertex attributes which will store the mass, state(position and velocity) and total force acting on each point.
2) Face attributes which store the strut number(edge number) contained in the face and angle between each edge.(for the calculation of drag and torsional force respectively)
3) Strut(Edge) attributes which store spring parameters, point ids that are contained in each edge and neighbouring Face indices.(to calculate my spring forces).

This way I can calculate my regular, spring, torsional and drag forces.

1)I can loop over points to to create my first data structure no problem.

2) I can loop over my faces (primitives) and create that data structure too.

3) This is where I am having issues. Currently I am trying to solve it by looping through each face and adding edges by subtracting between the face's individual points, then doing a check to see if I don't have any duplicates.

I don't know if this will work.I wanted to know if this is the best way or if there is a better way of doing this.
  • Quick Links