-
Notifications
You must be signed in to change notification settings - Fork 179
Description
Hi,
I have been playing around a bit with the compute_RVD geogram example program.
Here is a little dataset that I use for the tests, a point cloud for seeds and a triangulated closed manifold surface enclosing all points:
You will have to rename from .txt to .obj.
It works great and I even added some options in #336 to obtain something like this:
compute_RVD res_vol_mesh_triangles.obj cloud.obj test_voro_cells.eobj algo:predicates=exact RVD_cells=true RVD_cells:simplify_boundary=true RVD_cells:simplify_boundary_angle_threshold=1.0
However, I noticed that when using RVD_cells=true, cells are not computed at all (only vertices and facets). It is then impossible to link faces to seeds without post-processing the .obj file. That would be a great feature to add.
I am really new to geogram so I am a bit confused for now. I started to play a bit with the class SaveRVDCells but I am not so sure how to create correctly the cells. Looking at the mechanic for the faces - created when calling end_facet() - I guess cells would need to be created when calling end_polyhedron(), itself called by RVDPolyhedronCallback::process_polyhedron_mesh().
And probably something like this is needed later on:
if(M.facets.nb() != 0) {
Attribute<index_t> facet_region_attr(
M.facets.attributes(), "region"
);
for(index_t f=0; f<M.facets.nb(); ++f) {
facet_region_attr[f] = facet_regions[f];
}
}So that the region (seed) for each facet is correctly exported to the .eobj file.
Am I correct @BrunoLevy .
Thank in advance for the help.
Antoine