# bbox vector placeholder question

## Recommended Posts

Hello,

I recently stumbled upon some code that had something like this:

vector min, max;
getbbox(min,max);

So is vector min, max is basically creating two empty placeholder vectors: (0,0,0) and (0,0,0) ??

So when I say getbbox(min,max); ..it really means: getbbox(0,0,0), (0,0,0));  ????

I know the getbbox is supposed to set two vectors for the min and max corners of the input geometry, but how does it calculate it if I am just giving it two empty placeholder vectors (0,0,0)...how can I see this in an attribute in the geometry spreadsheet so I know what the placeholders are really doing ?

Sorry for the silly question...Any help would be greatly appreciated.

Thanks

##### Share on other sites

you're missing the geometry path or input

the correct syntax should be:
vector bmin,bmax; //creates 2 empty vectors
getbbox(0,bmin,bmax); //get bounds and stores the values in the 2 vectors variables (the 0 is for first input)

if you want to see the values in the geo spreadsheets, you can export attributes like this:
v@bmin = bmin;
v@bmax = bmax;

note that min is a vex function so it's confusing to name a variable that way.
hope that helps

Edited by bunker

##### Share on other sites

Hi Bunker,

This makes sense now. Thank you very much!

## Create an account

Register a new account