Jump to content

Connecting points with edges based on attributes


sleg

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?

Link to comment
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
Link to comment
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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...