mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 15:05:54 +08:00
Move repaired check to find_unvisited_neighbors
This commit is contained in:
parent
69199215b0
commit
4a9e05194c
@ -361,6 +361,10 @@ bool TriangleMesh::is_splittable() const
|
|||||||
*/
|
*/
|
||||||
std::deque<uint32_t> TriangleMesh::find_unvisited_neighbors(std::vector<bool> &facet_visited) 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 the visited list is empty, populate it with false for every facet.
|
||||||
if (facet_visited.empty()) {
|
if (facet_visited.empty()) {
|
||||||
facet_visited = std::vector<bool>(this->stl.stats.number_of_facets, false);
|
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
|
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.
|
// Loop while we have remaining facets.
|
||||||
std::vector<bool> facet_visited;
|
std::vector<bool> facet_visited;
|
||||||
TriangleMeshPtrs meshes;
|
TriangleMeshPtrs meshes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user