Here is a data file with cluster of 3D points. Now we can form a BSpline
surface out of that.
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 3D solid and this structure has actually two visible holes.
In the next picture we can see that at both corners are open and the structure is not solid but actually hollow.
So I came up with a solution which I am sure may 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,.005}]]}], pic}}]
Here goes the output.
Now we export the third picture where the holes are visually closed as an *.obj file. We can import that file in any CAD based mesh editor like Meshlab. There one can see the holes to be detected.
Now is there a simple way so that we can form a solid structure in Mathematica with the given data points in the Foil.mat file. I expect some options might be available with in the BSpline
function to achieve this. As one can expect I want to have a closed surface with no holes.
Hope I have been able to explain my problem explicitly enough. Will wait for your reply.
BR
You may want to explore TetGenLink
, a "hidden feature" 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.
Image from the help:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With