Jump to content

How To Get Bounding Sphere


Recommended Posts

Hi gurus,

Simple problem: how do I access the radius of the bounding sphere of a set of points?

I tried feeding my points into a sphere SOP, which does create a bounding sphere, but then when I want to access the radius I call

ch("/obj/my_object/bounding_sphere/radx") but this always returns 1, no matter what the bounding sphere's radius really is.

there has to be a simple solution to this, eh?

thanks

markus

Link to comment
Share on other sites

Hi gurus,

Simple problem:  how do I access the radius of the bounding sphere of a set of points?

I tried feeding my points into a sphere SOP, which does create a bounding sphere, but then when I want to access the radius I call

ch("/obj/my_object/bounding_sphere/radx") but this always returns 1, no matter what the bounding sphere's radius really is.

there has to be a simple solution to this, eh?

thanks

markus

21548[/snapback]

It's returns a value of 1 because it's referencing the value of the parameter, not the actual sphere that's being generated... you'll notice those parameters are grayed out when you've got something plugged into the sphere input, I guess that's to mean the Radius parameter is being overridden...

Anyway, try using a bbox expression to measure the bounding size of the geometry and then take half of that to get the radius:

bbox("/obj/my_object/bounding_sphere",D_XSIZE)*.5

Link to comment
Share on other sites

Thanks! That did the trick...

markus

It's returns a value of 1 because it's referencing the value of the parameter, not the actual sphere that's being generated... you'll notice those parameters are grayed out when you've got something plugged into the sphere input, I guess that's to mean the Radius parameter is being overridden...

  Anyway, try using a bbox expression to measure the bounding size of the geometry and then take half of that to get the radius:

bbox("/obj/my_object/bounding_sphere",D_XSIZE)*.5

21549[/snapback]

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