I would like to import data from an STL file of a 3D object to MATLAB and create a 2D contour plot of it. Does anyone have any ideas about this? Thanks!

32 visualizzazioni (ultimi 30 giorni)
I am trying to create a contour plot showing the thickness of this odd shaped 3D body similar to a topography map. If I had a matrix of x and y coordinates with the thickness at those locations (not just height but thickness) then I could create a contour plot. I do not know how to import the STL to MATLAB however and extract this information from it. Any tips would be greatly appreciated!

Risposta accettata

Walter Roberson
Walter Roberson il 30 Giu 2016
https://www.mathworks.com/matlabcentral/fileexchange/22409-stl-file-reader

Più risposte (1)

Ahmet Cecen
Ahmet Cecen il 30 Giu 2016
STL files have a very specific format you can exploit to gather your data automatically. Try using "textscan" followed by "strsplit" to get the x, y, z coordinates of the vertices.

Categorie

Scopri di più su Model Import in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by