Skip to main content

vScriptValBoundingBox

Outputs the corner points and the edges of the bounding box of a point array.

BeginnerMograph / ScriptValScriptValArrayJSON
vScriptValBoundingBox node

vScriptValBoundingBox takes an array of points and outputs the corners of the smallest box that contains them on the Points output. The Edges output holds the faces or lines that join the corners.

Parameters​

ParameterTypeDefaultDescription
InputScriptVal—Data to process.
Read the full description

The node has no controls. It reads the minimum and maximum of X, Y and Z over the input. An element with 3 values updates all three axes, one with 2 values updates X and Y, and one with 1 value updates X. Elements of any other length are skipped.

With Z limits, the Points output has 8 corners and the Edges output has 6 four-corner faces, given as 1-based corner indices. With only X and Y limits it has 4 corners and 4 two-corner edges. With X only it has 2 values and one edge. An empty input gives empty outputs.

Example Connections​

vScriptValFromOBJ.Points -> vScriptValBoundingBox.ArrayA
vScriptValBoundingBox.Points -> vScriptValCameraProjection.ArrayA
vScriptValCameraProjection.Output -> vScriptValShapeRender.ArrayPoint
vScriptValBoundingBox.Edges -> vScriptValShapeRender.ArrayEdge
Background.Output -> vScriptValShapeRender.Input