Can you make a script to pick only unwelded edges as seams?

Hello, can you make a script that, within _Unwrap
command, limits the picking of seams of a polygonal mesh to only unwelded edges (the ones which are highlighted by Edge Analisys tool , when “All edges” is selected.

Are looking for the naked egdes? If so, Rhino mesh objects have a method called GetNakedEdges() that returns all edges of the mesh in question that are considered “naked” (cf. here).

No… aren’t naked. Here’s a video for better explanation. It would help a lot to have something that changes the behavior of clicking and dragging (square selection) to select only the edges marked in purple avoiding the selection of the black ones.
If those edges are being recognized as different (unwelded, for what I know) and marked in purple by edge analysis tool, i guess there must be a way to programmatically identify those edges and deselect all the others. Doing this would hugely help in the unwrapping process of any mesh.

Hi @Bruno_E1, below is a script which only allows selection of those mesh edges: (1.8 KB)

To use this (nested) inside _Unwrap command, some special workflow is required. First save the script somewhere on your harddrive and make a new button with the following command:

_-RunPythonScript “C:\YourPathToScriptFile\”

You’ll need to provide the proper location in above example file path. Try the button before doing the next step, it should allow to select by picking or window and crossing selection and it should keep selected mesh edges selected after the command is run.

Now, start _Unwrap, select the mesh(es) as usual, when it asks for the seam selection, click on your new button (this runs the script) and just window select over the mesh(es) to select all naked, unwelded edges. Press _Enter twice to unwrap.



It’s simply perfect Clement. A powerful script. I believe it should be implemented in the future releases because it makes unwrapping of not all-quad meshes much easier. Can’t thank you enough!
It could be further improved if you could enable and disable this “selecting behavior”.
Without this script , in many unwrapping situations you cant select some “edge loops” because of the many triangles with edges below tangency tolerance, so you can’t use chain selection.
The reason you just want to select unweld edges is because if you unwrap selecting a welded (black) edge instead, the resulting UV map is still considered connected in that point by any other software like Unreal Engine and 3D coat. That causes an overlapping between UV “isles” that in Rhino UV editor is not graphically represented.

@pascal and @DavidEranen, would it be possible to add a toggle to the _Unwrap Command’s seam selection prompt like _UnweldedOnly=True ?

IMHO the problems outlined by @Bruno_E1 show some real drawbacks of Rhino’s unwrapping capabillities which is why i wrote my own selection hack some time ago. It could also be implement by a new option to just select all unwelded edges with a single click. (Similar to the _SelectNakedEdges Option in the _AlignMeshVertices command)

Btw. since seams play an important role for UV unwrap preparation, wouldn’t it make sense to add the chain selection prompts to the _UnweldEdge command as well ? This way seams could be defined physically, outside of the _Unwrap Command and the changes are present for exporting the mesh to other apps.


Hi @clement,

I’ve logged the wish.

– Dale

1 Like

RH-58823 is fixed in the latest WIP