#include #include #include #include typedef CGAL::Epick_d K; typedef CGAL::Delaunay_triangulation DT; void test(int dim) { std::stringstream input_filename; input_filename << "data/points_" << dim << ".cin"; std::ifstream in(input_filename.str()); DT::Point p; std::vector points; int dim_from_file; in >> dim_from_file; while(in >> p) points.push_back(p); // Build the Regular Triangulation DT dt(dim_from_file); dt.insert(points.begin(), points.end()); CGAL_assertion(dt.is_valid(true)); // Export std::stringstream output_filename; output_filename << "data/dt_dim" << dim << ".off"; std::ofstream off_stream(output_filename.str()); CGAL::export_triangulation_to_off(off_stream, dt); } int main() { //test(2); //test(3); test(10); return 0; }