diff options
author | Marius Kintel <marius@kintel.net> | 2011-09-07 20:04:02 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-09-07 20:04:02 (GMT) |
commit | 75784844eaad1aa77757eb7640547146e0a96209 (patch) | |
tree | c90a5293810c709d1cbeb1f7de32f690cc4e6fa4 /src/export.cc | |
parent | fe0f9dd7555dd05391c956c32e26bed7d5e51a2c (diff) |
Implemented OFF export
Diffstat (limited to 'src/export.cc')
-rw-r--r-- | src/export.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/export.cc b/src/export.cc index 0c60ea3..9a5eb55 100644 --- a/src/export.cc +++ b/src/export.cc @@ -42,7 +42,7 @@ Saves the current 3D CGAL Nef polyhedron as STL to the given file. The file must be open. */ -void export_stl(CGAL_Nef_polyhedron *root_N, QTextStream &output, QProgressDialog *pd) +void export_stl(CGAL_Nef_polyhedron *root_N, std::ostream &output, QProgressDialog *pd) { CGAL_Polyhedron P; root_N->p3->convert_to_Polyhedron(P); @@ -110,15 +110,17 @@ void export_stl(CGAL_Nef_polyhedron *root_N, QTextStream &output, QProgressDialo setlocale(LC_NUMERIC, ""); // Set default locale } -void export_off(CGAL_Nef_polyhedron*, QTextStream&, QProgressDialog*) +void export_off(CGAL_Nef_polyhedron *root_N, std::ostream &output, QProgressDialog*) { - PRINTF("WARNING: OFF import is not implemented yet."); + CGAL_Polyhedron P; + root_N->p3->convert_to_Polyhedron(P); + output << P; } /*! Saves the current 2D CGAL Nef polyhedron as DXF to the given absolute filename. */ -void export_dxf(CGAL_Nef_polyhedron *root_N, QTextStream &output, QProgressDialog *) +void export_dxf(CGAL_Nef_polyhedron *root_N, std::ostream &output, QProgressDialog *) { setlocale(LC_NUMERIC, "C"); // Ensure radix is . (not ,) in output // Some importers (e.g. Inkscape) needs a BLOCKS section to be present |