CynthiaDesgagne
2026年5月26日 20:52:07
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
2026年5月27日 00:08:46
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
2026年5月27日 10:24:12
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_
2026年5月27日 14:06:46
Hi,
You can solve it numerically using SVD (singular value decomposition):
https://www.sidefx.com/forum/topic/84345/#post-364636 [
www.sidefx.com]