Hi, welcome to the forum.
You’ll need to use the triangle information to know which triangles are neighbours of which ones, and also know the angles between them, to separate the boundary that forms the feature you want.
I will write you an algorithm in pseudocode (which means it is not written in any programming language, but more like english). You can ask later how to implement specific algorithm lines.
The algorithm starts with the selected triangle and basically grows the set of processed triangles by finding the neighbours to active triangles. A neighbour is added only if the angle between the selected triangle and the new one is less than a threshold. When no more triangles can be added, the algorithm stops and returns the set of triangles which form the selected mesh feature.
Let angleThreshold = 35 degrees Let T = the set of triangles of the object. Let t be the selected triangle in T Let U be a set, initially equal to T. It is the set of unprocessed triangles. Let A be a set, which initially contains only the triangle t. It is the set of active triangles. Let R be the result triangle set, initially empty. While A is not empty do: Take out the triangle t from A. Take out the triangle t from U. Put the triangle t into R. Let N be the set of triangles from U which are neighbours of t and its normal form an angle less than angleThreshold degrees whith the normal of t. If N is not empty: Add the triangles in N to the set A, if they are not already. End If Let t be a triangle of A, if A is not empty. End While Return R.