Closed myousefi2016 closed 5 years ago
Could you share the model that made the code crash?
Could you share the model that made the code crash?
Done.
From here, you'll read: tmesh is a triangle mesh without borders and having exactly one connected component.
I agree the outcome is a bit harsh but it is the expected behavior. I think in debug mode you'll get a precondition error instead of the segfault. Note that the free functionis_closed()
can be used to detect when the input had a boundary or not.
Issue Details
I'm using CGAL::extract_mean_curvature_flow_skeleton example to extract centerline of a blood vessel 3D surface. But when I run the program, which works fine on default
elephant.off
example, it shows segmentation fault.I shared the not capped and capped surfaces here. You can reproduce the segmentation fault error with
Case1.off
and the code will work flawlessly withCase1-capped.off
.Case1.off Case1-capped.off
Source Code
Environment
Also I run the program by debug flags through gdb and I got this result:
I appreciate any help to resolve this issue.
Update
I realized that my 3D surface is not a closed manifold and as a result I capped it and finally it works fine. I think it's good to add this line to make sure the loaded 3D surface does not contain any hole: