> ## 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_3DDWithin (Python)

> Check whether two geometries (or two Box3D values) are within distance units using 3D Euclidean distance.

Check whether two geometries (or two Box3D values) are within `distance` units using 3D
Euclidean distance.

Mirrors PostGIS `ST_3DDWithin`. Coordinates without a Z dimension are treated as
`z = 0`. For Box3D inputs the test is a closed-interval 3D distance between the two
cuboids; inverted bounds raise `IllegalArgumentException`. NULL on null input.

SQL reference: [`ST_3DDWithin`](/reference/wherobots-db/geometry-data/predicates/ST_3DDWithin)

## Signature

```python theme={"system"}
from sedona.spark.sql.st_predicates import ST_3DDWithin

ST_3DDWithin(
    a: ColumnOrName,
    b: ColumnOrName,
    distance: Union[ColumnOrName, float],
) -> Column
```

## Parameters

<ParamField path="a" type="ColumnOrName" required>
  First geometry or Box3D column.
</ParamField>

<ParamField path="b" type="ColumnOrName" required>
  Second geometry or Box3D column.
</ParamField>

<ParamField path="distance" type="Union[ColumnOrName, float]" required>
  Distance threshold.
</ParamField>

## Returns

<ResponseField name="return" type="Column">
  True if the 3D distance between a and b is ≤ `distance`.
</ResponseField>


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