diff options
author | Marius Kintel <marius@kintel.net> | 2011-09-08 01:23:42 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-09-08 01:23:42 (GMT) |
commit | 072d7170e62fea76f54cca66d2f6667c4374b1a0 (patch) | |
tree | d00056001510c0709e5cd158925243660a30dc70 /src | |
parent | 4b95dd74138129f49c6ea7d26fbe241bc3981437 (diff) |
Catch a non-simple polyhedron before export as this crashes CGAL
Diffstat (limited to 'src')
-rw-r--r-- | src/openscad.cc | 5 |
1 files changed, 5 insertions, 0 deletions
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); |