ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
fn WeldMesh obj split: thresh: = (if thresh == unsupplied or thresh <= 0 do thresh = .01
if split == unsupplied or split < 1 do split = 1
if not isKindOf obj Editable_Mesh doif canConvertTo obj Editable_Mesh do
convertToMesh obj
if isKindOf obj Editable_Mesh do(
local _openEdges = meshop.getOpenEdges
local _EdgeVerts = meshop.getVertsUsingEdge
local _weldVerts = meshop.weldVertsByThreshold
local vList = _EdgeVerts obj (_openEdges obj)if split == 1 then _weldVerts obj vList thresh
else(-- your own implementation does here...)))
no not attaching meshes. I need to weld one large triangulated mesh. Welding as it is takes forever or crashes since there is a lot of vertices to weld.
Another recommended method is to detach your mesh in several parts, use this function on individual parts, then attach piece by piece select open edges and convert selection to vertex and then use weld operation from command panel. This is better then do it all at once.
Comments
try this too
my recent MAXScripts RSS (archive here)
Hi Anubis, Maybe i'm wrong
Hi Anubis,
Maybe i'm wrong but converting hires objects to mesh in this case can slow down the process.What do you think?
bga
Yes, sure
But as the question was about meshes,
I just make the function user friendly.
my recent MAXScripts RSS (archive here)
Do you mean attach hi-res
Do you mean attach hi-res meshes?
bga
no not attaching meshes. I
no not attaching meshes. I need to weld one large triangulated mesh. Welding as it is takes forever or crashes since there is a lot of vertices to weld.
weldByThreshold
This is the simple function that works on editable poly and mesh objects. Maybe this can help but not sure.
bga
Another recommended method is
Another recommended method is to detach your mesh in several parts, use this function on individual parts, then attach piece by piece select open edges and convert selection to vertex and then use weld operation from command panel. This is better then do it all at once.
bga
Thanks I think this is what I
Thanks I think this is what I will have to do. Make selections by a grid and weld small groups at a time. Although this may still take a long time....