从 Mathematica 曲面网格生成四边形网格
我正在尝试从 Mathematica 生成的表面网格(主要是三角形)制作四边形网格。我不是在寻找高质量的网格划分器,而是在寻找一种简单的解决算法。我使用 GMSH 在外部执行此操作。我们可以利用 Mathematica 的 CAD 导入功能来生成 Mathematica 内核可以理解的 3D 几何图形。
我们可以看到导入的 Geometry3D 对象以及它们所组成的每个多边形的边数图。可以看出,形成网格的多边形并不总是三角形。
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}]
现在我正在寻找一种算法,用于根据 MMA 可用的多边形信息形成四边形网格。任何简单的解决方案都是非常受欢迎的。我所说的简单解决方案是指,它在非常一般的设置(网格由边数超过 5 或 6 的多边形组成)中不起作用,并且与商业软件相比,效率可能相当低。但可以看到,除了少数昂贵的商业四边形表面网格生成器之外,可用的四边形表面网格生成器并不多。
BR
I am trying to make a quadrilateral mesh from a surface mesh (which is mostly triangular) generated by Mathematica. I am not looking for high quality mesher but a simple work around algorithm. I use GMSH for doing it externally. We can make use of Mathematic's CAD import capabilities to generate 3D geometries that are understood by the Mathematica kernel.
We can see the imported Geometry3D
objects and the plots of number of sides in each polygons they consist of. It become visible that the polygons that form the mesh 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}]
Now what I am looking for is an algorithm to form a quadrilateral mesh from that polygon information available to MMA. Any easy solution is very much welcome. By easy solution I mean which is not going to work in a very general setting (where mesh constitutes of polygons with sides more than 5 or 6) and which might be quite inefficient compared to commercial software. But one can see that there are not many quadrilateral surface mesh generator available other than few expensive commercial one.
BR
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无论输入拓扑如何,这都会生成四边形:
this will produce quads regardless of the input topology: