get_mesh_selection_bounds
Resolve a mesh region and report its local-space bounding box, returning center and size in centimeters to measure selected geometry without opening the editor.
Instructions
Resolve a region into a selection and report its local-space BOUNDING BOX via UGeometryScriptLibrary_MeshSelectionQueryFunctions::GetMeshSelectionBoundingBox. Read-only. Takes exactly the same region parameters as select_mesh_triangles and set_mesh_material_id_in_region, so a region measured here is the same one painted there. This is what turns a bisection answer ("the piece is somewhere in X>0") into actual numbers: centre and size, which is what lets you tell a 150x100x40 slab from a 14x230x75 rail without opening the editor.
Returns: { actor_name, region, triangles_selected: int, is_empty: bool, bounds: { min_x, min_y, min_z, max_x, max_y, max_z, center_x, center_y, center_z, size_x, size_y, size_z } }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| center | No | Local [x,y,z] centre. Used by box/sphere, and as the plane origin. | |
| extent | No | Local [x,y,z] HALF-size in cm. Required by region='box'. | |
| invert | No | Invert the spatial selection (default false). | |
| normal | No | [x,y,z] direction. Plane normal for region='plane', facing direction for 'normal_angle'. Default [0,0,1]. | |
| radius | No | Radius in cm. Required by region='sphere'. | |
| region | No | 'all' (default) | 'box' | 'sphere' | 'plane' | 'normal_angle' | 'material_id' | 'polygroup' | 'connected_component'. | |
| actor_name | Yes | Label or name of the target DynamicMeshActor. | |
| polygroup_id | No | Polygroup to select when region='polygroup'. | |
| max_angle_deg | No | Max angle from normal in degrees for region='normal_angle' (default 15). | |
| component_index | No | Island index when region='connected_component'. Get it from get_mesh_components_detail, which reports each piece's size and bounding box. | |
| polygroup_layer | No | Optional extended polygroup layer index for region='polygroup'. | |
| source_material_id | No | MaterialID to select when region='material_id'. | |
| min_triangle_points | No | How many of a triangle's 3 points must be inside for it to count, 1-3 (default 3). |