CGAL 6.1 - 3D Constrained Triangulations
Loading...
Searching...
No Matches
Constrained_triangulation_3/remesh_constrained_Delaunay_triangulation_3.cpp

How to use CGAL::tetrahedral_isotropic_remeshing with a constrained Delaunay triangulation.

How to use CGAL::tetrahedral_isotropic_remeshing with a constrained Delaunay triangulation.

#define CGAL_TETRAHEDRAL_REMESHING_VERBOSE 1
#define CGAL_TETRAHEDRAL_REMESHING_DEBUG 1
#include <CGAL/make_conforming_constrained_Delaunay_triangulation_3.h>
#include <CGAL/tetrahedral_remeshing.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/draw_triangulation_3.h>
#include <fstream>
#include <string>
int main(int argc, char* argv[])
{
std::string filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/mpi.off");
std::ifstream in(filename);
CGAL::Surface_mesh<K::Point_3> mesh;
if(!in || !CGAL::IO::read_OFF(in, mesh)) {
std::cerr << "Error: cannot read file " << filename << std::endl;
return EXIT_FAILURE;
}
CCDT ccdt = CGAL::make_conforming_constrained_Delaunay_triangulation_3<CCDT>(mesh);
Tr tr = std::move(ccdt).triangulation();
std::cout << "Number of vertices in tr: "
<< tr.number_of_vertices() << std::endl;
CGAL::parameters::number_of_iterations(3));
std::cout << "Number of vertices in tr: "
<< tr.number_of_vertices() << std::endl;
CGAL::draw(ccdt.triangulation());
}
This class template represents a 3D constrained Delaunay triangulation.
Definition: Conforming_constrained_Delaunay_triangulation_3.h:536
Cell base class for the 3D conforming constrained Delaunay triangulation.
Definition: Conforming_constrained_Delaunay_triangulation_cell_base_3.h:45
The Conforming_constrained_Delaunay_triangulation_vertex_base_3 class is a vertex base class for the ...
Definition: Conforming_constrained_Delaunay_triangulation_vertex_base_3.h:43
bool read_OFF(std::istream &is, Graph &g, const NamedParameters &np=parameters::default_values())
void draw(const T3 &at3, const GSOptions &gso)
void tetrahedral_isotropic_remeshing(CGAL::Triangulation_3< Traits, TDS, SLDS > &tr, const SizingFunction &sizing, const NamedParameters &np=parameters::default_values())
std::string data_file_path(const std::string &filename)