mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Ported some Model methods to XS
This commit is contained in:
parent
f06566dd3a
commit
b10917806a
7 changed files with 52 additions and 44 deletions
|
@ -277,7 +277,7 @@ TriangleMesh::split() const
|
|||
}
|
||||
|
||||
void
|
||||
TriangleMesh::merge(const TriangleMesh* mesh)
|
||||
TriangleMesh::merge(const TriangleMesh &mesh)
|
||||
{
|
||||
// reset stats and metadata
|
||||
int number_of_facets = this->stl.stats.number_of_facets;
|
||||
|
@ -285,13 +285,13 @@ TriangleMesh::merge(const TriangleMesh* mesh)
|
|||
this->repaired = false;
|
||||
|
||||
// update facet count and allocate more memory
|
||||
this->stl.stats.number_of_facets = number_of_facets + mesh->stl.stats.number_of_facets;
|
||||
this->stl.stats.number_of_facets = number_of_facets + mesh.stl.stats.number_of_facets;
|
||||
this->stl.stats.original_num_facets = this->stl.stats.number_of_facets;
|
||||
stl_reallocate(&this->stl);
|
||||
|
||||
// copy facets
|
||||
for (int i = 0; i < mesh->stl.stats.number_of_facets; i++) {
|
||||
this->stl.facet_start[number_of_facets + i] = mesh->stl.facet_start[i];
|
||||
for (int i = 0; i < mesh.stl.stats.number_of_facets; i++) {
|
||||
this->stl.facet_start[number_of_facets + i] = mesh.stl.facet_start[i];
|
||||
}
|
||||
|
||||
// update size
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue