mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 13:47:59 -06:00
MeshBooleans with CGAL only
This commit is contained in:
parent
79e546816d
commit
fada7224f1
5 changed files with 209 additions and 96 deletions
|
@ -1,6 +1,7 @@
|
|||
#ifndef libslic3r_MeshBoolean_hpp_
|
||||
#define libslic3r_MeshBoolean_hpp_
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
@ -11,6 +12,26 @@ namespace MeshBoolean {
|
|||
void minus(TriangleMesh& A, const TriangleMesh& B);
|
||||
void self_union(TriangleMesh& mesh);
|
||||
|
||||
namespace cgal {
|
||||
|
||||
struct CGALMesh;
|
||||
|
||||
std::unique_ptr<CGALMesh> triangle_mesh_to_cgal(const TriangleMesh &M);
|
||||
void cgal_to_triangle_mesh(const CGALMesh &cgalmesh, TriangleMesh &out);
|
||||
|
||||
// Do boolean mesh difference with CGAL bypassing igl.
|
||||
void minus(TriangleMesh &A, const TriangleMesh &B);
|
||||
|
||||
// Do self union only with CGAL.
|
||||
void self_union(TriangleMesh& mesh);
|
||||
|
||||
// does A = A - B
|
||||
// CGAL takes non-const objects as arguments. I suppose it doesn't change B but
|
||||
// there is no official garantee.
|
||||
void minus(CGALMesh &A, CGALMesh &B);
|
||||
void self_union(CGALMesh &A);
|
||||
|
||||
}
|
||||
|
||||
} // namespace MeshBoolean
|
||||
} // namespace Slic3r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue