There are two kinds of surface mesh models, closed mesh like a sphere or a cube and the second one is the open mesh model which means the surface of the model is not in a closed loop. It is open from somewhere like a hollow pipe. Sp what I want is I want to detect the border vertices of the open mesh model. there is no border in closed loop mesh but in open mesh we have to detect border vertices for some smoothing, subdivision, etc. operations. Kindly, suggest me how can I select/detect border vertices ? what is the optimal way to do this ? by comparing edges of the triangles ? Give me some idea ?
Thanks.
A mesh has borders if has some half-edges without neighbors. A mesh has non-manifold edges if we find some half-edge with more than one neighbor. Procedure SearchCount (V,W) searches and counts how many times the half-edge (V,W) is found in the remaining triangles of the mesh (excepting t).
The perimeter of a polygon is the total length of the boundary. For a triangle, we can find it by adding the lengths of its three sides. So, if ABC is a triangle. We find the perimeter of triangle ABC by adding the length of all the three sides.
Assuming that you have a manifold mesh, then the border of the mesh are those edges which belong to only one polygon. Edges that are not on the border will belong to two polygons. The border vertices are the vertices that belong to the border edges.
A naive way to find the border vertices is to iterate through all your edges, count how many polygons they belong to, and if they only belong to one polygon, then collect the edge's vertices as border vertices. You will have to remove duplicates vertices from your collection, though.
A second approach is to have your mesh data structure examine each edge as they are added to the mesh, or as polygons are attached to particular edges. In this way, the mesh data structure can keep a list of up-to-date border edges for you, so that when you needed the edges you would not have to find them each time. This will greatly reduce the overhead of determining border edges, although inserting edges and polygons will be slightly more expensive. Your mesh data structure will also take up a bit more memory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With