mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Revert "Use number_of_parts for is_splittable"
It is too dangerous to rely on the admesh flag without inspecting the
admesh code line by line and a through test.
This reverts commit cd3cec3e45
.
This commit is contained in:
parent
cd3cec3e45
commit
d728f4be5e
4 changed files with 25 additions and 1 deletions
|
@ -338,6 +338,19 @@ void TriangleMesh::rotate(double angle, Point* center)
|
|||
this->translate(c(0), c(1), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates whether or not the mesh is splittable.
|
||||
*/
|
||||
bool TriangleMesh::is_splittable() const
|
||||
{
|
||||
std::vector<bool> visited;
|
||||
find_unvisited_neighbors(visited);
|
||||
|
||||
// Try finding an unvisited facet. If there are none, the mesh is not splittable.
|
||||
auto it = std::find(visited.begin(), visited.end(), false);
|
||||
return it != visited.end();
|
||||
}
|
||||
|
||||
/**
|
||||
* Visit all unvisited neighboring facets that are reachable from the first unvisited facet,
|
||||
* and return them.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue