Skip to content

ENH: compute_RVD geogram example, add facets region when using RVD_cells=true and exporting mesh to *.eobj #337

@antoinecollet5

Description

@antoinecollet5

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:

res_vol_mesh_triangles.txt

Image

cloud.txt

Image

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

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions