This project contains matlab script for conversion of CAD model to manifold surface mesh. Parts of the code have been taken from the following repositories:
git clone https://github.com/hrdkjain/Matlab-Functions.git
git clone https://github.com/hrdkjain/CAD2Mesh.git
The project has been tested on Ubuntu 20.04 with following requirements:
- Matlab (tested on version R2021a)
- meshlabserver (tested on version 2020.09)
This project depends on Matlab-Functions.
- Copy
include.m.example
toinclude.m
and modify the paths. - The
main.m
script reads CAD models stored insrcDir
, converts them to CAD to mesh and saves them todstDir
. - After performing the processing, there might be few non-manifold edges left in the surface mesh, which are removed by
meshlabserver
. - Often to run meshlabserver from Matlab,
LD_LIBRARY_PATH
environment variable needs to be set to qt library path. Use this command to find the qt tool pathqtchooser -print-env | grep QTTOOLDIR
.
If you like this project you also might be interested in other projects which use CAD2Mesh as preprocessing stage for 3D surface mesh reconstruction or mesh generation.