Hi,
Is it a bug or not when I call function mesh.Unweld(0, true) ngons are gone.
If not why ngons disappears after this method?
ngons.gh (118.9 KB)
Hi,
Is it a bug or not when I call function mesh.Unweld(0, true) ngons are gone.
If not why ngons disappears after this method?
ngons.gh (118.9 KB)
To mee it looks like the “ngons” consists of “bundles of faces” that are welded, and the ngon-bundles in turn seems separated from other ngons by unwelded edges. Is that so? (or are the sharp edges of the ngons a line-thickness thing?).
If so, then unwelding the ngons must by necessity fall apart, since all triangles will then have separate vertices.
It seems that the entire mesh is re-triangulated on unweld, into triangle area-sizes that are closer to the areas of the ngons (could be intentional so as to not cause too dense mesh on unweld?).
Just my wildest speculations.
// Rolf
Black lines are just display thing, to show outline of ngons. The bunny is closed mesh.
I was also wondering if after unwelding mesh gets coincident points and edges.
Yes, that’s what happens on unweld = 0: It produces unique vertices for all edge ends / faces corners.
// Rolf
Hi Petras,
Rolf is basically right. In Rhino, an ngon is a group of co-planar, adjacent faces that share welded (both faces have the same vertex index at both ends) interior edges. The interior edges are not drawn. Fundamentally a Rhino mesh is still made up of quads and triangles despite looking otherwise when ngons are present. So you probably, at least initially, have a mesh that’s a bunch of triangles but you’re only seeing the ngon boundaries, not the triangles. As soon as you call unweld with an angle of zero, you essentially make a duplicate vertex for each corner of each face. Every edge becomes unwelded. I haven’t looked at the code so I can’t tell you for sure, it may be that ngons persist but you wouldn’t know it because each ngon will contain a single face and have the same boundary as the face it contains. Run the “List” command after you’re done and you’ll know for sure.
Let me know if I wasn’t clear.
Cheers,
Tim
BTW, Unweld, and Weld for that matter, only act on vertexes and their one to one partners, ie. vertex normals, texture coordinates, vertex colors, etc. It does nothing to the mesh faces except possibly change the vertex index of the face corners. It does not change the face count of the mesh, nor does it change the shape or vertex count of any individual face. ShowEdges is a good command to use if you want to see the before and after of Un/Weld effects on a mesh.
Tim
This idea that NGons are just welded quads underneath probably explains why I noticed the below - with the highlight shade selected style, clicking an ‘NGon’ (which is a single entity you can click), you see the line to make it a quad underneath.
I was trying to do a script to extract / fish out NGons. I was using the V7 MergeFace quite a bit, which will leave you with ‘split’ mesh faces in many cases. Where there is just a stray point you can’t delete. That’s where the Collpase comes in use.
Interesting that it seems if you run CollapseMeshVertex on a Mesh with an ‘NGon’, it breaks the NGon back down into some configuratio of Quads/Tris.