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!