CGAL 6.3-I-99 - Linear Cell Complex
Loading...
Searching...
No Matches
Linear_cell_complex/hexmeshing_basic.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/generate_hexahedral_mesh_using_two_refinement.h>
#include <CGAL/draw_linear_cell_complex.h>
#include <CGAL/Linear_cell_complex/IO/VTK.h>
#include <CGAL/Polygon_mesh_processing/triangulate_faces.h>
#include <CGAL/Surface_mesh.h>
#include <string>
int main(int argc, char** argv)
{
auto filename=(argc<2?CGAL::data_file_path("meshes/bunny00.off"):argv[1]);
CGAL::Surface_mesh<CGAL::Exact_predicates_inexact_constructions_kernel::Point_3> poly;
CGAL::IO::read_polygon_mesh(filename, poly);
CGAL::Polygon_mesh_processing::triangulate_faces(poly);
(poly, 10, 2, CGAL::parameters::use_trimming(true).use_smoothing(true));
CGAL::draw(lcc);
CGAL::IO::write_VTK("hexmesh.vtk", lcc);
return EXIT_SUCCESS;
}
bool read_polygon_mesh(const std::filesystem::path &fname, Graph &g, const NamedParameters &np=parameters::default_values())
void draw(const P &p, const GSOptions &gso)
auto generate_hexahedral_mesh_using_two_refinement(const TriangleMesh &tmesh, int cube_cells_per_dim, int nb_levels, const NamedParameters &np=parameters::default_values())
generates a pure hexahedral mesh from a surface triangle mesh using the two-refinement algorithm desc...
bool write_VTK(const char *filename, const LCC &alcc, const std::vector< VertexScalarType > *vertex_scalars=nullptr, const std::vector< VolumeScalarType > *volume_scalars=nullptr)
Writes a 3D Linear_cell_complex to a VTK legacy ASCII file.
std::filesystem::path data_file_path(const std::filesystem::path &filename)