how to use stlwrite function options

Hi guys, i have to make a triangulation 3D of a solid of which i have the coordinates (x,y,z) of 20ooo points and i need to export the result (so the tetrahedra) to an stl file. How can I use properly the stlwrite function, in particular the option indicated with TRIANGULATION?
thanks a lot.

답변 (1개)

DGM
DGM 2025년 4월 5일
편집: DGM 2025년 4월 5일

0 개 추천

This obviously refers to FEX #20922. Assuming that the data is gridded, such as could be given to surf(), then:
[x y z] = sphere(21);
stlWrite('thing.stl',x,y,z,'triangulation','f')
By default, when given xyz data, the triangulation method is 'delaunay', which only works for data which is single-valued in x,y (e.g. a surface relief). If given something like this sphere, it will fail.
If you just have an unstructured list of xyz points (a point cloud), then that's a different story.

카테고리

도움말 센터File Exchange에서 Delaunay Triangulation에 대해 자세히 알아보기

질문:

2012년 6월 1일

편집:

DGM
2025년 4월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by