mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 05:36:03 +08:00
Merge branch 'tm_fix_max_warning'
This commit is contained in:
commit
347e96a9a6
@ -1,7 +1,6 @@
|
|||||||
#include "Exception.hpp"
|
#include "Exception.hpp"
|
||||||
#include "MeshBoolean.hpp"
|
#include "MeshBoolean.hpp"
|
||||||
#include "libslic3r/TriangleMesh.hpp"
|
#include "libslic3r/TriangleMesh.hpp"
|
||||||
#include "boost/log/trivial.hpp"
|
|
||||||
#undef PI
|
#undef PI
|
||||||
|
|
||||||
// Include igl first. It defines "L" macro which then clashes with our localization
|
// Include igl first. It defines "L" macro which then clashes with our localization
|
||||||
@ -155,16 +154,13 @@ template<class _Mesh> TriangleMesh cgal_to_triangle_mesh(const _Mesh &cgalmesh)
|
|||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
Vec3i facet;
|
Vec3i facet;
|
||||||
for (const auto &v : vtc) {
|
for (auto v : vtc) {
|
||||||
if (i > 2) { i = 0; break; }
|
if (i > 2) { i = 0; break; }
|
||||||
facet(i++) = v;
|
facet(i++) = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 3) {
|
if (i == 3)
|
||||||
facets.emplace_back(facet);
|
facets.emplace_back(facet);
|
||||||
} else {
|
|
||||||
BOOST_LOG_TRIVIAL(error) << "CGAL face is not a triangle.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TriangleMesh out{points, facets};
|
TriangleMesh out{points, facets};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user