This topic describes the ST_MeshFrommeshGeom function. This function constructs an sfmesh object from a meshgeom object.

Syntax

sfmesh ST_MeshFromMeshGeom(meshgeom geom);

Parameters

Parameter Description
geom The meshgeom object.

Description

This function constructs an sfmesh object from a meshgeom object. This function serves the same as the explicit type conversion meshgeom::sfmesh.

Examples

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

------------------------------------------------------------------------------
{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE(VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}