Nodes/RDAWG 3D Pack (CUDA 12.8 + PyTorch 2.9.0)/๐Ÿ”ท Bounding Box (RDAWG)
ComfyUI Node

๐Ÿ”ท Bounding Box (RDAWG)

Find a mesh's footprint โ€” the axis-aligned and oriented box

By rdawgemflยทCreated 11 months agoยทUpdated 11 months agoยท 0
๐Ÿ”ท Bounding Box (RDAWG)
  • mesh
  • box_info
  • box_mesh
  • min_bounds
  • max_bounds
โ—„box_typeaxis_alignedโ–บ
โ—„create_visualizationtrueโ–บ

Before you transform, scale, or align a mesh, it helps to know where it actually is and how big it is. RDAWG3DBoundingBox computes the box that encloses your mesh and hands you everything about it: the numbers, the box as its own mesh, and the corner coordinates as tensors. It's the "measure the footprint" node, and it's surprisingly useful for planning the rest of a workflow.

It's also the pack's nearest thing to a layout helper - you can render the bounding box alongside the mesh to visualize how a model sits in space, and you get the min/max corner tensors to drive logic elsewhere.

How it works

Two flavors of bounding box, both from Open3D:

  • axis_aligned (default) - the AABB: the smallest box aligned to the x/y/z axes that contains the whole mesh. Fast and exact, but a diagonal object gets a loose, over-sized fit.
  • oriented - the OBB: the tightest box in any orientation that encloses the mesh. Tighter for rotated geometry, and the info output includes the orientation matrix so you can see how the box is rotated relative to the world.

If create_visualization is on (it is by default), the node builds an actual mesh of the box - that's the box_mesh output, and it renders alongside the original if you feed both into the 3D-to-Image node. You also get min_bounds and max_bounds tensors (the corner coordinates) and a box_info string with center, extent, and volume.

The inputs that matter

  • box_type - axis_aligned or oriented. AABB for quick checks; OBB for tight fits on rotated models.
  • create_visualization - keep on to get the box mesh; turn off if you only want the numbers.

Outputs: box_info (STRING), box_mesh (MESH), min_bounds (TENSOR), max_bounds (TENSOR).

A neat pattern: load a mesh, get its AABB, and use the center from box_info to decide how far to translate it before rendering - or render the box mesh next to the model to check fit before committing to a transform.

Install

Part of the RDAWG 3D Pack. ComfyUI Manager (search "RDAWG 3D Pack (CUDA 12.8 + PyTorch 2.9.0)") or:

cd ComfyUI/custom_nodes
git clone https://github.com/rdawgemfl/rdawg_3D_pack
cd rdawg_3D_pack
python install.py

Open3D 0.19.0+ is required at import (pip install open3d>=0.19.0, or python download_open3d.py for a Windows wheel). Python 3.11 recommended. Watch the installer's torch 2.9.0+cu128 pin if ComfyUI already works on your machine.

Where people get burned

  • AABB is way bigger than the object - that's expected for a diagonal or rotated mesh. That's what the oriented box is for.
  • Box mesh renders instead of the object - check your wiring; the box and the mesh are two separate MESH outputs. Feed both into the render node if you want them together.
  • Scale confusion - extent and volume are in model units. A non-normalized mesh gives you a giant or tiny box; normalize on load to keep numbers sane.
CategoryRDAWG 3D/Analysis

Inputs (3)

NameTypeDefaultDescription
meshMESHโ€”
box_typeCOMBOaxis_aligned2 options: axis_aligned, oriented
create_visualizationBOOLEANtrueโ€”

Outputs (4)

NameTypeDescription
box_infoSTRINGโ€”
box_meshMESHโ€”
min_boundsTENSORโ€”
max_boundsTENSORโ€”