Skip to main content

vArrayTrimByMeshBounds

Drops or clamps points that lie outside the bounding box of a mesh or of a second point array.

IntermediateMograph / ArrayArrayScriptValJSON
vArrayTrimByMeshBounds node

vArrayTrimByMeshBounds takes an array of XYZ points and a bounding box, and either removes the points outside the box (Drop) or moves them onto its faces (Clamp). The box comes from Mesh Points or from a Bounds Array.

Parameters​

ParameterTypeDefaultDescription
Bounds SourceDropdownArray PointsArray Points (default) uses Mesh Points. Bounds Array uses the Bounds Array input.
AABB PaddingFloat0Grows the box on every side. Negative values shrink it. Slider -10 to 10, default 0.
ModeDropdownDropDrop (default) removes points outside the box. Clamp moves them onto it.
Test XInteger1Checks X against the box when on (default).
Test YInteger1Checks Y against the box when on (default).
+4 more parameters
ParameterTypeDefaultDescription
Test ZInteger1Checks Z against the box when on (default).
PointsDATATYPE—Points to trim.
Bounds ArrayDATATYPE—Points that define the box. Used when Bounds Source is Bounds Array.
Mesh PointsDATATYPE—Points that define the box. Used when Bounds Source is Array Points.
Read the full description

The box is the smallest axis-aligned box around the Mesh Points, or around the Bounds Array when Bounds Source is set to it. AABB Padding (default 0) grows the box on every side, or shrinks it when negative. Test X, Y and Z (all on by default) choose the axes that are checked.

In Drop mode, the default, a point is kept when it is inside the box on all tested axes. In Clamp mode each tested coordinate is limited to the box range. Untested axes are never changed. If the bounds source is empty, the points are output unchanged.

Example Connections​

vArrayPointsOnGrid.Output -> vArrayTrimByMeshBounds.ArrayPoints
vArrayFromOBJ.Points -> vArrayTrimByMeshBounds.MeshPoints
vArrayTrimByMeshBounds.Output -> vArrayCameraProjection.ArrayA
vArrayCameraProjection.Output -> vArrayShapeRender.ArrayPoint
Background.Output -> vArrayShapeRender.Input