简体   繁体   English

如何剪切现有的3D曲面网格以使用对称性

[英]How to cut existing 3D Surface Mesh in order to use symmetry

I am currently working on a structural mechanics problem in which I need to cut an existing 3D surface mesh in order to use symmetry in MATLAB or GMSH . 我目前正在研究结构力学问题,我需要切割现有的3D表面网格,以便在MATLAB或GMSH中使用对称性。

First attempt: I obtained the symmetry by first deleting all nodes on the negative x-axis; 第一次尝试:我通过首先删除负x轴上的所有节点来获得对称性; then use delaunayTri() to get 3D tetrahedral mesh. 然后使用delaunayTri()来获得3D四面体网格。 After which, I used freeboundry() matlab function to get the surface mesh. 之后,我使用freeboundry() matlab函数来获取表面网格。 Using this approach, some of the nodes were ignored hence I lost the actual geometry (ie biconcave shape in 3d) and symmetry. 使用这种方法,一些节点被忽略,因此我失去了实际的几何形状(即3d中的双凹形状)和对称性。

Second attempt: I obtained the symmetry by first deleting all nodes on the negative x-axis; 第二次尝试:我通过首先删除负x轴上的所有节点来获得对称性; then use AlphaHull() matlab function from file exchange which uses an alpha shape algorithm. 然后在文件交换中使用AlphaHull() matlab函数,该函数使用alpha形状算法。 Here, I have to define a scalar parameter called alpha radius whose value affect the quality of the surface mesh but no well defined range hence I can't automate for larger mesh; 在这里,我必须定义一个名为alpha radius的标量参数,其值会影响曲面网格的质量,但没有明确定义的范围,因此我不能自动化更大的网格; more importantly, there are some residual surface or tetrahedral mesh within the 3D surface mesh generated. 更重要的是,在3D表面网格内部产生了一些残余表面或四面体网格。

Attached are 3 files (in one zip file): 附件是3个文件(在一个zip文件中):

  1. Original GMSH file; 原始GMSH文件;
  2. Extracted node coordinates and 提取的节点坐标和
  3. Extracted element connectivity array from GMSH file (txt format). 从GMSH文件中提取的元素连接数组(txt格式)。

https://www.dropbox.com/s/7xwkyvqy13k5o33/get_symmetry.zip?dl=0 https://www.dropbox.com/s/7xwkyvqy13k5o33/get_symmetry.zip?dl=0

NB: I do not wish to add additional nodes to the new symmetry as the current node coordinates and connectivity are very important in my computation, but if compulsory, additional nodes may be introduced. 注意:我不希望在新的对称性中添加额外的节点,因为当前节点坐标和连接在我的计算中非常重要, 但如果是强制的,可能会引入额外的节点。 I will however appreciate any assistance and/or suggestions. 不过,我会感谢任何协助和/或建议。

Thank you in advance. 先感谢您。 期望的对称性

You can first define intersection between your mesh and the plane with using this peuso algorithm 您可以使用此peuso算法首先定义网格和平面之间的交集

  1. define egde matrix for your mesh (eg a row is composed of node index that constitute the edge) 定义网格的egde矩阵(例如,行由构成边的节点索引组成)
  2. compute signed distance between each node of the mesh and plane 计算网格和平面的每个节点之间的有符号距离
  3. find egde with one positive and one negative distance 找到一个正距离和一个负距离的egde
  4. compute intersection between edge and plane to create new nodes 计算边和平面之间的交叉点以创建新节点
  5. find triangles with intersected edges and split triangle (in general case, you need to create three triangles) 找到具有交叉边和三角形的三角形(通常情况下,您需要创建三个三角形)
  6. remove all triangles for which nodes are not in the right side of the plane 删除节点不在平面右侧的所有三角形

I think you can find slution for each of these steps in stackoverflow 我认为你可以在stackoverflow中找到每个步骤的slution

Then 然后

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

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