mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-28 00:54:00 -06:00
WIP: Admesh - replacement of C memory allocation with std vectors
This commit is contained in:
parent
3ab886b747
commit
8da54139c4
17 changed files with 450 additions and 585 deletions
|
@ -27,8 +27,8 @@ void SlicingAdaptive::prepare()
|
|||
nfaces_total += (*it_mesh)->stl.stats.number_of_facets;
|
||||
m_faces.reserve(nfaces_total);
|
||||
for (std::vector<const TriangleMesh*>::const_iterator it_mesh = m_meshes.begin(); it_mesh != m_meshes.end(); ++ it_mesh)
|
||||
for (int i = 0; i < (*it_mesh)->stl.stats.number_of_facets; ++ i)
|
||||
m_faces.push_back((*it_mesh)->stl.facet_start + i);
|
||||
for (const stl_facet &face : (*it_mesh)->stl.facet_start)
|
||||
m_faces.emplace_back(&face);
|
||||
|
||||
// 2) Sort faces lexicographically by their Z span.
|
||||
std::sort(m_faces.begin(), m_faces.end(), [](const stl_facet *f1, const stl_facet *f2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue