All Products
Search
Document Center

PolarDB:ST_3DRemoveDuplicateVertex

Last Updated:Feb 29, 2024

This topic describes the ST_3DRemoveDuplicateVertex function. This function welds vertices of the sfmesh or IndexSurface object whose coordinate distance is within the specified threshold (texture coordinate difference is also within the threshold) and removes duplicate vertices.

Syntax

sfmesh ST_3DRemoveDuplicateVertex(sfmesh sfmesh, float8 dist_threshold);

Return values

The welded sfmesh object is returned.

Parameters

Parameter

Description

sfmesh

The sfmesh model object.

dist_threshold

The distance threshold.

Description

This function welds vertices of the sfmesh or IndexSurface object whose coordinate distance and texture coordinate difference are within the specified threshold. Cartesian coordinate system is used in the distance calculation.

Sketch maps

  • Raw data (50.2 MB)

    image.png

  • Vertex-welded results (20.2 MB): dist_threshold = 0.01

    image.png

  • Vertex-welded results (3.3 MB): dist_threshold = 0.1

    image.png

  • Vertex-welded results (0.63MB): dist_threshold = 1 (some details lost)

    image.png

Examples

SELECT ST_AsText(ST_3DRemoveDuplicateVertex('MESHGEOM(PATCH(INDEXSURFACE(VERTEX(0 0 0, 1 0 0, 0 1 0, 1 0.01 0, 0.01 0 0, 0 -1 0), INDEX((0,1,2),(3,4,5)))))'::meshgeom, 0.1));
-------------------------------------------------------------------------------------------------
 {"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(0 0 0,1 0 0,0 1 0,0 -1 0),INDEX((0,1,2),(1,0,3)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}