Reputation: 1356
So I know Meshlab is built on top of an opensource VCG Library found here so I figured I'd be able to find which part of the code is involved in the Close Holes filter but I'm having some trouble.
If possible could anyone point me to what algorithm is being used or where to search in the VCG source (or Meshlab source) to find the code for the filter?
I wanted to incorporate it in something I'm doing without having to call meshlabserver + filter script.
Upvotes: 1
Views: 1573
Reputation: 3172
Open meshlab's "close holes" filter. Click Help. Notice an unusual phrase "closing a hole." Download the source code distribution, currently MeshLabSrc_AllInc_v133.tgz.
cd meshlab/src
find . -type f -print0 |xargs -0 grep "closing a hole"
Notice the one hit: ./meshlabplugins/filter_meshing/meshfilter.cpp:
... "After closing a hole the faces that have been created are left selected.
...
Edit meshfilter.cpp, and find just above that line, case FP_CLOSE_HOLES:
.
Grep again for FP_CLOSE_HOLES
. Find the call to EarCuttingFill
.
Grep EarCuttingFill
. Find no definitions for it. Google instead, and find its VCG reference.
A few more clicks yields the source code.
Edit: those URLs from 2014 are dead. In 2018, try http://docs.ros.org/diamondback/api/vcglib/html/classvcg_1_1tri_1_1Hole.html and http://docs.ros.org/diamondback/api/vcglib/html/hole_8h_source.html#l00584
Upvotes: 2