Go to the documentation of this file.
13 #include <boost/graph/graph_traits.hpp>
14 #include <boost/graph/properties.hpp>
45 template<
typename HalfedgeGraph,
46 typename GeometryTraits >
51 const GeometryTraits >)
54 typedef double coordP_type;
55 typedef double coordN_type;
56 typedef float coordC_type;
57 typedef float coordT_type;
58 typedef size_t index_type;
62 throw std::invalid_argument(
63 "write_mesh(): output file path has no extension.");
65 std::cout <<
"Generic writing of \""
69 std::vector< std::string > valid_extensions = {
".obj",
".off",
".coff",
71 std::vector< std::string > valid_vtk_extensions = {
".vtk",
".vtp",
".vtu"};
78 throw std::invalid_argument(
79 "write_mesh(): output file format not yet supported.");
102 mvr.vertex_color_coords,
104 mvr.texture_face_indices,
105 mvr.normal_face_indices,
116 mvr.vertex_color_coords,
118 mvr.face_color_coords,
123 throw std::runtime_error(
"write_mesh(): ply writer not yet implemented");
135 mvr.field_attributes,
151 mvr.field_attributes,
156 std::cout <<
"Generic writing of \""
171 template<
typename HalfedgeGraph,
176 GeometryTraits gt(g);
177 write_mesh< HalfedgeGraph, GeometryTraits >(filename, g, pmaps, gt);
void write_off_file(std::string file_path, std::vector< std::vector< CoordType > > &points_coords, std::vector< std::vector< CoordNType > > &normals_coords, std::vector< std::vector< CoordTType > > &texture_coords, std::vector< std::vector< CoordCType > > &vertex_color_coords, std::vector< std::vector< IndexType > > &face_indices, std::vector< std::vector< CoordCType > > &face_color_coords, unsigned long nb_total_edges=0)
void write_obj_file(const std::string &file_path, std::vector< std::vector< CoordType > > &points_coords, std::vector< std::vector< CoordNType > > &normals_coords, std::vector< std::vector< CoordTType > > &texture_coords, std::vector< std::vector< CoordCType > > &vertex_color_coords, std::vector< std::vector< IndexType > > &face_indices, std::vector< std::vector< IndexType > > &texture_face_indices, std::vector< std::vector< IndexType > > &normal_face_indices, std::vector< MaterialType > &materials, std::vector< IndexType > &face_material)
boost::graph_traits< MeshT >::edges_size_type size_of_edges(const MeshT &g)
Real current number of edges of the mesh. Generic version.
std::map< std::string, boost::any > PMapsContainer
std::string get_file_full_name(const std::string &file_name)
Interfaces for plugins These interfaces will be used for different plugins.
void write_vtk_or_vtp_or_vtu_file(std::string file_path, const std::vector< std::vector< CoordType > > &points_coords, const std::vector< std::vector< CoordNType > > &normals_coords, const std::vector< std::vector< CoordCType > > &vertex_color_coords, const std::vector< std::vector< IndexType > > &line_indices, const std::vector< std::vector< CoordCType > > &lines_color_coords, const std::vector< std::vector< IndexType > > &face_indices, const std::vector< std::vector< CoordCType > > &face_color_coords, const std::vector< std::vector< std::vector< double > > > &field_attributes, const std::vector< std::string > &field_names)
bool write_gmsh_file(const std::string &file_path, const std::vector< std::vector< CoordType > > &points_coords, const std::vector< std::vector< CoordNType > > &normals_coords, const std::vector< std::vector< CoordCType > > &vertex_color_coords, const std::vector< std::vector< IndexType > > &line_indices, const std::vector< std::vector< CoordCType > > &lines_color_coords, const std::vector< std::vector< IndexType > > &face_indices, const std::vector< std::vector< CoordCType > > &face_color_coords, const std::vector< std::vector< std::vector< double > > > &field_attributes, const std::vector< std::string > &field_names)
void write_mesh(const std::string &filename, FEVV::CGALPointSet &g, PMapsContainer &pmaps)
Write mesh to file.
void mesh_to_vector_representation(const FaceListGraph &g, const FEVV::PMapsContainer &pmaps, FEVV::Types::MVR< coordP_type, coordN_type, coordT_type, coordC_type, index_type > &mvr, const GeometryTraits &)
Build the vector representation of the mesh.
bool has_extension(const std::string &file_name)