@Sven you've been very clear, thanks. i ask an other question, to better understand.
my set of p x-y-z describes a 3D surface that i can see properly in matlab (using plot3 or trisurf), as you say.
to write the stl, I can use directly the function "stlwrite"?
Does this make a triangulation of my 3D coordinates?
In that case, which options I have to give to the function to make it works properly? because I have tried many ways, but when i give 'triangulation' it wants other options and values, and I don't know what to put into.
thanks again!
@Nick: If you create a Delaunay triangulation from a set of p X-Y-Z points:
dt = DelaunayTri(x,y,z)
The result (dt.Triangulation) will not be a "triangular surface mesh". You'll notice that the result is an n-by-4 matrix. This means that each row in the triangulation represents a tetrahedron - a small *solid* with 4 triangular faces - not a surface triangle.
STL format describes surface triangles rather than tetra solids. Perhaps you want the convex hull of your points? (ie, only the *outermost faces* of all of your tetra solids) Note this will only work if your simple solid body is in fact convex.
Here's my advice: plot to the screen before trying to write to an STL file. If you can get a 3d surface plot (using patch, trisurf, etc) working in MATLAB first, *then* you will be able to write to STL without problems.
hi, I have a set of coordinates of a simple solid body, and I have to create finite volumes to work on. So I made a 3D Delaunay triangulation, and I have now a n-by-4 matrix with the points of resultant tetrahedron. Now, I need to create a .stl file to export this work. how do I do this? Is it possible? Because in the option There is only the voice for a triangulation in 2D. Thanks a lot.
Comment only