Jump to content

Calculate a bounding box for a set of points


Recommended Posts

I'm looking for a method which allows to calculate a bounding box of a point cloud. The only one method I see is getBoundingBox() from GU_PointSelection.h But in this case I have to create a point group. Is there any other method which can calculate bounding box using points without groups? Or which method is more streightforward.

Link to comment
Share on other sites

P. S. I can give getBoundingBox() the name of point group and it works just fine. But I'm wondering is it possible to say "select all points in gdp please"? Something like wildcard *...

does the bbox() expression not work for you?

you can also plug geometry into a box node and it will make the box the size of the input's bbox.

Link to comment
Share on other sites

Hey Hok,

I haven't tried this, but I see a getPointBBox() function implemented in GEO_Detail. Maybe that one works for you.

Ultimately, if everything fails, you could just loop through all points to find the axis-aligned extents and instance your own UT/UT_BoundingBox.

There's also an octree variant for a fixed number of points in UT/UT_PointTree, but if you don't need the hierarchical partitioning then that's likely overkill.

Link to comment
Share on other sites

Hey Hok,

I haven't tried this, but I see a getPointBBox() function implemented in GEO_Detail. Maybe that one works for you.

Ultimately, if everything fails, you could just loop through all points to find the axis-aligned extents and instance your own UT/UT_BoundingBox.

There's also an octree variant for a fixed number of points in UT/UT_PointTree, but if you don't need the hierarchical partitioning then that's likely overkill.

Hi Mario,

Thanks, I didn't see this method. Have to take a look. I though about looping through points but if we have something already implemented why not to use it? :)

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...