ITADN
CGAL/cgal/Issues

Mesh skeletonization makes skeleton outside mesh. How to parameterize?

#9402Openjmrfox 创建于 2026-03-25
J
jmrfoxcommented
## Issue Details I am trying to use the Triangulated Surface Mesh Skeletonization (TSMS) operation to produce skeletons for complex 3D surface meshes, and I need the resulting skeleton to A) be fully contained within the original mesh, and B) not have any spurious cycles (i.e., the number of cycles in the skeleton must equal the topological genus of the mesh). I would also like to minimize spurious branching. The problem is that I have not been able to find parameterizations that meet these requirements for some of my meshes. [Download the mesh I am using here](https://drive.google.com/file/d/1F98CydpxpuvDNjNB8qAq0GmDLOpat2A7/view?usp=sharing) I found [this stackoverflow post](https://stackoverflow.com/questions/36637798/triangulated-surface-mesh-skeletonization-package-how-to-keep-the-skeleton-ins) with the same issue, but the answer is not helpful as it just lists the parameters. I have read [the original paper](https://github.com/taiya/starlab-mcfskel/blob/master/Downloads/taglia_sgp12.pdf) and understand the algorithm. The CGAL implementation is parameterized by 3 values: is_medially_centered, quality_speed_tradeoff, medially_centered_speed_tradeoff. For this purpose, I assume we always want is_medially_centered = True. The latter two parameters are w_H and w_M in the original paper (though the CGAL code calls w_H "omega_H", and w_M "omega_P"). There is a third parameter w_L, though it is apparently constrained by choosing w_H and w_M. The paper seems to suggest that, since w_M controls attraction to the medial line, setting it large enough should force the skeleton to be contained by the mesh everywhere. However, with the default w_H=0.1, even setting w_M = 100 - 5000, etc produces skeletons outside the mesh. Furthermore, setting w_M too high seems to produce spurious cycles. I got some promising results increasing w_H along with larger w_M, but doing so has the side effect of producing what I would call spurious branches, many small lines to fill more of the mesh volume. So, I'm wondering if there is a way to parameterize the algorithm such that I get a skeleton fully contained in the mesh but with minimal extra branches and no spurious loops. Thank you. ## Source Code I am using the CGALLab demo program "version 6.1.1-I-247" ## Environment * Operating system (Windows/Mac/Linux, 32/64 bits): Windows 11 * Compiler: N/A * Release or debug mode: demo * Specific flags used (if any): None * CGAL version: 6.1.1-I-247 * Boost version: ? * Other libraries versions if used (Eigen, TBB, etc.): ?
2 条评论