From f3cd66a416821a42c3ca944ba20875fd10bb0682 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Wed, 2 Apr 2014 01:51:10 -0500 Subject: [PATCH] fix broken build, move export_amf inside ENABLE_CGAL #ifdef --- src/export.cc | 207 +++++++++++++++++++++++++------------------------- 1 file changed, 104 insertions(+), 103 deletions(-) diff --git a/src/export.cc b/src/export.cc index 9127a8e6..d069d17a 100644 --- a/src/export.cc +++ b/src/export.cc @@ -261,109 +261,6 @@ void export_off(const CGAL_Nef_polyhedron *root_N, std::ostream &output) CGAL::set_error_behaviour(old_behaviour); } -#endif // ENABLE_CGAL - -/*! - Saves the current Polygon2d as DXF to the given absolute filename. - */ -void export_dxf(const Polygon2d &poly, std::ostream &output) -{ - setlocale(LC_NUMERIC, "C"); // Ensure radix is . (not ,) in output - // Some importers (e.g. Inkscape) needs a BLOCKS section to be present - output << " 0\n" - << "SECTION\n" - << " 2\n" - << "BLOCKS\n" - << " 0\n" - << "ENDSEC\n" - << " 0\n" - << "SECTION\n" - << " 2\n" - << "ENTITIES\n"; - - BOOST_FOREACH(const Outline2d &o, poly.outlines()) { - for (unsigned int i=0;i\n" - << "\n" - << "\n" - << "OpenSCAD Model\n"; - - output << ""; - - output << "\n"; - - setlocale(LC_NUMERIC, ""); // Set default locale -} - void export_amf(const class PolySet &ps, std::ostream &output) { // FIXME: Implement this without creating a Nef polyhedron @@ -486,3 +383,107 @@ void export_amf(const CGAL_Nef_polyhedron *root_N, std::ostream &output) CGAL::set_error_behaviour(old_behaviour); setlocale(LC_NUMERIC, ""); // Set default locale } + +#endif // ENABLE_CGAL + +/*! + Saves the current Polygon2d as DXF to the given absolute filename. + */ +void export_dxf(const Polygon2d &poly, std::ostream &output) +{ + setlocale(LC_NUMERIC, "C"); // Ensure radix is . (not ,) in output + // Some importers (e.g. Inkscape) needs a BLOCKS section to be present + output << " 0\n" + << "SECTION\n" + << " 2\n" + << "BLOCKS\n" + << " 0\n" + << "ENDSEC\n" + << " 0\n" + << "SECTION\n" + << " 2\n" + << "ENTITIES\n"; + + BOOST_FOREACH(const Outline2d &o, poly.outlines()) { + for (unsigned int i=0;i\n" + << "\n" + << "\n" + << "OpenSCAD Model\n"; + + output << ""; + + output << "\n"; + + setlocale(LC_NUMERIC, ""); // Set default locale +} +