Jump to content

store getbbox into attribute


isah_voodoo

Recommended Posts

Hello again

I come with another vex question. This time I am trying to figure out the function getbbox and store it into an attribute to see what the values are actually doing,....

The help cards states: 

Sets two vectors to the minimum and maximum corners of the bounding box for the geometry.

void  getbbox(vector &min, vector &max)

So I am trying to follow this exactly.

vector min;
vector max;

getbbox(min,max);

@P.x *= (@P.y/max.y);

Now, I found this simple pieces of code on the forums somewhere and it works great. However, I am trying to store the getbbox into my own attribute so I can actually see the values but when I try, it gives me an error. This is what im doing:

vector min;
vector max;

v@myBound= getbbox(min,max);

@P.x *= (@P.y/max.y);

What exactly am I doing wrong here? Why does the getbbox function not let me store its values into an attribute? 

Link to comment
Share on other sites

Hi Matt, according to the docs, void  getbbox(vector &min, vector &max) is deprecated. We should use three arguments, first is the geometry input (integer number or "op:" string reference). 

getbbox (0, v@min, v@max);

This one line is also what you asked for. It stores the bounding box into two vector attributes.

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