Notifications
Clear all

[Closed] meshop.weldVertsByThreshold in a Trimesh?

I need to weld some vertices at the base of a triMesh inside a Level 5 Scripted Plugin.
This code does nothing in my plugin, but works on an Editable Mesh.
So, I guess that meshop.weldVertsByThreshold doesn’t work in a Trimesh.
Is that truth? Is there any way to weld vertexs inside a ‘on buildMesh do …’ ?
Thanks

fn WeldSomeVertex theTriMesh Threshold:0.01 = (
	local vertsSel = for i = 1 to theTriMesh.numverts where (abs((getVert theTriMesh i).z) < Threshold) collect i

format "before: %
" theTriMesh.numverts

	meshop.weldVertsByThreshold theTriMesh vertsSel 1000 --Threshold

format "after: %
" theTriMesh.numverts

	theTriMesh
)

WeldSomeVertex myMesh AnyThreshold