From 072d7170e62fea76f54cca66d2f6667c4374b1a0 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Thu, 8 Sep 2011 03:23:42 +0200 Subject: Catch a non-simple polyhedron before export as this crashes CGAL diff --git a/src/openscad.cc b/src/openscad.cc index bf22246..180dbdf 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -318,6 +318,11 @@ int main(int argc, char **argv) fclose(fp); } + if (root_N->dim == 3 && !root_N->p3.is_simple()) { + fprintf(stderr, "Object isn't a valid 2-manifold! Modify your design.\n"); + exit(1); + } + if (stl_output_file) export_stl(root_N, stl_output_file, NULL); -- cgit v0.10.1