Question about BSpline

Here is a data file with a cluster of three-dimensional points. Now we can form a BSpline surface.

 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] 

Now we can see the structure. But the problem is that I want to make a three-dimensional solid, and this structure has actually two visible holes.

enter image description here

In the next image we see that in both corners are open, and the structure is not solid, but actually empty.

enter image description here

So, I came up with a solution that, I am sure, can work visually, but does not return a solid structure.

 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]; 

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, 0,005}]]}] , pic}}]

Here is the conclusion. enter image description here

Now we export the third image, where the holes are visually closed as a * .obj file. We can import this file into any CAD-based editor, such as Meshlab . There you can see the discovered holes.

enter image description here

Now there is a simple way so that we can form a solid structure in Mathematica with data point data in the Foil.mat file. I expect some features may be available in the BSpline function to achieve this. As you might expect, I want to have a closed surface without holes.

I hope that I have explained my problem in sufficient detail. Wait for an answer.

BR

+4
source share
1 answer

You might want to learn TetGenLink , the "hidden function" in 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. 

Help image:

enter image description here

+4
source

All Articles