將sfmesh/IndexSurface中座標距離在給定閾值內的頂點焊接在一起(紋理座標差異也要在閾值內),並移除重複頂點。
文法
sfmesh ST_3DRemoveDuplicateVertex(sfmesh sfmesh, float8 dist_threshold);傳回值
返回焊接後的sfmesh對象。
參數
參數名稱 | 描述 |
sfmesh | 模型對象。 |
dist_threshold | 焊接距離閾值。 |
描述
將sfmesh/IndexSurface中空間座標距離、紋理座標差異在給定閾值內的頂點焊接在一起,其中距離計算使用笛卡爾座標系距離。
效果示意
原資料(50.2 MB)

頂點焊接結果(20.2 MB): dist_threshold = 0.01

頂點焊接結果(3.3 MB): dist_threshold = 0.1

頂點焊接結果(0.63MB): dist_threshold = 1 (會丟失大量細節)

樣本
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}]}