diff --git a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h index 958e1cd54e1..a13703ed2be 100644 --- a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h +++ b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h @@ -138,7 +138,7 @@ public: // @todo bench that against CGAL::Inverse_index and std::unordered_map boost::container::flat_map index_map; - m_writer.write_header(m_os, num_vertices(g), num_halfedges(g), num_faces(g), + m_writer.write_header(m_os, vertices(g).size(), halfedges(g).size(), faces(g).size(), has_face_colors || has_vertex_colors, has_vertex_normals , has_vertex_textures ); diff --git a/BGL/include/CGAL/boost/graph/IO/PLY.h b/BGL/include/CGAL/boost/graph/IO/PLY.h index 4dbafb3cc80..90581b89a3d 100644 --- a/BGL/include/CGAL/boost/graph/IO/PLY.h +++ b/BGL/include/CGAL/boost/graph/IO/PLY.h @@ -380,7 +380,7 @@ bool write_PLY(std::ostream& os, } } - os << "element vertex " << num_vertices(g) << std::endl; + os << "element vertex " << vertices(g).size() << std::endl; IO::internal::output_property_header(os, make_ply_point_writer (CGAL::Identity_property_map())); //if vcm is not default add v:color property if(has_vcolor) @@ -391,7 +391,7 @@ bool write_PLY(std::ostream& os, << "property uchar alpha" << std::endl; } - os << "element face " << num_faces(g) << std::endl; + os << "element face " << faces(g).size() << std::endl; IO::internal::output_property_header( os, std::make_pair(CGAL::Identity_property_map >(), PLY_property >("vertex_indices"))); diff --git a/BGL/include/CGAL/boost/graph/IO/VTK.h b/BGL/include/CGAL/boost/graph/IO/VTK.h index 58b374a68f4..effbdb32ab0 100644 --- a/BGL/include/CGAL/boost/graph/IO/VTK.h +++ b/BGL/include/CGAL/boost/graph/IO/VTK.h @@ -193,7 +193,7 @@ void write_polys(std::ostream& os, std::vector connectivity_table; std::vector offsets; - std::vector cell_type(num_faces(g), 5); // triangle == 5 + std::vector cell_type(faces(g).size(), 5); // triangle == 5 std::size_t off = 0; @@ -243,7 +243,7 @@ void write_polys_tag(std::ostream& os, if(binary) { os << " offset=\"" << offset << "\"/>\n"; - offset += (3 * num_faces(g)+ 1) * sizeof(std::size_t); + offset += (3 * faces(g).size() + 1) * sizeof(std::size_t); // 3 indices (size_t) per triangle + length of the encoded data (size_t) } else @@ -264,7 +264,7 @@ void write_polys_tag(std::ostream& os, if(binary) { // if binary output, just write the xml tag os << " offset=\"" << offset << "\"/>\n"; - offset += (num_faces(g) + 1) * sizeof(std::size_t); + offset += (faces(g).size() + 1) * sizeof(std::size_t); // 1 offset (size_t) per triangle + length of the encoded data (size_t) } else @@ -287,13 +287,13 @@ void write_polys_tag(std::ostream& os, if(binary) { os << " offset=\"" << offset << "\"/>\n"; - offset += num_faces(g) + sizeof(std::size_t); + offset += faces(g).size() + sizeof(std::size_t); // 1 unsigned char per cell + length of the encoded data (size_t) } else { os << ">\n"; - for(std::size_t i = 0; i< num_faces(g); ++i) + for(std::size_t i=0; i\n"; } @@ -332,7 +332,7 @@ void write_points_tag(std::ostream& os, if(binary) { os << "\" offset=\"" << offset << "\"/>\n"; - offset += 3 * num_vertices(g) * sizeof(FT) + sizeof(std::size_t); + offset += 3 * vertices(g).size() * sizeof(FT) + sizeof(std::size_t); // 3 coords per points + length of the encoded data (size_t) } else @@ -456,8 +456,8 @@ bool write_VTP(std::ostream& os, os << ">\n" << " " << "\n"; - os << " \n"; + os << " \n"; std::size_t offset = 0; const bool binary = choose_parameter(get_parameter(np, internal_np::use_binary_mode), true);