Checks whether two 3D geometry objects or 3D models intersect.
Syntax
bool ST_3DIntersects(meshgeom geom1, meshgeom geom2);
bool ST_3DIntersects(meshgeom geom1, box3d box);
bool ST_3DIntersects(sfmesh sfmeshObject1, sfmesh sfmeshObject2);Parameters
| Parameter | Type | Description |
|---|---|---|
geom1, geom2 | meshgeom | A meshgeom object. |
box | box3d | A box3d object. |
sfmeshObject1, sfmeshObject2 | sfmesh | An sfmesh object. |
Supported geometry types
ST_3DIntersects supports the following input combinations:
Two
meshgeomobjectsA
meshgeomobject and abox3dobjectTwo
sfmeshobjects
Return value
Returns true if the objects intersect, false if they do not. Returns NULL if the function fails.
Example
The following query checks whether two meshgeom objects intersect. The geometries do not share any 3D space, so the result is false.
select ST_3DIntersects(
'MESHGEOM(PATCH(TRIANGLESTRIP Z(0 0 0,0 10 0,0 0 10,0 10 10), POINT Z(0 0 0)))'::meshgeom,
'MESHGEOM(PATCH(LINESTRING(-1 0 0, -1 -0.5 0)))'::meshgeom);Expected output:
st_3dintersects
-----------------
f