Jump to content
sleg

Connecting points with edges based on attributes

Recommended Posts

Hi guys.

I have a set of 'points'. Each point has a unique id.

Now, I'm getting these point out of another package which also gives me a parent ID attribute to define a sort of 'hierarchy'.

So I would have something like

point 1 has an id of 1 and a parent id of -1 (none)

point 2 has an id of 2 and a parent id of 1 (1 is his parent)

point 3 has an id of 3 and a parent id of 1 also

point 4 has an id of 4 and a parent id of 2 (his a child of point 2)

ect...

So basically what I want to do is trace an edge between every parent and its children... I've tried putting some variables in the 'add SOP' but it seems that the only variable that seems to give me anything is $N. But that's no use to me. :)

Any ideas?

Share this post


Link to post
Share on other sites

Sure I've baked it all into a null because the stuff above is full of dependencies.

So all it is is this node with the attributes 'id' and 'parentId'.

EDIT: I basically want to start by being able to connect all points with, for example, a parentId of 3 to the point that has a geomGroupId of 3.

tree.hipnc

Edited by sleg

Share this post


Link to post
Share on other sites

Sure I've baked it all into a null because the stuff above is full of dependencies.

So all it is is this node with the attributes 'id' and 'parentId'.

EDIT: I basically want to start by being able to connect all points with, for example, a parentId of 3 to the point that has a geomGroupId of 3.

The id attribute seems to be missing in the file. I've got a working version with $PT.

Is this something you are looking for?

treeTest.hipnc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×