mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-14 01:01:47 +08:00
Add reserve to mesh boolean operation
This commit is contained in:
parent
debf4981a6
commit
beb38d09ae
@ -118,6 +118,11 @@ void triangle_mesh_to_cgal(const std::vector<stl_vertex> & V,
|
|||||||
{
|
{
|
||||||
if (F.empty()) return;
|
if (F.empty()) return;
|
||||||
|
|
||||||
|
size_t vertices_count = V.size();
|
||||||
|
size_t edges_count = (F.size()* 3) / 2;
|
||||||
|
size_t faces_count = F.size();
|
||||||
|
out.reserve(vertices_count, edges_count, faces_count);
|
||||||
|
|
||||||
for (auto &v : V)
|
for (auto &v : V)
|
||||||
out.add_vertex(typename _Mesh::Point{v.x(), v.y(), v.z()});
|
out.add_vertex(typename _Mesh::Point{v.x(), v.y(), v.z()});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user