Pla*_*iac 5 geometry wolfram-mathematica mesh cad
这是一个包含 3D 点簇的数据文件。现在我们可以从中形成一个BSpline
表面。
dat=Import["C:\\Users\\Andy\\Desktop\\Foil.mat"];
surface=BSplineFunction[dat];
ParametricPlot3D[surface[x,y], {x, 0, 1}, {y, 0, 1},
MaxRecursion->4,Axes->None,Mesh->All,Boxed->False]
Run Code Online (Sandbox Code Playgroud)
现在我们可以看到结构了。但问题是我想制作一个 3D 实体,而这个结构实际上有两个可见的孔。
在下一张图片中,我们可以看到两个角落都是开放的,结构不是实心的而是空心的。
所以我想出了一个解决方案,我确信它可以在视觉上工作,但不会返回一个坚实的结构。
pic=Show[Graphics3D[
{Polygon[Table[surface[0,y],{y,0,1,0.005}]],
Polygon[Table[surface[1,y],{y,0,1,.005}]]}],
ParametricPlot3D[surface[x,y],{x,0,1},{y,0,1},
MaxRecursion-> 4,PlotPoints-> 20,
Mesh-> All],Boxed->False,Axes-> None];
Run Code Online (Sandbox Code Playgroud)
GraphicsGrid[ {{ParametricPlot3D[surface[x,y],{x,0,1},{y,0,1}, PlotPoints-> 20,Mesh-> All,Boxed->False,Axes-> None], Graphics3D[{Polygon[Table[surface[0,y],{y,0,1,0.005}]],Polygon[Table[surface[1,y],{y,0,1,.005}]]} ], 图片}}]
这是输出。
现在我们将孔在视觉上闭合的第三张图片导出为 *.obj 文件。我们可以在任何基于 CAD 的网格编辑器(如Meshlab )中导入该文件。在那里可以看到要检测的孔。
现在有一种简单的方法可以让我们在 Mathematica 中使用Foil.mat文件中的给定数据点形成实体结构。我希望BSpline
函数中可能有一些选项可以实现这一点。正如人们所料,我想要一个没有孔的封闭表面。
希望我已经能够足够明确地解释我的问题。将等待您的回复。
BR
您可能想探索TetGenLink
Mathematica 中的一个“隐藏功能”。
TetGen is a quality tetrahedral mesh generator and a three-dimensional
Delaunay triangulator.
TetGenLink is a Mathematica application that uses Wolfram Library Link
to link to TetGen functions. It is used automatically by Mathematica for
various operations such as interpolation in three-dimensional convex domains.
However, it can also be used directly where it gives a flexible and innovative
way to use the functionality of TetGen.
Run Code Online (Sandbox Code Playgroud)
图片来自帮助:
归档时间: |
|
查看次数: |
368 次 |
最近记录: |