Hollowing: randomize hole mesh translations before unification.

To prevent self intersections in the output mesh.
This commit is contained in:
tamasmeszaros 2020-02-07 16:33:04 +01:00
parent f512892f6b
commit eb4b24e136
4 changed files with 25 additions and 17 deletions

View file

@ -113,6 +113,9 @@ struct CGALMesh { _EpicMesh m; };
template<class _Mesh> void triangle_mesh_to_cgal(const TriangleMesh &M, _Mesh &out)
{
using Index3 = std::array<size_t, 3>;
if (M.empty()) return;
std::vector<typename _Mesh::Point> points;
std::vector<Index3> indices;
points.reserve(M.its.vertices.size());