Create a quadrilateral mesh from a Mathematica surface mesh

I am trying to make a quadrangular mesh from a surface mesh (which is basically triangular) created by Mathematica. I am not looking for a high quality mesher, but a simple algorithm of work. I use GMSH to do this externally. We can use Mathematic CAD import capabilities to create 3D geometries that are understood by the Mathematica kernel.

We can see the imported Geometry3D objects and graphs of the number of sides in each of the polygons of which they consist. It becomes visible that the polygons that form the grid are not always triangles.

 Name3D=RandomChoice[ExampleData["Geometry3D"][[All,2]],6]; AllPic= Table[ Vertex=ExampleData[{"Geometry3D",Name3D[[i]]},"VertexData"]; Polygons=ExampleData[{"Geometry3D",Name3D[[i]]},"PolygonData"]; GraphicsGrid[ {{ListPlot[#,Frame-> True,PlotLabel->Name3D[[i]] ]&@(Length[#]&/@Polygons), Graphics3D[GraphicsComplex[Vertex,Polygon[Polygons]],Boxed-> False]}} ,ImageSize-> 300,Spacings-> {0,0}], {i,1, Length@Name3D }]; GraphicsGrid[Partition[AllPic,2],Spacings-> {0,0}] 

enter image description here

Now what I'm looking for is an algorithm for generating a four-sided grid from this polygonal information available for MMA. Any simple solution is greatly appreciated. As an easy solution, I mean that it will not work in a very general mode (where the grid is polygons with sides greater than 5 or 6) and can be very inefficient compared to commercial software. But you can see that there is not a large number of four-sided surface mesh generator, except for a few expensive commercial ones.

BR

+6
source share
1 answer

this will create quads regardless of the input topology:

  • insert one vertex in the center of each face
  • insert one vertex in the middle of each edge
  • insert the edges connecting each central vertex of the graph with the vertices of the middle of the middle of the edge
0
source

Source: https://habr.com/ru/post/902033/


All Articles