This topic describes the ST_3DDifference function. This function calculates the difference between a 3D model and a box3d or meshgeom object.

Syntax

sfmesh ST_3DDifference(sfmesh sfmeshObject, box3d box);
sfmesh ST_3DDifference(sfmesh sfmeshObject, meshgeom geom);

Parameters

ParameterDescription
sfmeshObjectThe sfmesh object.
boxThe box3d object.
geomThe closed meshgeom object.

Description

The result is synchronously updated to the UV and Normal values that are associated with the sfmesh object.

  • If this function calculates the difference between an sfmesh object and a box3d object, this function aligns the axes and returns the difference.
  • If this function calculates the difference between an sfmesh object and a meshgeom object, this function directly returns the difference.

Examples

SELECT ST_NumPatches(ST_3DDifference(ST_3DMakeSphere(1.0, 5), 'BOX3D(0 0 0, 0.2 0.2 0.2)'::box3d));
-----------------
         20480