ExtractMeshEdge -unwelded API

In Rhino GUI, I can use ExtractMeshEdge to get the unwelded edges of mesh. I’m wondering how can I do it with Rhinocommon API?

I only found mesh.GetNakedEdges() which is the same as ExtractMeshEdge with Naked edge.

Or any other API that can get the outer polyline will help, thanks.

Maybe this can help (provited that the Mesh is valid and manifold):

That said a naked edge is one that has one adjacent Face (see RC for stuff related with Mesh Connectivity (Vertices, Edges and Faces)). Note that if an edge has both ends (Vertices) naked … then may (or may not) be naked. Finally keep in mind that the indexing used in the naked Vertices related RC Method is the Mesh Vertices indexing (NOT the Mesh Topology Vertices indexing).