mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Move repaired check to find_unvisited_neighbors
This commit is contained in:
parent
69199215b0
commit
4a9e05194c
1 changed files with 6 additions and 6 deletions
|
@ -361,6 +361,10 @@ bool TriangleMesh::is_splittable() const
|
|||
*/
|
||||
std::deque<uint32_t> TriangleMesh::find_unvisited_neighbors(std::vector<bool> &facet_visited) const
|
||||
{
|
||||
// Make sure we're not operating on a broken mesh.
|
||||
if (!this->repaired)
|
||||
throw std::runtime_error("split() requires repair()");
|
||||
|
||||
// If the visited list is empty, populate it with false for every facet.
|
||||
if (facet_visited.empty()) {
|
||||
facet_visited = std::vector<bool>(this->stl.stats.number_of_facets, false);
|
||||
|
@ -397,10 +401,6 @@ std::deque<uint32_t> TriangleMesh::find_unvisited_neighbors(std::vector<bool> &f
|
|||
*/
|
||||
TriangleMeshPtrs TriangleMesh::split() const
|
||||
{
|
||||
// Make sure we're not operating on a broken mesh.
|
||||
if (!this->repaired)
|
||||
throw std::runtime_error("split() requires repair()");
|
||||
|
||||
// Loop while we have remaining facets.
|
||||
std::vector<bool> facet_visited;
|
||||
TriangleMeshPtrs meshes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue