How to import geometry from STL without approximation ?
6 次查看(过去 30 天)
显示 更早的评论
Hi all.
I'm now trying to generate geometry from stl file.
ImportGeometry from .stl makes too low density of vertices(and edges) to simulate because of approximation.
In this reason, I added more vertices to original geometry.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/723809/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/723814/image.jpeg)
However, adding additional viertices without adding edges makes bad mesh boundary.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/723819/image.jpeg)
Is there any method to import all vertices of stl file or increse vertices density of geometry?
Thanks.
0 个评论
采纳的回答
darova
2021-8-29
Here is an example. Read more: 2-D Geometry Creation at Command Line
t = 0:0.2:2*pi; % make sure the curve is unclosed (decsg throws an error)
r = 5 + sin(5*t);
[x,y] = pol2cart(t,r);
dl = [2; length(x); x(:); y(:)]; % [polygon; # of points; x; y]
gd = decsg(dl); % decomposition
[p,e,t] = initmesh(gd,'Hmax',0.5); % max side triangle 0.5
pdemesh(p,e,t);
hold on
plot(x,y,'.g')
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geometry and Mesh 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!