From 28ffdcc391ce1902eea0a553a7bfeb266ef8c410 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Fri, 4 Nov 2022 12:46:46 +0100 Subject: [PATCH] Disable CGAL booleans for now in sla pipeline Does not work yet as expected. --- src/libslic3r/SLAPrintSteps.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/libslic3r/SLAPrintSteps.cpp b/src/libslic3r/SLAPrintSteps.cpp index a5873155c..4cf420a29 100644 --- a/src/libslic3r/SLAPrintSteps.cpp +++ b/src/libslic3r/SLAPrintSteps.cpp @@ -158,16 +158,22 @@ indexed_triangle_set SLAPrint::Steps::generate_preview_vdb( void SLAPrint::Steps::generate_preview(SLAPrintObject &po, SLAPrintObjectStep step) { - MeshBoolean::cgal::CGALMeshPtr cgalptr; + // TODO: enable when this works reliably. Currently, perform_csgmesh_booleans + // can generate incorrect result despite not throwing any exception. +// MeshBoolean::cgal::CGALMeshPtr cgalptr; - try { - cgalptr = csg::perform_csgmesh_booleans(range(po.m_mesh_to_slice)); - } catch(...) {} +// try { +// cgalptr = csg::perform_csgmesh_booleans(range(po.m_mesh_to_slice)); +// } catch(...) { +// cgalptr = nullptr; +// } - if (cgalptr) { - po.m_preview_meshes[step] = MeshBoolean::cgal::cgal_to_triangle_mesh(*cgalptr); - } else - po.m_preview_meshes[step] = TriangleMesh{generate_preview_vdb(po, step)}; +// if (cgalptr) { +// po.m_preview_meshes[step] = MeshBoolean::cgal::cgal_to_triangle_mesh(*cgalptr); +// } else +// po.m_preview_meshes[step] = TriangleMesh{generate_preview_vdb(po, step)}; + + po.m_preview_meshes[step] = TriangleMesh{generate_preview_vdb(po, step)}; for (size_t i = size_t(step) + 1; i < slaposCount; ++i) {