# Sub-Mesh Bounding Box

{% hint style="info" %}
Beta Feature - check **Show Beta Features** in the [Preferences Window](/cavalry/user-interface/menus/window-menu/preferences.md) to enable this node.
{% endhint %}

[Common Attributes](/cavalry/nodes/shapes/common-attributes.md) +

**Input Shape** - connect any other Shape containing sub-meshes. See [Sub-Mesh](/cavalry/nodes/behaviours/sub-mesh.md) for more info on sub-meshes.

**Level** - set the level within the sub-mesh's hierarchy to affect.

**Expand** - increase/ decrease the size of the bounding boxes generated.

**Minimum Size** - set a minimum width and height for the bounding boxes.

**Specific Indices** - enter specific ids for each sub-mesh to create a bounding box around. Enter comma separated values (e.g. `0, 4, 7`) or create ranges using colons (e.g. `1:4`) or a combination of both (e.g. `2, 3:5`).

{% hint style="info" %}
Remember that ids start at 0 so the first word in a string would be `id0`.
{% endhint %}

{% hint style="success" %}
Example usage:

1. Create a **Sub-Mesh Bounding Box** Shape.
2. Set its **Fill Color** to green.
3. Create a [Text Shape](/cavalry/nodes/shapes/text-shape.md).
4. Enter `Sub-Mesh Bounding Box` into the **Text** attribute.
5. Connect ***textShape.id > subMeshBoundingBox.inputShape***.
6. Set the **Level** to **2** (Words are the 2nd level of the sub-mesh within a Text Shape).
7. Enter `0,2` into the **Specific Indices** attribute.

Green boxes will be drawn around the words **Sub-Mesh** and **Box**.&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://scenegroup.gitbook.io/cavalry/nodes/shapes/sub-mesh-bounding-box.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
