Skip to content

Instantly share code, notes, and snippets.

@kintel
Last active January 14, 2023 20:36
Show Gist options
  • Save kintel/e82e63ec81fa753f2e9b3a86788c993d to your computer and use it in GitHub Desktop.
Save kintel/e82e63ec81fa753f2e9b3a86788c993d to your computer and use it in GitHub Desktop.
OpenSCAD fastcsg issue
// openscad file.scad -o out.png --enable=fast-csg --enable=fast-csg-remesh --enable=fast-csg-trust-corefinement --render
// This will _sometimes_ hang OpenSCAD and sometimes give the following error:
//
// CGAL error: precondition violation!
// Expression : is_polygon_soup_a_polygon_mesh(polygons)
// File : /Users/kintel/code/OpenSCAD/libraries/install/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h
// Line : 282
// Explanation: Input soup needs to define a valid polygon mesh! See is_polygon_soup_a_polygon_mesh() for further information.
// Refer to the bug-reporting instructions at https://www.cgal.org/bug_report.html
// WARNING: [fast-csg] Corefinement corefinement mesh union #2 failed with an error: CGAL ERROR: precondition violation!
// Expr: is_polygon_soup_a_polygon_mesh(polygons)
// File: /Users/kintel/code/OpenSCAD/libraries/install/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h
// Line: 282
// Explanation: Input soup needs to define a valid polygon mesh! See is_polygon_soup_a_polygon_mesh() for further information.
//
translate([40,-10,-10]) cube([2,50,30]);
translate([-30,40,-10]) cube([70,2,30]);
translate([0,0,10]) cube(10, center=true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment