PDA

View Full Version : meshop.weldVertsByThreshold in a Trimesh?


fferro2
07-28-2008, 06:17 PM
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: %\n" theTriMesh.numverts

meshop.weldVertsByThreshold theTriMesh vertsSel 1000 --Threshold

format "after: %\n" theTriMesh.numverts

theTriMesh
)

WeldSomeVertex myMesh AnyThreshold

CGTalk Moderation
07-28-2008, 06:17 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.