Closed zoelshi closed 5 years ago
Hi @zoelsherry
actually, you should use c3t3.output_to_medit(medit_file, true, true)
or c3t3.output_to_medit(medit_file, false, true)
.
You can have a look at the documentation written in CGAL/IO/File_medit.h (see below) and see that the third parameter decides whether facets will be written twice or not.
/**
* @brief outputs mesh to medit format
* @param os the stream
* @param c3t3 the mesh
* @param rebind if true, labels of cells are rebinded into [1..nb_of_labels]
* @param show_patches if true, patches are labeled with different labels than
* cells. If false, each surface facet is written twice, using label of
* each adjacent cell.
*/
template <class C3T3>
void
output_to_medit(std::ostream& os,
const C3T3& c3t3,
bool rebind = false,
bool show_patches = false)
Can you please confirm it's now ok for you?
Best regards, Jane.
@zoelsherry I close this issue. Please reopen it if you want to more precision. You can also continue discuss in this issue page even if it is officially closed.
It still doesn't work. TetGen still tell me that a self-intersection was detected. why are the face indices in *.mesh repeated?
Originally posted by @zoelsherry in https://github.com/CGAL/cgal/issues/3962#issuecomment-496811526
Issue Details
This is an issue following https://github.com/CGAL/cgal/issues/3962#issuecomment-496811526_ above. When I run the example of
Mesh_3/mesh_polyhedral_domain.cpp
to generate 3D mesh(triangle or tetrahedron), I advert the output mesh in *.mesh file format has duplicated faces. This results in error using TetGen(a software for generating tetrahedral meshes) to remesh the output mesh(*.mesh file format). The figure below shows the duplicated indices in out_2.mesh and the error in TetGen. Besides, here is my input file and output file. input_and_output_file.zipSource Code
Environment