How could I create stl file based on the ellipsoid command?
3 次查看(过去 30 天)
显示 更早的评论
I try several methods to write an stl file based on the ellipsoid geometry.
But I haven't find way to successfully do it.
Following is my code
clear
clc
close all
[x, y, z] = ellipsoid(0,0,0,5.9,3.25,3.25,30);
s=surf(x,y,z)
p=surf2patch(s)
%Extract faces and vertices from structure p
pf=p.faces
pv=p.vertices
tr=triangulation(pf,pv)
stlwrite(tr,'ell.stl')
The message ''Tetrahedron triangulation is not supported.'' appears, I know I could use ''boundaryFacets'' command to solve this problem, but I don't know how to create an alphaShape of ellipsoid.
Could anyone gives me a hint?
0 个评论
采纳的回答
Aditya Patil
2020-12-24
stlwrite only support triangles.
shp = alphaShape(tr.Points)
[F,P] = freeBoundary(tr)
trNew = triangulation(F,P)
stlwrite(trNew, "freeboundary.stl")
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bounding Regions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!