mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-09 23:05:04 -06:00
Add reserve to mesh boolean operation
This commit is contained in:
parent
debf4981a6
commit
beb38d09ae
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue