简体   繁体   English

是否可以测试给定的网格是否是空心圆柱体(如管道)?

[英]Is it possible to test whether a given mesh is a hollow cylinder(like a pipe) or not?

I don't know much about geometric algorithms, but I just wanted to know if given a mesh, is there an algorithm that outputs a boolean which is true when the mesh is actually a hollow cylinder (like a straight pipe) or else, it will be false.我不太了解几何算法,但我只是想知道如果给定一个网格,是否有一种算法可以输出 boolean 当网格实际上是一个空心圆柱体(如直管)时,它是正确的,否则,它将是错误的。 Any reference to the algorithm if it exists would be helpful.对算法的任何引用(如果存在)都会有所帮助。

EDIT: I am relatively sure that the body has a surface mesh, basically the only the surfaces of the object is meshed and it uses triangles for meshing.编辑:我比较确定身体有一个表面网格,基本上只有 object 的表面是网格化的,它使用三角形进行网格化。

A key problem is to find the axis of the cylindre.一个关键问题是找到圆柱的轴线。 If it is known, you are done.如果它是已知的,你就完成了。 If it is unknown but the cylindre is known to be without holes and delimited by two perpendicular bases, the main axis of inertia can be used.如果未知但已知圆柱体无孔且由两个垂直底面界定,则可以使用惯性主轴。 Otherwise, it should be constructible from the coordinates of five points (A Cylinder of Revolution on Five Points http://www.cim.mcgill.ca/~paul/12ICGG6Aw.pdf ).否则,它应该可以从五个点的坐标构造(A Cylinder of Revolution on Five Points http://www.cim.mcgill.ca/~paul/12ICGG6Aw.pdf )。

When you know the axis, it suffices to check that the distance of every point to the axis is constant.当您知道轴时,只需检查每个点到轴的距离是否恒定即可。 In case the mesh describes a solid (ie a surface with thickness), make sure to pick the points on the outer surface, for example using the orientation of the normals.如果网格描述实体(即具有厚度的表面),请确保选择外表面上的点,例如使用法线的方向。 There will be two distances and the lateral faces must be ignored.将有两个距离,必须忽略侧面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM