This topic describes the ST_NumPatches function. This function returns the number of faces from a meshgeom or sfmesh object.

Syntax

int4 ST_NumPatches(meshgeom geom);
int4 ST_NumPatches(sfmesh sfmesh);

Parameters

ParameterDescription
geomThe meshgeom object.
sfmeshThe sfmesh object.

Description

This function returns the number of faces from a meshgeom or sfmesh object.

Examples

select ST_NumPatches('MESHGEOM(PATCH(INDEXSURFACE(VERTEX(0 0 2,0 10 3,10 10 1,10 0 1), INDEX((0,1,2),(1,2,3)))))'::meshgeom);

---------------
2