Jump to content

Centroid of group with expression? (Create point at center of a group)


Recommended Posts

Hi!

 

I have basically the same question as this, but with a different goal:

https://www.sidefx.com/forum/topic/50237/

I too wonder if there is a simpler way than 'group > delete > centroid the delete', but I would like to do it with a expression rather than a local variable. 

This way I can create a point in the center of a group in the Add node.

 

Help or other suggestions would be appreciated!

Link to comment
Share on other sites

If you 'middle click' on any node, there is a lot of info, also a center position which you can strip out in many different ways"

- like an answer from sidefx forums: $CEX/$CEY/$CEZ

- or expression centroid("../node/path", D_X), centroid("../node/path", D_Y), centroid("../node/path", D_Z)

- or vex "getbbox_center()" function. https://www.sidefx.com/docs/houdini/vex/functions/getbbox_center.html

- or retrieve prim intrinsic bounds, substract min from max and divide by two.

 

... and probably 5 more other ideas ;]

Edited by tmdag
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...