Extra faces when going from point cloud to stl file
19 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I'm trying to make a propeller generator that can export a stl file. I make the propeller as a point cloud then I use the alphaShape, boundaryFacets, and stlwrite functions to export the point cloud to an .stl file. Like the following (the cloud varaible is my point cloud):
shp = alphaShape(cloud', 0.0497); % 0.0497 comes from using the criticalAlpha function on shp
[bf, P] = boundaryFacets(shp);
stlwrite(triangulation(bf, P), 'test2.stl', 'text');
But when I open the generated .stl file, there are some extra faces added around the base of the blade. Below is the exported .stl file in PrusiaSlicer, with the added faces circled.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1280600/image.png)
For referance a plot of the point cloud I created is attached.
I will admit that I have no idea how the alphashape, boundarFacets, and stlwrite functions work. I'm just looking for a way to get rid of the extra faces around the base of the blades. I've tried playing around with the alpha radius but I don't really know what it does so I didn't get any significant results.
Does anyone know how to get rid of these extra faces or a better way to go from a point cloud to a .stl file?
Thanks in advance!
0 个评论
回答(1 个)
Aritra
2023-2-2
Hi,
As per my understanding you are trying to convert a point cloud to a .stl file. You have tried using the alphaShape(x,y,z), boundaryFacets(shp), and stlwrite(TR,filename,fileformat) functions. However, the generated results had extra faces involved.
As an alternate solution you can try using the delaunay(x,y,z) function. The Delaunay function creates a 3D Delaunay triangulation from points in a point cloud. You can check the comments section of the following ML answer to learn more about how to convert 3D co-ordinates to stl surfaces using Delaunay triangulation function.
Similarly, you can use the boundary(x,y,z) function which takes a point cloud as an input and returns a solid formed by them. You can also visualize the results of the graph generated by the boundary(x,y,z) function using the trisurf(T,x,y,z) function. You can check the comments section of the following ML answer to learn more about how to convert point clouds to Mesh/Grid to STL.
For more details you can refer to the following documentation on Delaunay, stlwrite, trisurf and boundary function:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Point Cloud Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!