> ## 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.

![ST\_3DMakeBox builds a cuboid from two corner POINT Z geometries](https://mintcdn.com/wherobots/XpQVzmvmMISOboEb/images/sql-functions/box3d/st_3dmakebox.svg?fit=max\&auto=format\&n=XpQVzmvmMISOboEb\&q=85\&s=92d171d61637b4c02adc1def37bf376f)

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

**lowerLeft** `Point` *required*

The lower-left corner point (a POINT Z; a 2D point contributes `z = 0`).

**upperRight** `Point` *required*

The upper-right corner point (a POINT Z; a 2D point contributes `z = 0`).

## Return type

The 3D bounding box spanning the two corner points.

## 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)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.