> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_3DMakeBox

Builds a `Box3D` from two corner POINT Z geometries. Mirrors PostGIS's `ST_3DMakeBox`. The corners are taken verbatim — no swapping or validation of ordering — so inverted bounds are preserved as supplied. POINT inputs without a Z dimension contribute `z = 0`, matching PostGIS.

<img src="https://mintcdn.com/wherobots/XpQVzmvmMISOboEb/images/sql-functions/box3d/st_3dmakebox.svg?fit=max&auto=format&n=XpQVzmvmMISOboEb&q=85&s=92d171d61637b4c02adc1def37bf376f" alt="ST_3DMakeBox builds a cuboid from two corner POINT Z geometries" width="340" height="250" data-path="images/sql-functions/box3d/st_3dmakebox.svg" />

Throws `IllegalArgumentException` if either argument is not a POINT. Returns `NULL` if either point is `NULL` or empty.

## Signatures

```sql theme={"system"}
ST_3DMakeBox(lowerLeft: Point, upperRight: Point)
```

## Parameters

<ParamField body="lowerLeft" type="Point" required>
  The lower-left corner point (a POINT Z; a 2D point contributes `z = 0`).
</ParamField>

<ParamField body="upperRight" type="Point" required>
  The upper-right corner point (a POINT Z; a 2D point contributes `z = 0`).
</ParamField>

## Return type

<ResponseField type="Box3D">
  The 3D bounding box spanning the two corner points.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_AsText(ST_3DMakeBox(ST_PointZ(1.0, 2.0, 3.0), ST_PointZ(4.0, 5.0, 6.0)))
```

```
BOX3D(1.0 2.0 3.0, 4.0 5.0 6.0)
```
