3
votes

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.

First attempt: I obtained the symmetry by first deleting all nodes on the negative x-axis; then use delaunayTri() to get 3D tetrahedral mesh. After which, I used freeboundry() matlab function to get the surface mesh. Using this approach, some of the nodes were ignored hence I lost the actual geometry (i.e. biconcave shape in 3d) and symmetry.

Second attempt: I obtained the symmetry by first deleting all nodes on the negative x-axis; then use AlphaHull() matlab function from file exchange which uses an alpha shape algorithm. 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; more importantly, there are some residual surface or tetrahedral mesh within the 3D surface mesh generated.

Attached are 3 files (in one zip file):

  1. Original GMSH file;
  2. Extracted node coordinates and
  3. Extracted element connectivity array from GMSH file (txt format).

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

N.B: 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. Desired symmetry

1
You will have to introduce additional points to be able to cut this mesh, as you are not only cutting along edges, but through faces...knedlsepp
@ knedlsepp, thanks, I reason along with you! Introducing additional points is allowed!Adesola Ademiloye
Honorable colleagues, am still waiting for your kind input and assistance please.Adesola Ademiloye
This will probably require quite some manual effort... Look for mesh plane intersection on the fileexchangeknedlsepp

1 Answers

2
votes

You can first define intersection between your mesh and the plane with using this peuso algorithm

  1. define egde matrix for your mesh (e.g a row is composed of node index that constitute the edge)
  2. compute signed distance between each node of the mesh and plane
  3. find egde with one positive and one negative distance
  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

Then