Search - User list
Full Version: Wrong Dimensions Using Oriented Bound Box to create a grid
Root » Houdini Indie and Apprentice » Wrong Dimensions Using Oriented Bound Box to create a grid
CynthiaDesgagne
I'm trying to create a grid that will match the dimensions (and later the orientation) of an angled primitive (a quad not aligned on any of the three axes). In the Grid node, I used expressions to get the bounding box dimensions (with Oriented Bounding Box checked). D_XSize works perfectly. D_YSize and D_ZSize are both too short, but neither of them is 0, which I would expect considering the result of the Oriented Bounding Box.

Maybe I'm making things too hard for myself, but I'm curious about what's going on here.
tamte
bbox() function gives you axis aligned bbox of the geo, it doesn't matter that the geo is the result of fitting oriented bounding box to other geo

you can however output Radii Attribute from your Bounds SOP to get the XYZ half size values for the fitted oriented bbox
CynthiaDesgagne
tamte
bbox() function gives you axis aligned bbox of the geo, it doesn't matter that the geo is the result of fitting oriented bounding box to other geo

you can however output Radii Attribute from your Bounds SOP to get the XYZ half size values for the fitted oriented bbox

Thank you Tomas, I added an Attribute Wrangle to manipulate the Radii attribute (creating attributes "height" and "width" since I can't assume X is always the width) and refer to this node when creating the Grid.
animatrix_
Hi,

You can solve it numerically using SVD (singular value decomposition):
https://www.sidefx.com/forum/topic/84345/#post-364636 [www.sidefx.com]

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB