How can I extrude a 2D patch?
5 次查看(过去 30 天)
显示 更早的评论
Hi, my objective is to have a gear profile like the one below extruded so that I can then convert the 3D gear into a STL file and send it to a 3D printer.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1040105/image.png)
What I've tried to do, as the above are only discrete points, is to triangulate the surface using the delaunay function. That gave me the following result, which is of course bad:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1040110/image.png)
By applying example 6 from https://www.mathworks.com/help/matlab/math/creating-and-editing-delaunay-triangulations.html I managed to get something like this, which is perfect:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1040115/image.png)
The red gear was made with the delaunayTriangulation function with arguments (x,y,C) and eliminating all the triangles outside the gear profile. What I don't really get is how to create another identical patch but with different z coordinates and then join them together to get a 3D gear. I've been able to do it with the 3D delaunay function but what I get is an extrusion of the blue gear, like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1040120/image.png)
Is there a way to filter out the triangles in the 3D triangulation outside the gear profile or to extrude the 2D red patch?
Thank you in advance guys :)
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!