how to get a seam selection file?

67 views Asked by At

I want to use CGAL::Surface-mesh-parameterization to process a sphere Triangle mesh, but I don't know how to create seam selection file. This is example:

https://doc.cgal.org/latest/Surface_mesh_parameterization/Surface_mesh_parameterization_2orbifold_8cpp-example.html

So I want to create a txt file to record information about seam selection, like this:

ofstream(file);
file.open("seam_selection.txt");
file<<*********<<endl;
file<<*********<<endl;
file<<*********<<endl;
file.close();

I hope someone can help me answer how to write this txt file specifically,there is some information about the seam selection file creation:

Selection file that contains the cones and possibly the path between cones,
1.the first line for the cones indices 
2.the second line must be empty 
3.the third line optionally provides the seam edges indices as 'e11 e12 e21 e22 e31 e32' etc.
1

There are 1 answers

1
Mael On

Orbifold parameterization requires the user to set up so-called cones on the mesh, which will determine how the topological sphere is unfolded into a periodic parameterization. Between these cones, so-called seams are used to cut the mesh. The choice of cones is important,(the parameterization will be different) but the choice of seams between these cones will not matter for the result (the parameterization will not be different)

As the documentation says, the first line is for cones, so you must provide either 3 or 4 (depending on your chosen Orbifold type) vertex IDs, your choice of cones.

The second line is for faces, which is not used here, and should be left empty.

The third line contains edge indices, describing the paths between your cones. The format is that each edge is described by the indices of its two vertices. You can leave this line empty, and in that case, paths between cones will be determined using a Dijkstra algorithm. Note that you must ensure a few preconditions on the paths (which might not be automatically verified depending on your choice of cones, or if you let the Dijkstra algorithm find the paths), see parameterize().