This topic describes the ST_Clip function. This function uses a closed meshgeom object to clip a scene model and returns the part inside the meshgeom object.

Syntax

scene  ST_Clip(scene sc, meshgeom geom, float8 scale);

Parameters

ParameterDescription
scThe scene object.
geomThe meshgeom object.
scaleThe scale of the image.

Description

The ST_Clip function uses the same syntax as the ST_Intersection function. However, the ST_Clip function supports more custom clipping functions. For more information, see ST_Intersection.

  • Original modelysmx
  • Model after clipping (the central part of the original model)csmx

Examples

SELECT ST_AsText(ST_Clip(scene, ST_3DMakeCuboid(1,1,1), 0.1)) from t;
--------
{"type" : "gltf", "content" : {"accessors":[{"bufferView":0,......