This topic describes the ST_Contains function. This function checks whether a closed 3D volume contains a 3D geometry object or 3D model.

Syntax

bool ST_3DContains(meshgeom geom1, meshgeom geom2);
bool ST_3DContains(sfmesh sfmeshObject1, sfmesh sfmeshObject2);

bool ST_3DContains(box3d box3d, meshgeom geom);
bool ST_3DContains(box3d box3d, sfmesh sfmeshObject);

Parameters

ParameterDescription
geomThe meshgeom object.
sfmeshObjectThe sfmesh object.
box3dThe box3d object.

Description

  • This function checks whether a meshgeom, sfmesh, or box3d object contains a meshgeom or sfmesh object.
  • sfmesh1 must be a closed sfmesh object.
  • If this function fails, NULL is returned.

Examples

SELECT ST_3DContains(
    'MESH(INDEXSURFACE  Z(VERTEX(0 0 0,0 10 0,0 0 10,10 0  0), INDEX((0,1,2),(1,0,3),(3,0,2),(2,1,3))))'::meshgeom,
    'MESH(TRIANGLESTRIP Z(0.1 0.1 0.1,0.1 1 0.1,0.1 0.1 1,0.1 1 1))'::meshgeom);

---------------
 t