如何检测开放网格3D模型的边界顶点? [英] How to detect border vertices of an open mesh 3d model?

查看:54
本文介绍了如何检测开放网格3D模型的边界顶点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有两种表面网格模型,一种是封闭球体(如球体或立方体),另一种是开放网格模型,这意味着该模型的表面不是处于闭环状态.它像空心管一样从某个地方打开.Sp我想要的是我要检测开放网格模型的边界顶点.在闭环网格中没有边界,但是在开放网格中,我们必须检测一些平滑,细分等操作的边界顶点.请建议我如何选择/检测边界顶点?这样做的最佳方法是什么?通过比较三角形的边缘?给我一些想法吗?

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 ?

谢谢.

推荐答案

假定您有一个流形网格,那么网格的边界就是那些仅属于一个多边形的边.不在边界上的边将属于两个多边形.边界顶点是属于边界边缘的顶点.

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.

这篇关于如何检测开放网格3D模型的边界顶点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆