STL Repair within Matlab (non-manifold edges, degenerate faces,..)

37 次查看(过去 30 天)
Hi everyone,
Is there an available library or function to repair a .stl file within MATLAB (or call an external tool from Matlab)?
There is this website that does exactly what I need to do ( https://www.formware.co/onlinestlrepair ) in terms of repair but I would need to automate the process from within the Matlab environment. Unfortunately meshlab does not seem to be linkable with Matlab anymore. When I say cleaning/repairing a .stl I primaraly (but not limited to) mean: naked edges, planar holes, non-planar holes, non-manifold edges, inverted faces, degenerate faces, duplicate faces, disjoint shells.
If no libraries/functions are available, would you have any advice on how to create a script that could tackle the problem?
Many thanks

采纳的回答

Aditya
Aditya 2023-8-23
Hey Claud,
In MATLAB, there isn't a built-in function or library specifically designed to repair .stl files. However, you can use external tools or libraries by calling them from MATLAB to repair .stl files. As meshlab was not working here is another alternative.
Python libraries: MATLAB supports calling Python functions and libraries using the Python integration feature. You can use Python libraries such as `trimesh` or `pyvista` to repair .stl files. Write a Python script that performs the repair operation and call it from MATLAB using the `py` function.
output = py.python_script.repair_stl('input.stl');

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Call MATLAB from Python 的更多信息

产品


版本

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by